From bfe11d0705f689088f2ec98677879421fe5aee98 Mon Sep 17 00:00:00 2001 From: madthanu Date: Tue, 7 Oct 2014 15:39:13 -0600 Subject: [PATCH] First commit\! --- README.md | 313 +- _aliceautotest.py | 589 ++ _aliceparsesyscalls.py | 913 ++ _aliceutils.py | 117 + alice-strace/.tarball-version | 1 + alice-strace/.version | 1 + alice-strace/AUTHORS | 1 + alice-strace/COPYING | 29 + alice-strace/CREDITS | 130 + alice-strace/ChangeLog | 7507 ++++++++++++++ alice-strace/ChangeLog-CVS | 5614 +++++++++++ alice-strace/INSTALL | 305 + alice-strace/Makefile.in | 1272 +++ alice-strace/NEWS | 508 + alice-strace/README | 17 + alice-strace/README-alc-alice-strace | 8 + alice-strace/README-linux | 31 + alice-strace/README-linux-ptrace | 542 + alice-strace/aclocal.m4 | 1073 ++ alice-strace/alice-strace-graph | 336 + alice-strace/alice-strace-log-merge | 43 + alice-strace/alice-strace-retrieve-symbols | 200 + alice-strace/alice-strace.1 | 29 + alice-strace/alice-strace.c | 2423 +++++ alice-strace/alice-strace.spec | 491 + alice-strace/alice-strace_test.c | 24 + alice-strace/bjm.c | 202 + alice-strace/block.c | 283 + alice-strace/config.guess | 1552 +++ alice-strace/config.h.in | 556 ++ alice-strace/config.sub | 1788 ++++ alice-strace/configure | 8752 +++++++++++++++++ alice-strace/count.c | 249 + alice-strace/debian/alice-strace-udeb.install | 1 + alice-strace/debian/alice-strace.docs | 1 + alice-strace/debian/alice-strace.examples | 1 + alice-strace/debian/alice-strace.install | 1 + alice-strace/debian/alice-strace.manpages | 1 + alice-strace/debian/alice-strace64.install | 1 + alice-strace/debian/alice-strace64.manpages | 1 + alice-strace/debian/changelog | 800 ++ alice-strace/debian/compat | 1 + alice-strace/debian/control | 56 + alice-strace/debian/copyright | 39 + alice-strace/debian/rules | 86 + alice-strace/debian/source/format | 1 + alice-strace/debian/watch | 2 + alice-strace/defs.h | 850 ++ alice-strace/depcomp | 708 ++ alice-strace/desc.c | 1105 +++ alice-strace/errnoent.sh | 40 + alice-strace/file.c | 2788 ++++++ alice-strace/install-sh | 527 + alice-strace/io.c | 476 + alice-strace/ioctl.c | 150 + alice-strace/ioctlsort.c | 63 + alice-strace/ipc.c | 534 + alice-strace/linux/aarch64/errnoent1.h | 2 + alice-strace/linux/aarch64/ioctlent.h.in | 1 + alice-strace/linux/aarch64/ioctlent1.h | 1 + alice-strace/linux/aarch64/signalent1.h | 1 + alice-strace/linux/aarch64/syscallent.h | 1 + alice-strace/linux/aarch64/syscallent1.h | 330 + alice-strace/linux/alpha/errnoent.h | 516 + alice-strace/linux/alpha/ioctlent.h.in | 73 + alice-strace/linux/alpha/signalent.h | 32 + alice-strace/linux/alpha/syscallent.h | 534 + alice-strace/linux/arm/ioctlent.h.in | 1 + alice-strace/linux/arm/syscallent.h | 503 + alice-strace/linux/avr32/ioctlent.h.in | 1 + alice-strace/linux/avr32/syscallent.h | 311 + alice-strace/linux/bfin/ioctlent.h.in | 8 + alice-strace/linux/bfin/syscallent.h | 411 + alice-strace/linux/dummy.h | 169 + alice-strace/linux/errnoent.h | 535 + alice-strace/linux/hppa/errnoent.h | 254 + alice-strace/linux/hppa/ioctlent.h.in | 1 + alice-strace/linux/hppa/signalent.h | 38 + alice-strace/linux/hppa/syscallent.h | 338 + alice-strace/linux/i386/ioctlent.h.in | 15 + alice-strace/linux/i386/syscallent.h | 481 + alice-strace/linux/ia64/ioctlent.h.in | 66 + alice-strace/linux/ia64/signalent.h | 64 + alice-strace/linux/ia64/syscallent.h | 1120 +++ alice-strace/linux/ioctlent-filter.awk | 19 + alice-strace/linux/ioctlent.h.in | 2012 ++++ alice-strace/linux/ioctlent.sh | 156 + alice-strace/linux/ioctlsort.c | 50 + alice-strace/linux/m68k/ioctlent.h.in | 1 + alice-strace/linux/m68k/syscallent.h | 479 + alice-strace/linux/metag/ioctlent.h.in | 1 + alice-strace/linux/metag/syscallent.h | 266 + alice-strace/linux/microblaze/ioctlent.h.in | 1 + alice-strace/linux/microblaze/syscallent.h | 409 + alice-strace/linux/mips/errnoent.h | 1135 +++ alice-strace/linux/mips/ioctlent.h.in | 59 + alice-strace/linux/mips/ioctlent.sh | 96 + alice-strace/linux/mips/signalent.h | 32 + alice-strace/linux/mips/syscallent-compat.h | 870 ++ alice-strace/linux/mips/syscallent-n32.h | 630 ++ alice-strace/linux/mips/syscallent-n64.h | 621 ++ alice-strace/linux/mips/syscallent-o32.h | 703 ++ alice-strace/linux/mips/syscallent.h | 5 + alice-strace/linux/mtd-abi.h | 278 + alice-strace/linux/or1k/ioctlent.h.in | 1 + alice-strace/linux/or1k/syscallent.h | 262 + alice-strace/linux/powerpc/errnoent1.h | 1 + alice-strace/linux/powerpc/ioctlent.h.in | 84 + alice-strace/linux/powerpc/ioctlent1.h | 1 + alice-strace/linux/powerpc/signalent1.h | 1 + alice-strace/linux/powerpc/syscallent.h | 484 + alice-strace/linux/powerpc/syscallent1.h | 1 + alice-strace/linux/s390/ioctlent.h.in | 49 + alice-strace/linux/s390/syscallent.h | 481 + alice-strace/linux/s390x/ioctlent.h.in | 1 + alice-strace/linux/s390x/syscallent.h | 480 + alice-strace/linux/sh/ioctlent.h.in | 65 + alice-strace/linux/sh/syscallent.h | 484 + alice-strace/linux/sh64/ioctlent.h.in | 1 + alice-strace/linux/sh64/syscallent.h | 455 + alice-strace/linux/signalent.h | 33 + alice-strace/linux/sparc/dummy2.h | 276 + alice-strace/linux/sparc/errnoent.h | 127 + alice-strace/linux/sparc/errnoent1.h | 152 + alice-strace/linux/sparc/gen.pl | 37 + alice-strace/linux/sparc/ioctlent.h.in | 120 + alice-strace/linux/sparc/ioctlent1.h | 429 + alice-strace/linux/sparc/signalent.h | 32 + alice-strace/linux/sparc/signalent1.h | 36 + alice-strace/linux/sparc/syscall1.h | 498 + alice-strace/linux/sparc/syscallent.h | 407 + alice-strace/linux/sparc/syscallent1.h | 437 + alice-strace/linux/sparc64/dummy2.h | 276 + alice-strace/linux/sparc64/errnoent.h | 127 + alice-strace/linux/sparc64/errnoent1.h | 1 + alice-strace/linux/sparc64/errnoent2.h | 127 + alice-strace/linux/sparc64/ioctlent.h.in | 1 + alice-strace/linux/sparc64/ioctlent1.h | 1 + alice-strace/linux/sparc64/ioctlent2.h | 838 ++ alice-strace/linux/sparc64/signalent.h | 32 + alice-strace/linux/sparc64/signalent1.h | 1 + alice-strace/linux/sparc64/signalent2.h | 32 + alice-strace/linux/sparc64/syscall1.h | 498 + alice-strace/linux/sparc64/syscallent.h | 1 + alice-strace/linux/sparc64/syscallent1.h | 1 + alice-strace/linux/sparc64/syscallent2.h | 1 + alice-strace/linux/subcall.h | 6 + alice-strace/linux/syscall.h | 346 + alice-strace/linux/tile/errnoent1.h | 2 + alice-strace/linux/tile/ioctlent.h.in | 1 + alice-strace/linux/tile/ioctlent1.h | 2 + alice-strace/linux/tile/signalent1.h | 2 + alice-strace/linux/tile/syscallent.h | 274 + alice-strace/linux/tile/syscallent1.h | 278 + alice-strace/linux/ubi-user.h | 420 + alice-strace/linux/x32/errnoent.h | 1 + alice-strace/linux/x32/errnoent1.h | 2 + alice-strace/linux/x32/ioctlent.h.in | 1 + alice-strace/linux/x32/ioctlent1.h | 2 + alice-strace/linux/x32/signalent.h | 1 + alice-strace/linux/x32/signalent1.h | 2 + alice-strace/linux/x32/syscallent.h | 348 + alice-strace/linux/x32/syscallent1.h | 3 + alice-strace/linux/x86_64/errnoent1.h | 2 + alice-strace/linux/x86_64/errnoent2.h | 2 + alice-strace/linux/x86_64/gentab.pl | 73 + alice-strace/linux/x86_64/ioctlent.h.in | 1 + alice-strace/linux/x86_64/ioctlent1.h | 2 + alice-strace/linux/x86_64/ioctlent2.h | 2 + alice-strace/linux/x86_64/signalent1.h | 2 + alice-strace/linux/x86_64/signalent2.h | 2 + alice-strace/linux/x86_64/syscallent.h | 314 + alice-strace/linux/x86_64/syscallent1.h | 3 + alice-strace/linux/x86_64/syscallent2.h | 2 + alice-strace/linux/xtensa/ioctlent.h.in | 1 + alice-strace/linux/xtensa/syscallent.h | 326 + alice-strace/loop.c | 191 + alice-strace/m4/includedir.m4 | 23 + alice-strace/m4/long_long.m4 | 44 + alice-strace/m4/stat.m4 | 16 + alice-strace/m4/statfs.m4 | 15 + alice-strace/m4/warnings.m4 | 36 + alice-strace/mem.c | 982 ++ alice-strace/missing | 331 + alice-strace/mtd.c | 408 + alice-strace/net.c | 2335 +++++ alice-strace/pathtrace.c | 361 + alice-strace/pretty_print_stack_trace.py | 263 + alice-strace/process.c | 3030 ++++++ alice-strace/quota.c | 652 ++ alice-strace/resource.c | 438 + alice-strace/scsi.c | 139 + alice-strace/signal.c | 1438 +++ alice-strace/signalent.sh | 53 + alice-strace/sock.c | 287 + alice-strace/stream.c | 437 + alice-strace/syscall.c | 3016 ++++++ alice-strace/syscallent.sh | 73 + alice-strace/system.c | 1088 ++ alice-strace/term.c | 420 + alice-strace/tests/Makefile.am | 11 + alice-strace/tests/Makefile.in | 569 ++ alice-strace/tests/alice-strace-f | 13 + alice-strace/tests/init.sh | 30 + alice-strace/tests/net | 47 + alice-strace/tests/net-accept-connect.c | 49 + alice-strace/tests/ptrace_setoptions | 28 + alice-strace/tests/qual_syscall | 27 + alice-strace/tests/stat | 37 + alice-strace/time.c | 983 ++ alice-strace/util.c | 1525 +++ alice-strace/vsprintf.c | 786 ++ alice-strace/xlate.el | 78 + alice.py | 412 + alicedefaultexplorer.py | 224 + alicedefaultfs.py | 246 + alicestruct.py | 65 + bin/alice-check | 57 + bin/alice-record | 38 + doc/compile.py | 36 + doc/doc.cfg | 30 + doc/doc.tex | 113 + example/git/README.txt | 10 + example/git/git_checker.sh | 21 + example/git/git_workload.sh | 27 + example/toy/toy.c | 23 + example/toy/toy_checker.py | 23 + example/toy/toy_workload.sh | 32 + 228 files changed, 89171 insertions(+), 2 deletions(-) create mode 100644 _aliceautotest.py create mode 100644 _aliceparsesyscalls.py create mode 100644 _aliceutils.py create mode 100644 alice-strace/.tarball-version create mode 100644 alice-strace/.version create mode 100644 alice-strace/AUTHORS create mode 100644 alice-strace/COPYING create mode 100644 alice-strace/CREDITS create mode 100644 alice-strace/ChangeLog create mode 100644 alice-strace/ChangeLog-CVS create mode 100644 alice-strace/INSTALL create mode 100644 alice-strace/Makefile.in create mode 100644 alice-strace/NEWS create mode 100644 alice-strace/README create mode 100644 alice-strace/README-alc-alice-strace create mode 100644 alice-strace/README-linux create mode 100644 alice-strace/README-linux-ptrace create mode 100644 alice-strace/aclocal.m4 create mode 100755 alice-strace/alice-strace-graph create mode 100755 alice-strace/alice-strace-log-merge create mode 100755 alice-strace/alice-strace-retrieve-symbols create mode 100644 alice-strace/alice-strace.1 create mode 100644 alice-strace/alice-strace.c create mode 100644 alice-strace/alice-strace.spec create mode 100644 alice-strace/alice-strace_test.c create mode 100644 alice-strace/bjm.c create mode 100644 alice-strace/block.c create mode 100755 alice-strace/config.guess create mode 100644 alice-strace/config.h.in create mode 100755 alice-strace/config.sub create mode 100755 alice-strace/configure create mode 100644 alice-strace/count.c create mode 100644 alice-strace/debian/alice-strace-udeb.install create mode 100644 alice-strace/debian/alice-strace.docs create mode 100644 alice-strace/debian/alice-strace.examples create mode 100644 alice-strace/debian/alice-strace.install create mode 100644 alice-strace/debian/alice-strace.manpages create mode 100644 alice-strace/debian/alice-strace64.install create mode 100644 alice-strace/debian/alice-strace64.manpages create mode 100644 alice-strace/debian/changelog create mode 100644 alice-strace/debian/compat create mode 100644 alice-strace/debian/control create mode 100644 alice-strace/debian/copyright create mode 100755 alice-strace/debian/rules create mode 100644 alice-strace/debian/source/format create mode 100644 alice-strace/debian/watch create mode 100644 alice-strace/defs.h create mode 100755 alice-strace/depcomp create mode 100644 alice-strace/desc.c create mode 100755 alice-strace/errnoent.sh create mode 100644 alice-strace/file.c create mode 100755 alice-strace/install-sh create mode 100644 alice-strace/io.c create mode 100644 alice-strace/ioctl.c create mode 100644 alice-strace/ioctlsort.c create mode 100644 alice-strace/ipc.c create mode 100644 alice-strace/linux/aarch64/errnoent1.h create mode 100644 alice-strace/linux/aarch64/ioctlent.h.in create mode 100644 alice-strace/linux/aarch64/ioctlent1.h create mode 100644 alice-strace/linux/aarch64/signalent1.h create mode 100644 alice-strace/linux/aarch64/syscallent.h create mode 100644 alice-strace/linux/aarch64/syscallent1.h create mode 100644 alice-strace/linux/alpha/errnoent.h create mode 100644 alice-strace/linux/alpha/ioctlent.h.in create mode 100644 alice-strace/linux/alpha/signalent.h create mode 100644 alice-strace/linux/alpha/syscallent.h create mode 100644 alice-strace/linux/arm/ioctlent.h.in create mode 100644 alice-strace/linux/arm/syscallent.h create mode 100644 alice-strace/linux/avr32/ioctlent.h.in create mode 100644 alice-strace/linux/avr32/syscallent.h create mode 100644 alice-strace/linux/bfin/ioctlent.h.in create mode 100644 alice-strace/linux/bfin/syscallent.h create mode 100644 alice-strace/linux/dummy.h create mode 100644 alice-strace/linux/errnoent.h create mode 100644 alice-strace/linux/hppa/errnoent.h create mode 100644 alice-strace/linux/hppa/ioctlent.h.in create mode 100644 alice-strace/linux/hppa/signalent.h create mode 100644 alice-strace/linux/hppa/syscallent.h create mode 100644 alice-strace/linux/i386/ioctlent.h.in create mode 100644 alice-strace/linux/i386/syscallent.h create mode 100644 alice-strace/linux/ia64/ioctlent.h.in create mode 100644 alice-strace/linux/ia64/signalent.h create mode 100644 alice-strace/linux/ia64/syscallent.h create mode 100644 alice-strace/linux/ioctlent-filter.awk create mode 100644 alice-strace/linux/ioctlent.h.in create mode 100755 alice-strace/linux/ioctlent.sh create mode 100644 alice-strace/linux/ioctlsort.c create mode 100644 alice-strace/linux/m68k/ioctlent.h.in create mode 100644 alice-strace/linux/m68k/syscallent.h create mode 100644 alice-strace/linux/metag/ioctlent.h.in create mode 100644 alice-strace/linux/metag/syscallent.h create mode 100644 alice-strace/linux/microblaze/ioctlent.h.in create mode 100644 alice-strace/linux/microblaze/syscallent.h create mode 100644 alice-strace/linux/mips/errnoent.h create mode 100644 alice-strace/linux/mips/ioctlent.h.in create mode 100755 alice-strace/linux/mips/ioctlent.sh create mode 100644 alice-strace/linux/mips/signalent.h create mode 100644 alice-strace/linux/mips/syscallent-compat.h create mode 100644 alice-strace/linux/mips/syscallent-n32.h create mode 100644 alice-strace/linux/mips/syscallent-n64.h create mode 100644 alice-strace/linux/mips/syscallent-o32.h create mode 100644 alice-strace/linux/mips/syscallent.h create mode 100644 alice-strace/linux/mtd-abi.h create mode 100644 alice-strace/linux/or1k/ioctlent.h.in create mode 100644 alice-strace/linux/or1k/syscallent.h create mode 100644 alice-strace/linux/powerpc/errnoent1.h create mode 100644 alice-strace/linux/powerpc/ioctlent.h.in create mode 100644 alice-strace/linux/powerpc/ioctlent1.h create mode 100644 alice-strace/linux/powerpc/signalent1.h create mode 100644 alice-strace/linux/powerpc/syscallent.h create mode 100644 alice-strace/linux/powerpc/syscallent1.h create mode 100644 alice-strace/linux/s390/ioctlent.h.in create mode 100644 alice-strace/linux/s390/syscallent.h create mode 100644 alice-strace/linux/s390x/ioctlent.h.in create mode 100644 alice-strace/linux/s390x/syscallent.h create mode 100644 alice-strace/linux/sh/ioctlent.h.in create mode 100644 alice-strace/linux/sh/syscallent.h create mode 100644 alice-strace/linux/sh64/ioctlent.h.in create mode 100644 alice-strace/linux/sh64/syscallent.h create mode 100644 alice-strace/linux/signalent.h create mode 100644 alice-strace/linux/sparc/dummy2.h create mode 100644 alice-strace/linux/sparc/errnoent.h create mode 100644 alice-strace/linux/sparc/errnoent1.h create mode 100644 alice-strace/linux/sparc/gen.pl create mode 100644 alice-strace/linux/sparc/ioctlent.h.in create mode 100644 alice-strace/linux/sparc/ioctlent1.h create mode 100644 alice-strace/linux/sparc/signalent.h create mode 100644 alice-strace/linux/sparc/signalent1.h create mode 100644 alice-strace/linux/sparc/syscall1.h create mode 100644 alice-strace/linux/sparc/syscallent.h create mode 100644 alice-strace/linux/sparc/syscallent1.h create mode 100644 alice-strace/linux/sparc64/dummy2.h create mode 100644 alice-strace/linux/sparc64/errnoent.h create mode 100644 alice-strace/linux/sparc64/errnoent1.h create mode 100644 alice-strace/linux/sparc64/errnoent2.h create mode 100644 alice-strace/linux/sparc64/ioctlent.h.in create mode 100644 alice-strace/linux/sparc64/ioctlent1.h create mode 100644 alice-strace/linux/sparc64/ioctlent2.h create mode 100644 alice-strace/linux/sparc64/signalent.h create mode 100644 alice-strace/linux/sparc64/signalent1.h create mode 100644 alice-strace/linux/sparc64/signalent2.h create mode 100644 alice-strace/linux/sparc64/syscall1.h create mode 100644 alice-strace/linux/sparc64/syscallent.h create mode 100644 alice-strace/linux/sparc64/syscallent1.h create mode 100644 alice-strace/linux/sparc64/syscallent2.h create mode 100644 alice-strace/linux/subcall.h create mode 100644 alice-strace/linux/syscall.h create mode 100644 alice-strace/linux/tile/errnoent1.h create mode 100644 alice-strace/linux/tile/ioctlent.h.in create mode 100644 alice-strace/linux/tile/ioctlent1.h create mode 100644 alice-strace/linux/tile/signalent1.h create mode 100644 alice-strace/linux/tile/syscallent.h create mode 100644 alice-strace/linux/tile/syscallent1.h create mode 100644 alice-strace/linux/ubi-user.h create mode 100644 alice-strace/linux/x32/errnoent.h create mode 100644 alice-strace/linux/x32/errnoent1.h create mode 100644 alice-strace/linux/x32/ioctlent.h.in create mode 100644 alice-strace/linux/x32/ioctlent1.h create mode 100644 alice-strace/linux/x32/signalent.h create mode 100644 alice-strace/linux/x32/signalent1.h create mode 100644 alice-strace/linux/x32/syscallent.h create mode 100644 alice-strace/linux/x32/syscallent1.h create mode 100644 alice-strace/linux/x86_64/errnoent1.h create mode 100644 alice-strace/linux/x86_64/errnoent2.h create mode 100644 alice-strace/linux/x86_64/gentab.pl create mode 100644 alice-strace/linux/x86_64/ioctlent.h.in create mode 100644 alice-strace/linux/x86_64/ioctlent1.h create mode 100644 alice-strace/linux/x86_64/ioctlent2.h create mode 100644 alice-strace/linux/x86_64/signalent1.h create mode 100644 alice-strace/linux/x86_64/signalent2.h create mode 100644 alice-strace/linux/x86_64/syscallent.h create mode 100644 alice-strace/linux/x86_64/syscallent1.h create mode 100644 alice-strace/linux/x86_64/syscallent2.h create mode 100644 alice-strace/linux/xtensa/ioctlent.h.in create mode 100644 alice-strace/linux/xtensa/syscallent.h create mode 100644 alice-strace/loop.c create mode 100644 alice-strace/m4/includedir.m4 create mode 100644 alice-strace/m4/long_long.m4 create mode 100644 alice-strace/m4/stat.m4 create mode 100644 alice-strace/m4/statfs.m4 create mode 100644 alice-strace/m4/warnings.m4 create mode 100644 alice-strace/mem.c create mode 100755 alice-strace/missing create mode 100644 alice-strace/mtd.c create mode 100644 alice-strace/net.c create mode 100644 alice-strace/pathtrace.c create mode 100644 alice-strace/pretty_print_stack_trace.py create mode 100644 alice-strace/process.c create mode 100644 alice-strace/quota.c create mode 100644 alice-strace/resource.c create mode 100644 alice-strace/scsi.c create mode 100644 alice-strace/signal.c create mode 100755 alice-strace/signalent.sh create mode 100644 alice-strace/sock.c create mode 100644 alice-strace/stream.c create mode 100644 alice-strace/syscall.c create mode 100755 alice-strace/syscallent.sh create mode 100644 alice-strace/system.c create mode 100644 alice-strace/term.c create mode 100644 alice-strace/tests/Makefile.am create mode 100644 alice-strace/tests/Makefile.in create mode 100755 alice-strace/tests/alice-strace-f create mode 100644 alice-strace/tests/init.sh create mode 100755 alice-strace/tests/net create mode 100644 alice-strace/tests/net-accept-connect.c create mode 100755 alice-strace/tests/ptrace_setoptions create mode 100755 alice-strace/tests/qual_syscall create mode 100755 alice-strace/tests/stat create mode 100644 alice-strace/time.c create mode 100644 alice-strace/util.c create mode 100644 alice-strace/vsprintf.c create mode 100644 alice-strace/xlate.el create mode 100644 alice.py create mode 100644 alicedefaultexplorer.py create mode 100644 alicedefaultfs.py create mode 100644 alicestruct.py create mode 100755 bin/alice-check create mode 100755 bin/alice-record create mode 100755 doc/compile.py create mode 100644 doc/doc.cfg create mode 100644 doc/doc.tex create mode 100644 example/git/README.txt create mode 100755 example/git/git_checker.sh create mode 100755 example/git/git_workload.sh create mode 100644 example/toy/toy.c create mode 100755 example/toy/toy_checker.py create mode 100755 example/toy/toy_workload.sh diff --git a/README.md b/README.md index 49016c5..8faa4b1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,311 @@ -alice -===== +## ALICE: Application-Level Intelligent Crash Explorer + +This is a user documentation of the ALICE tool, which can be used to +discover “crash vulnerabilities” in applications. Crash vulnerabilities +are problems that get exposed by a sudden power loss or system crash +while the application is running, and the application cannot recover +correctly after rebooting the machine. ALICE focuses on single-node +applications that run atop file systems. ALICE is different from similar +tools in that it aims to find vulnerabilities that might occur across +all file systems, including future ones. ALICE is also unique in +targeting vulnerabilities associated with different source-code lines of +the application, instead of checking the application’s correctness atop +arbitrarily (or systematically, but less useful) simulated crash +scenarios. ALICE is designed to be extensible: both how it checks +different source lines, and the combined behavior it assumes of +underlying file systems, can be customized. The ALICE tool is a +by-product of a research project +([http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html](http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html)) +in the University of Wisconsin-Madison. + +## Chapter 1: Installation + +ALICE was tested to work on Ubuntu-12.02, and should be expected to work +on similar (i.e., Linux-like) operating systems. The following are +specific requirements: + + 1. Python-2.7, as the default version of python invoked via + /usr/bin/env python. + 2. Standard software build tools, such as gcc and GNU Make. + 3. The libunwind libraries, installable in Ubuntu-12.02 using apt-get + install libunwind7. + +The following are the steps to install ALICE: + + 1. Download the most recent source-code tarball of ALICE, and untar it. + This should produce a directory named alice. + 2. Set the environmental variable ALICE_HOME to point to the alice + directory (i.e., the untared directory). For example, this can be + done by adding the line export ALICE_HOME=/wherever-untarred/alice + to your .bashrc file. + 3. Set the PATH environmental variable to include the alice/bin + directory. For example, this can be done by adding the line export + PATH=$PATH:/wherever-untarred/alice/bin to your .bashrc file. + 4. Install the alice-strace tracing framework by moving into the + alice/alice-strace directory, and running ./configure; make; make + install; + +## Chapter 2: Basic Usage + +The typical workflow for using ALICE has two steps. First, an +application workload is run, and a trace of its activities are recorded. +Second, ALICE is given this trace and a checker script (explained +later); ALICE explores the trace and displays discovered +vulnerabilities. This documentation explains the typical usage of ALICE +by using a toy application. + +#### Toy application + +The toy application can be found in alice/example/toy/toy.c; the reader +is encouraged to go through it. The application does the following: + + 1. It updates a file called file1, changing the contents of the file + from “hello” to “world”. The update is done using a typical “write + to temporary file and rename” sequence, so that the contents are + updated atomically. Immediately after updating, the application + prints a message to the user’s terminal (the user can then + supposedly assume that the file has been updated, and that the file + will contain “world” even if a power loss happens). + 2. It creates two links to the file, link1 and link2. The (imaginary) + semantics of the toy application require both these links to be + created atomically (i.e., if a power loss happens, either both links + exist or neither do not). + +#### Step 1: Running the application and recording a trace + +A script that runs the application and records a trace, along with all +initialization setup, can be found in +alice/example/toy/toy_workload.sh; the reader is encouraged to go +through it. + +To perform Step 1, two directories are needed. The first, the workload +directory, is where the files of the application will be stored. The +application, as it runs, will modify the workload directory and its +contents. For the toy application, this is the place where file1, link1, +and link2, are placed. The toy_workload.sh script first creates the +workload directory, workload_dir, and then initializes it with the file +file1 containing “hello”. + +The other needed directory, traces directory is for storing the +(multiple) traces that are recorded as the application is run. The +toy_workload.sh script next creates this directory, traces_dir. After +setting up the workload directory and the traces directory, the +toy_workload.sh script does a few more initialization things: compiling +the toy.c application, and cding into workload_dir so that the toy +application can be run within there. + +The toy_workload.sh script finally runs the application and records +traces, by issuing the following command: + +alice-record --workload_dir . \ + --traces_dir ../traces_dir \ + ../a.out + +If the reader is familiar with the strace utility, the above command is +similar to an invocation of strace: alice-record is a script that +records traces, while ../a.out is the actual application to be run (the +process and all subprocesses of ../a.out are traced, similar to strace +with the -ff option). The alice-record script requires two mandatory +arguments: the workload directory and the traces directory (alice-record +takes one more optional argument, --verbose, to control verbosity). + +#### Step 2: Supply ALICE with the trace and the checker, and get back +list of vulnerabilities + +Step 2 requires the user to supply ALICE with a checker script. The +checker script will be invoked multiple times by ALICE, each invocation +corresponding to a (simulated) system crash scenario that could have +happened while the application was running in Step 1. During each +invocation, the checker script will be given a directory that reflects +the state of the workload directory if the (simulated) crash had really +happened. If the given crashed-state workload directory has an expected +(i.e., consistent) set of files, the checker script should exit with +status zero, and should exit with a non-zero status otherwise. + +ALICE supplies the checker script with two command-line arguments. The +first is the path to the crashed-state workload directory. The second +command-line argument to the checker script is the path to an stdout +file. The stdout file contains all the messages that had been printed to +the user’s terminal at the time of the crash (corresponding to the +supplied crashed-state workload directory), and can be used by the +checker to check for durability, as explained below. Note that the +crashed-state workload directory supplied by ALICE might differ from the +original workload directory in Step 1. Hence, for applications that +expect the absolute path of the contents within the workload directory +to not have changed (a small subset of applications in our experience), +the checker script needs to move the supplied directory to the original +directory, and then operate atop the original directory. + +The checker script for the toy application can be found in +alice/example/toy/toy_checker.py, and the reader is encouraged to go +through it. The script first changes the current working directory into +the crashed-state directory supplied by ALICE, and reads all the +messages printed in the terminal at the time of the crash by reading the +stdout file supplied by ALICE. If the application has printed the +“Updated file1 to world” message, the checker script makes sure that +file1 contains “world”; otherwise, the checker script makes sure that +file1 contains either “hello” or “world”. The checker script then makes +sure that either link1 and link2 are both present, or are both not +present. If any of the checked conditions do not hold, the checker +script results in an assertion failure, thus exiting with a non-zero +status (and thus informing ALICE that the application will fail if the +simulated crash scenario happens in real). + +After writing the checker script, the user can invoke the alice-check +script to actually run ALICE and get the list of vulnerabilities. The +reader is encouraged to run the following command from within the +alice/example/toy directory, to get a list of vulnerabilities discovered +in the toy application (after running toy_workload.sh first). + +alice-check --traces_dir=traces_dir --checker=./toy_checker.py + +The alice-check script has the following arguments: + + traces_dir + ~ Mandatory. The traces directory, from Step 1. + checker + ~ Mandatory. The checker script. + threads + ~ Optional, default is 4. ALICE invokes checker scripts parallely, + each checker script given a separate crashed-state directory to work + on. Some applications do not allow multiple simultaneous + invocations, and might require this option to be set to 1. + debug_level + ~ Optional, default is 0. Verbosity of warnings, can be 0, 1, or 2. + ignore_mmap + ~ Optional, default is False. The current version of ALICE does not + trace mmap-writes, and cannot correctly work with application + workloads that use memory mapping to modify relevant files (see + caveats and limitations). If the recorded trace during Step 1 + involves a writeable mmap() to a seemingly relevant file, + alice-check aborts execution by default. However, some application + workloads use mmap() only on files that are irrelevant to crash + consistency, for example to implement a shared-memory lock dealing + with multi-process concurrency synchronization. This option can be + set to True if the user is sure that the mmap()s observed while + running the application workload are irrelevant to finding crash + vulnerabilities. Some database applications use mmap() for + concurrency control, even when configured not to use mmap() for + otherwise accessing files, and require this option. + +#### Understanding ALICE’s output + +ALICE first outputs a list of list of the logical operations that form +the update protocol used by the application workload invoked in Step 1. +The logical operations displayed is similar to a system-call trace, +except that it is easier to understand, for example substituiting file +names instead of file descriptor numbers. + +ALICE then displays any discovered vulnerabilities. Vulnerabilities are +displayed in two ways: dynamic vulnerabilities, relating to different +operations in the update protocol, and static vulnerabilities, relating +to source-code lines. The proper display of static vulnerabilities +requires the originally traced application to have debugging symbols; +also, ALICE associates each logical operation to one of the stack frames +in the logical operation’s stack trace to display static +vulnerabilities, and this association can sometimes be faulty. + +## Chapter 3: Customizing, Extending, and Hacking + +ALICE is designed to be extensible. The current version of ALICE strips +off many features that were previously implemented, in hopes that a +smaller code base promotes extensions. However, the current version is +also not sufficiently commented, and does not follow some good coding +practices; a well-commented version of the software might be released in +the future if users shows interest. + +To extend ALICE, readers are required to go through our publication +([http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html](http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html)) +to understand ALICE’s design and philosophy. Note that there is some +terminology difference between the publication and ALICE’s source code; +in particular, logical operations discussed in the publication +correspond to micro operations in the source code, while micro +operations in the publication correspond to disk operations in the +source code. + +ALICE’s default exploration strategy, which investigates the ordering +and atomicity of each system call and reports any associated +vulnerabilities, is coded in alice/alicedefaultexplorer.py, and can be +easily changed. The alicedefaultexplorer.py code is complicated since it +displays static vulnerabilities and invokes checkers in multiple +threads. A functionally equivalent exploration strategy can be simpler. + +ALICE’s default APM is coded in alice/alicedefaultfs.py, and can be +easily changed. The alicedefaultfs.py code is complicated since it +models a file system that can be configured to split file operations in +different granularities. A functionally equivalent file system (with a +single granularity) can be simpler. + +Other than the extensions discussed till now, users might try to add +support for more system calls, file attributes, symbolic links, or other +such details, in ALICE. Relevant to these, the _aliceparsesyscalls.py +script contains code that converts system calls into logical operations, +while the replay_disk_ops() function from the alice.py script contains +code that re-constructs a directory from a given list of micro-ops. + +## Chapter 4: Caveats and Limitations + +ALICE is a safe, but not a complete tool. That is, the application might +have additional vulnerabilities than those discovered and reported. +ALICE is thus not aligned towards comparing the correctness of different +applications; specifically, any comparisons when not using equivalent +workloads and checkers can easily produce confusing, wrong inferences. +Also, any vulnerability displayed by ALICE might already be known to an +application developer: the application documentation might explicitly +require that the underlying file system not behave in those ways that +will expose the vulnerability, or might simply not provide those +guarantees that are being checked by the checker. + +The default file-system model (APM) used by ALICE is designed to also +find vulnerabilities that can get exposed by future file systems; some +crash scenarios that are possible with the default model do not happen +in common current file systems. Also, ALICE’s output (a list of +vulnerabilities) is only designed to show the number of source lines +that require ordering or atomicity. It is thus erraneous to directly +correlate the number of vulnerabilities shown by ALICE with current +real-world impact. + +ALICE does not currently attempt to deal with any file attributes +(including modification time) other than the file size, or with the +FD_CLOEXEC and O_CLOEXEC facilities. If the application’s logic (that +is invoked in the workload and the checker) depends on these, ALICE’s +output is probably wrong. Support for a few rarely-used system calls is +also lacking; warning or error messages are displayed by ALICE if the +application workload had invoked such calls. The situation for symlinks +is similar; while the current version of ALICE attempts to support them +slightly, if the application logic depends on symlinks, ALICE’s output +might be wrong. + +The current version of ALICE also does not support tracing memory-mapped +writes; applications that use such writes as a part of their (relevant) +update protocol cannot use ALICE. Note that a version of ALICE used in +our published research paper +([http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html](http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html)) +traced memory-mapped writes, but support was removed in the interest of +distributability. + +Adding support for file attributes, CLOEXEC, symlinks, and mmap() writes +does not require any changes to the design of ALICE, and might be done +in future versions if users deem them helpful. + +## Chapter 5: Credits, Acknowledgements, and Contact Information + +Thanumalayan Sankaranarayana Pillai, Vijay Chidambaram, Ramnatthan +Alagappan, and Samer Al-Kiswany were involved in various aspects of +design, coding, and testing of the ALICE tool. Thanumalayan +Sankaranarayana Pillai (madthanu@cs.wisc.edu) is the primary author, and +might serve to be the best contact for bug reports, feature requests, or +other general discussions. + +The ALICE tool is a by-product of a research project +([http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html](http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html)) +in the University of Wisconsin-Madison, and due credit must be given to +all parties who were involved in or contributed to the project. + +The alice-strace tracing framework is a slight customization of the +strace tool +([http://sourceforge.net/projects/strace/](http://sourceforge.net/projects/strace/)), +along with some code adapted from strace-plus +([https://code.google.com/p/strace-plus/](https://code.google.com/p/strace-plus/)). +Credits must be given to the authors and contributors of strace and +strace-plus. diff --git a/_aliceautotest.py b/_aliceautotest.py new file mode 100644 index 0000000..b02b7f6 --- /dev/null +++ b/_aliceautotest.py @@ -0,0 +1,589 @@ +#!/usr/bin/python2.7 + +import argparse +import sys +import os +sys.path.append(os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/upstream_dependencies/')) +import BitVector +from collections import defaultdict +import itertools +import pickle +import pprint +from sets import Set + +# I use system call and operation interchangeably in the script. Both are used +# to denote something like fsync(3) or write(4,"hello", 5) in the input trace +# file. + +# TODO: Change script to work correctly with multiple threads. Right now script +# parses thread value, but doesn't really use that value anywhere. + +# Parse input arguments. +parser = argparse.ArgumentParser() +parser.add_argument('--op_file', dest = 'op_file', type = str, default = False) +parser.add_argument("-b","--brute_force_verify", help="Verify combinations via\ + brute force", + action="store_true") +parser.add_argument("-p","--print_dependencies", help="Print dependencies", + action="store_true") +parser.add_argument("-v","--verbose", help="Print dependency calculations.", + action="store_true") +parser.add_argument("-vv","--very_verbose", help="Print internal re-ordering calculations.", + action="store_true") +#args = parser.parse_args() + +# This causes problems on my mac. Keeping for Thanu's repo. +if __name__ == '__main__': + args = parser.parse_args() +else: + args = parser.parse_args([]) + +if args.very_verbose: + args.verbose = True + +# The list of syscalls we are interested in. +# Interesting parameters. +# write: offset, count +# sync: offset, count +# truncate: initial_size, final_size +calls_of_interest = ["write", "sync", "delete_dir_entry", "create_dir_entry", "truncate"] +# The list of syscalls treated as ordering points. +# Sync parameters. +# Offset, count (bytes) +# fsync: offset = 0, count = full size of file. +ordering_calls = ["sync"] +# Metadata calls. +metadata_calls = ["create_dir_entry", "delete_dir_entry"] + +# Set of all current dirty writes for a file. +dirty_write_ops = defaultdict(set) +dirty_write_ops_inode = defaultdict(set) + +# Latest global fsync (on any file). +latest_fsync_on_any_file = None + +# Map inodes to filenames (one inode can map to many names) and filenames to +# inode, +inode_to_filenames = defaultdict(set) +filename_to_inode = {} + +# Test whether the first path is a parent of the second. +def is_parent(path_a, path_b): + return path_b.startswith(path_a) + +# Class to encapsulate operation details. +class Operation: + + # All the setup + def __init__(self, micro_op, micro_op_id): + global inode_to_filenames + global filename_to_inode + + #print(micro_op) + self.syscall = micro_op.op + self.micro_op = micro_op + # Set of ops that depend on this op: dropping this op means dropping those ops + # also. + self.inode = micro_op.inode + self.total_num_combos = 0 + # Get the filename for metadata calls. + if micro_op.op in metadata_calls: + if micro_op.op in ["create_dir_entry", "delete_dir_entry"]: + self.parent = micro_op.parent + self.filename = micro_op.entry + # Set up the maps + filename_to_inode[self.filename] = self.inode + inode_to_filenames[self.inode].add(self.filename) + else: + # Need to consult the map to get the filename. + # Note that an inode can be mapped to many names. We just get the + # first name in the list. It shouldn't matter for most operations. + for x in inode_to_filenames[self.inode]: + #print("setting filename to " + x) + self.filename = x + break + # Set offset and count for certain system calls. + if micro_op.op in ["write", "sync"]: + self.offset = micro_op.offset + self.count = micro_op.count + if micro_op.op in ["truncate"]: + self.final_size = micro_op.final_size + + # The file specific ID for each inode + op_index = (self.inode, self.syscall) + self.micro_op_id = micro_op_id + # The set of ops that this is dependent on. + self.deps = Set() + # Update dirty write collection if required. + self.update_dirty_write_collection() + # Finally, calculate dependencies + self.calculate_dependencies() + # Clear write dependencies if required. + self.clear_dirty_write_collection() + + # Check if this operation falls into a sync range. + def is_included_in_sync_range(self, offset, count): + start = offset + end = start + count + + if self.syscall == "write": + write_start = self.offset + write_end = self.offset + self.count + if write_start >= start and write_end <= end: + return True + + if self.syscall == "truncate": + if self.final_size >= start and self.final_size <= end: + return True + + if self.syscall in ["create_dir_entry", "delete_dir_entry"]: + return True + + return False + + # This updates the dirty write collection. + def update_dirty_write_collection(self): + global dirty_write_ops + global dirty_write_ops_inode + if self.syscall in ["write", "truncate"]: + dirty_write_ops_inode[self.inode].add(self) + # If this is a create/dir operation, the operation is actually on the + # parent inode. + if self.syscall in ["create_dir_entry", "delete_dir_entry"]: + dirty_write_ops_inode[self.parent].add(self) + + # Clears dirty write collection on fsync. + # TODO: handle file_sync_range correctly. Currently treating as + # the same as fdatasync. + def clear_dirty_write_collection(self): + global dirty_write_ops + global dirty_write_ops_inode + global latest_fsync_on_any_file + if self.syscall in ["sync"]: + # Remove the dirty writes which will be flushed by this sync. + set_of_dops_to_remove = set() + for dop in dirty_write_ops_inode[self.inode]: + if dop.is_included_in_sync_range(self.offset, self.count): + set_of_dops_to_remove.add(dop) + + for dop in set_of_dops_to_remove: + dirty_write_ops_inode[self.inode].remove(dop) + + latest_fsync_on_any_file = self + + # This method returns a nice short representation of the operation. This + # needs to be updated as we support new operations. See design doc for what + # the representation is. + def get_short_string(self): + rstr = "" + if self.syscall == "write": + rstr += "W" + elif self.syscall == "create_dir_entry": + rstr += "L" + elif self.syscall == "delete_dir_entry": + rstr += "U" + elif self.syscall in ["sync"]: + rstr += "F" + elif self.syscall == "truncate": + rstr += "T" + + rstr += str(self.micro_op_id) + if self.syscall in ["create_dir_entry"]: + rstr += "(p= " + str(self.parent) + ", " + self.filename + ", c=" + str(self.inode) + elif self.syscall in ["delete_dir_entry"]: + rstr += "(p= " + str(self.parent) + ", " + self.filename + ", c=" + str(self.inode) + else: + rstr += "(" + str(self.inode) + + rstr += ")" + return rstr + + # This method calculates the existential dependencies of an operation: + # basically, we can only include this operation in an combination if one of + # the conditions for this operation evaluates to true. + def calculate_dependencies(self): + + # If this is an fsync, then it depends on all the dirty writes to this + # file previously, which fall within the sync range. + if self.syscall in ["sync"]: + for wop in dirty_write_ops_inode[self.inode]: + if wop.is_included_in_sync_range(self.offset, self.count): + self.deps = self.deps | wop.deps + self.deps.add(wop) + + # The fsync dependency. + # Each operation on a file depends on the last fsync to the file. The + # reasoning is that this operation could not have happened without that + # fsync happening. + # CLARIFY: does the op depend on the last fsync *on the same file* or + # just the last fsync (on any file) in the thread? + # fsync: offset = 0, count = full size of file. + if latest_fsync_on_any_file: + self.deps = self.deps | latest_fsync_on_any_file.deps + self.deps.add(latest_fsync_on_any_file) + + # Store the notation of dependencies as a bit vector. + def store_deps_as_bit_vector(self, total_len): + self.deps_vector = BitVector.BitVector(size = total_len) + # Set the relevant bits + for x in self.deps: + self.deps_vector[x.micro_op_id] = 1 + + # Add a dependecy to the operation. + def add_dep(self, op): + self.deps = self.deps | op.deps + self.deps.add(op) + +def test_validity(op_list): + valid = True + # Dependence check + op_set = Set(op_list) + for op in op_list: + if not op.deps <= op_set: + return False + return True + +# Print the whole thing on one line instead of as a list. +def print_op_string(op_combo): + str = "" + for x in op_combo: + str += x.get_short_string() + " " + print(str) + +# The brute force method. +def try_all_combos(op_list, limit = None, limit_tested = 10000000): + ans_list = [] + clist = op_list[:] + total_size = len(op_list) + set_count = 0 + o_count = 0 + for i in range(1, total_size + 1): + for op_combo in itertools.combinations(op_list, i): + o_count += 1 + assert(o_count <= limit_tested) + if limit != None and set_count >= limit: + return ans_list + if test_validity(op_combo): + mop_list = [] + for xx in op_combo: + mop_list.append(xx.micro_op) + #ans_list.append(mop_list) + ans_list.append(op_combo) + set_count += 1 + return get_micro_ops_set(ans_list) + +# Globals for combo generation. +generated_combos = set() +max_combo_limit = None +max_combos_tested = 10000000 +num_recursive_calls = 0 + +def get_micro_ops_set(vijayops_set): + return [[x.micro_op for x in combo] for combo in vijayops_set] + +# Class to contain all the test class suites. +class ALCTestSuite: + # Load it up with a list of micro ops + def __init__(self, micro_op_list): + global dirty_write_ops, dirty_write_ops_inode + global latest_fsync_on_any_file, inode_to_filenames, filename_to_inode + + # Reset all the global things + dirty_write_ops = defaultdict(set) + dirty_write_ops_inode = defaultdict(set) + latest_fsync_on_any_file = None + inode_to_filenames = defaultdict(set) + filename_to_inode = {} + + self.op_list = [] + self.generated_combos = set() + self.max_combo_limit = None + self.max_combos_tested = 10000000 + self.num_recursive_calls = 0 + self.total_len = 0 + self.id_to_micro_op_map = {} + + for micro_op in micro_op_list: + #print(micro_op) + assert(micro_op.op in calls_of_interest) + x = Operation(micro_op, len(self.op_list)) + self.id_to_micro_op_map[len(self.op_list)] = x + self.op_list.append(x) + + self.total_len = len(self.op_list) + + # Store the dependencies as bit vectors. + for op in self.op_list: + op.store_deps_as_bit_vector(self.total_len) + + # == External == + # Test if this combo is valid. Combo is specified using the id numbers of + # the operations in the combo. + # + # Input: combo ids (set or list of operation ids) + # Output: Boolean as to whether this is a valid combo. + def test_combo_validity(self, combo): + combo_to_test = [] + for op_id in combo: + combo_to_test.append(self.id_to_micro_op_map[op_id]) + validity = test_validity(combo_to_test) + return validity + + # The recursive function that calculates all the combos. + # The op_list is treated as a global constant. + # Each invocation of the function has the prefix (0 to n-1) that has been + # processed plus the ops that have been dropped in that prefix. + def generate_combos(self, start, end, drop_set): + # Check limits + self.num_recursive_calls += 1 + assert(self.num_recursive_calls <= self.max_combos_tested) + # Return if we have enough combos. + if self.max_combo_limit and len(self.generated_combos) >= self.max_combo_limit: + return + + # Create the combo set. + op_set_so_far = Set(self.op_list[start:(end+1)]) - drop_set + op_set_so_far = sorted(op_set_so_far, key=lambda Operation: + Operation.micro_op_id) + if len(op_set_so_far): + self.generated_combos.add(tuple(op_set_so_far)) + + # Return if we are at the end of the op_list. + if end == (self.total_len - 1): + return + + # Build up a local drop_set + local_drop_set = drop_set.copy() + + # Look for candidates beyond the end position. + for i in range(end + 1, self.total_len): + if len(self.op_list[i].deps & local_drop_set) == 0: + # Can be included + self.generate_combos(start, i, local_drop_set) + # Add this op to the local drop set for the next iteration. + local_drop_set.add(self.op_list[i]) + + # The recursive function that calculates the total number of combos. + # The op_list is treated as a global constant. + # Each invocation of the function has the prefix (0 to n-1) that has been + # processed plus the ops that have been dropped in that prefix. + def count_combos(self, start, end, drop_vector): + if end >= start: + self.total_num_combos += 1 + + # Return if we are at the end of the op_list. + if end == (self.total_len - 1): + return + + # Build up a local drop_set + local_drop_vector = drop_vector.deep_copy() + + # Look for candidates beyond the end position. + for i in range(end + 1, self.total_len): + if (self.op_list[i].deps_vector & local_drop_vector).count_bits_sparse() == 0: + # Can be included + self.count_combos(start, i, local_drop_vector) + # Add this op to the local drop vector for the next iteration. + local_drop_vector[i] = 1 + + # == External == + # Get all the combos. + # + # Input: maximum number of combos to be returned (limit) and tested (limit_tested) + # Output: list of items - each item is a combo (array of micro ops) + def get_combos(self, limit = None, limit_tested = 10000000): + # Set limits + self.max_combo_limit = limit + self.max_combos_tested = limit_tested + self.num_recursive_calls = 0 + + # Generate all the combos + self.total_len = len(self.op_list) + self.generate_combos(0, -1, Set()) + + # If we want to debug, return the op list (not micro ops) + if args.very_verbose: + return self.generated_combos + else: + return get_micro_ops_set(self.generated_combos) + + # == External == + # Return the number of combos. + # + # Input: maximum number of combos to be returned (limit) and tested (limit_tested) + # Output: Number of combos possible for given disk op set with given + # constraints. + def count_all_combos(self): + self.total_len = len(self.op_list) + self.total_num_combos = 0 + bv = BitVector.BitVector(size = self.total_len) + self.count_combos(0, -1, bv) + return self.total_num_combos + + # == External == + # Drop a list of operations from the combination. This can result in + # needing to drop more operations (which depended on the operations we just + # dropped). + # + # Input: list of operation ids to drop + # Output: list of micro-ops that result after dropping the input list. + def drop_list_of_ops(self, op_id_list): + op_set = Set(self.op_list) + drop_set = Set() + for op_id in op_id_list: + # Drop op and its dep + drop_op = self.id_to_micro_op_map[op_id] + drop_set.add(drop_op) + # Recurse until no new ops are added to drop_set. + prevlen = len(drop_set) + droplen = 0 + while droplen != prevlen: + prevlen = len(drop_set) + for op in op_set: + if op.deps & drop_set: + drop_set.add(op) + droplen = len(drop_set) + new_op_set = op_set - drop_set + # assert(test_validity(new_op_set)) + # Return as micro op list + return [x.micro_op_id for x in new_op_set] + + # == External == + # Keep a list of operations in the combination. This can result in needing + # to keep all their dependencies. + # + # Input: list of operation ids to keep + # Output: list of micro-ops that are needed to keep the input list. + def keep_list_of_ops(self, op_id_list): + op_set = Set(self.op_list) + keep_set = Set() + for op_id in op_id_list: + # Drop op and its dep + keep_op = self.id_to_micro_op_map[op_id] + keep_set.add(keep_op) + # Get all the deps of all the ops in the keep set. + dep_set = Set() + for op in keep_set: + dep_set = dep_set | op.deps + keep_set = keep_set | dep_set + assert(test_validity(keep_set)) + # Return as micro op list + return [x.micro_op_id for x in keep_set] + + # Pretty print an op list with the representation for each operation. + def print_op_list(self): + for op in self.op_list: + print(op.get_short_string()) + + # Print deps. + def print_deps(self): + for op in self.op_list: + print(op.get_short_string() + "depends on:") + print_op_string(op.deps) + + # == External == + # + # Add a list of dependencies to the list already computed. + # + # Input: list of tuples. Each tuple (X, Y) indicates that X should now + # depend on Y. To include X in a combo, you also need Y. + # X and Y are op ids. + # Output: None. + def add_deps_to_ops(self, dep_list): + dep_list = sorted(dep_list) + for dep_tuple in dep_list: + x_id = dep_tuple[0] + y_id = dep_tuple[1] + x_op = self.id_to_micro_op_map[x_id] + y_op = self.id_to_micro_op_map[y_id] + x_op.add_dep(y_op) + + # Recompute all the dependencies and bit vectors. + for op in self.op_list: + for dep_op in op.deps: + op.deps = op.deps | dep_op.deps + op.store_deps_as_bit_vector(self.total_len) + +# Driver main showing how the code is meant to be used. +if __name__ == '__main__': + micro_op_list = pickle.load(open(args.op_file, 'r')) + + testSuite = ALCTestSuite(micro_op_list) + combos = testSuite.get_combos(5000) + print("Number of combos: " + str(len(combos))) + + # Alternatively, you can just get the number of combos directly. + # This doesn't generate all the sets, and is much faster. + # print("Number of combos: " + str(testSuite.count_all_combos())) + + if args.very_verbose: + for x in combos: + print_op_string(x) + + # Test case of how to use test_combo_validity + combo_list = [1, 2, 51] + print(testSuite.test_combo_validity(combo_list)) + combo_list = [1, 2, 3] + print(testSuite.test_combo_validity(combo_list)) + + # Testing out the drop list functionality for single item list. + for i in range(0, len(testSuite.op_list)): + op_id_list = [] + op_id_list.append(i) + result_set = testSuite.drop_list_of_ops(op_id_list) + print(str(i) + ": " + str(len(result_set))) + + # Test for random combos. + op_id_list = [] + op_id_list.append(2) + op_id_list.append(5) + op_id_list.append(40) + result_set = testSuite.drop_list_of_ops(op_id_list) + print("Drop list answer: " + str(len(result_set))) + + # Testing out the keep list functionality for single item list. + for i in range(0, len(testSuite.op_list)): + op_id_list = [] + op_id_list.append(i) + result_set = testSuite.keep_list_of_ops(op_id_list) + print(str(i) + ": " + str(len(result_set))) + + # Testing keep list functionality. + op_id_list = [] + op_id_list.append(2) + op_id_list.append(5) + op_id_list.append(40) + result_set = testSuite.keep_list_of_ops(op_id_list) + print("Keep list answer: " + str(len(result_set))) + + # Testing adding lots of dependencies and seeing if it reduces the number + # of combos. + testSuite2 = ALCTestSuite(micro_op_list[:10]) + before_combo = testSuite2.count_all_combos() + list_of_deps = [] + for i in range(0, 8): + list_of_deps.append((9, i)) + list_of_deps.append((8, i)) + testSuite2.add_deps_to_ops(list_of_deps) + after_combo = testSuite2.count_all_combos() + print(before_combo, after_combo) + + # Print out the list of operations + if args.very_verbose: + print("List of operations:") + testSuite.print_op_list() + + if args.print_dependencies or args.very_verbose: + testSuite.print_deps() + + if args.brute_force_verify: + all_combos = try_all_combos(op_list) + mismatch_flag = False + print("Mis-matches:") + for x in combos: + if x not in all_combos: + print_op_string(x) + mismatch_flag = True + + if not mismatch_flag: + print("Perfect Match!") diff --git a/_aliceparsesyscalls.py b/_aliceparsesyscalls.py new file mode 100644 index 0000000..f16fa2b --- /dev/null +++ b/_aliceparsesyscalls.py @@ -0,0 +1,913 @@ +import pickle +import csv +import sys +import commands +import uuid +import copy +import os +import traceback +import pprint +from _aliceutils import * +from alicestruct import Struct +from collections import namedtuple + +innocent_syscalls = ["_exit","pread","_newselect","_sysctl","accept","accept4","access","acct","add_key","adjtimex", +"afs_syscall","alarm","alloc_hugepages","arch_prctl","bind","break","brk","cacheflush", +"capget","capset","clock_getres","clock_gettime","clock_nanosleep","clock_settime", +"connect","create_module","delete_module","epoll_create","epoll_create1","epoll_ctl","epoll_pwait", +"epoll_wait","eventfd","eventfd2","exit","exit_group","faccessat","fadvise64", +"fadvise64_64","fgetxattr","flistxattr","flock","free_hugepages","fstat","fstat64", +"fstatat64","fstatfs","fstatfs64","ftime","futex","get_kernel_syms","get_mempolicy","get_robust_list", +"get_thread_area","getcpu","getcwd","getdents","getdents64","getegid","getegid32","geteuid", +"geteuid32","getgid","getgid32","getgroups","getgroups32","getitimer","getpeername","getpagesize", +"getpgid","getpgrp","getpid","getpmsg","getppid","getpriority","getresgid","getresgid32", +"getresuid","getresuid32","getrlimit","getrusage","getsid","getsockname","getsockopt","gettid", +"gettimeofday","getuid","getuid32","getxattr","gtty","idle","init_module","inotify_add_watch", +"inotify_init","inotify_init1","inotify_rm_watch","ioperm","iopl","ioprio_get","ioprio_set", +"ipc","kexec_load","keyctl","kill","lgetxattr","listen","listxattr","llistxattr", +"lock","lookup_dcookie","lstat","lstat64","madvise","madvise1","mbind","migrate_pages", +"mincore","mlock","mlockall","move_pages","mprotect","mpx", +"mq_getsetattr","mq_notify","mq_open","mq_timedreceive","mq_timedsend","mq_unlink","msgctl","msgget", +"msgrcv","msgsnd","munlock","munlockall","nanosleep","nfsservctl","nice","oldfstat", +"oldlstat","oldolduname","oldstat","olduname","pause","pciconfig_iobase","pciconfig_read","pciconfig_write", +"perf_event_open","in","personality","phys","pipe","pipe2","pivot_root","poll", +"ppoll","prctl","pread64","renamed","preadv","prlimit","prof","profil", +"pselect6","ptrace","putpmsg","query_module","quotactl","read","readahead","readdir", +"readlink","readlinkat","readv","reboot","recv","recvfrom","recvmsg","recvmmsg", +"request_key","restart_syscall","rt_sigaction","rt_sigpending","rt_sigprocmask","rt_sigqueueinfo","rt_sigreturn", +"rt_sigsuspend","rt_sigtimedwait","rt_tgsigqueueinfo","sched_get_priority_max","sched_get_priority_min","sched_getaffinity","sched_getparam","sched_getscheduler", +"sched_rr_get_interval","sched_setaffinity","sched_setparam","sched_setscheduler","sched_yield","security","select","semctl", +"semget","semop","semtimedop","send","sendmsg","sendto", +"set_mempolicy","set_robust_list","set_thread_area","set_tid_address","set_zone_reclaim","available","setdomainname","setfsgid", +"setfsgid32","setfsuid","setfsuid32","setgid","setgid32","setgroups","setgroups32","sethostname", +"setitimer","setpgid","setpriority","setregid","setregid32","setresgid","setresgid32","setresuid", +"setresuid32","setreuid","setreuid32","setrlimit","setsid","setsockopt","settimeofday","setuid", +"setuid32","setup","sgetmask","shutdown","sigaction","sigaltstack","signal", +"signalfd","signalfd4","sigpending","sigprocmask","sigreturn","sigsuspend","socket","socketcall", +"socketpair","spu_create","spu_run","ssetmask","stat","stat64","statfs","statfs64", +"stime","stty","subpage_prot","swapoff","swapon","sysfs","sysinfo","syslog", +"tgkill","time","timer_create","timer_delete","timer_getoverrun","timer_gettime","timer_settime","timerfd_create", +"timerfd_gettime","timerfd_settime","times","tkill","tuxcall","ugetrlimit","ulimit", +"uname","unshare","uselib","ustat","utime","utimensat","utimes", +"vhangup","vm86old","vserver","wait4","waitid","waitpid", "mount"] + +innocent_syscalls += ['mtrace_mmap', 'mtrace_munmap', 'mtrace_thread_start'] + +sync_ops = set(['fsync', 'fdatasync', 'file_sync_range']) +expansive_ops = set(['append', 'trunc', 'write', 'unlink', 'rename']) +pseudo_ops = sync_ops | set(['stdout']) +real_ops = expansive_ops | set(['creat', 'link', 'mkdir', 'rmdir']) + +def parse_line(line): + try: + toret = Struct() + # Split the line, the format being 'HH:MM:SS.nnnnn syscall(args...) = RETVALUE ERRORCODE (Error String)' + m = re.search(r'^([0-9:\.]+) ([^(]+)(\(.*\)) += ([xa-f\-0-9]+|\?) ?(E[^ ]* \([^\(\)]*\)|\([^\(\)]*\))?$', line) + + # Convert time into a numerical value + time = line[m.start(1) : m.end(1)] + toret.str_time = time + time = time.split(':') + toret.time = int(time[0]) * 60.0 * 60.0 + int(time[1]) * 60.0 + float(time[2]) + + toret.syscall = line[m.start(2) : m.end(2)] + toret.ret = line[m.start(4) : m.end(4)] + + return_explanation = line[m.start(5) : m.end(5)] + if return_explanation.startswith("E"): + toret.err = return_explanation + else: + toret.return_explanation = return_explanation + + # The arguments part looks something like '(20, "hello", "world", 3)' + args = csv.reader([line[m.start(3):m.end(3)]], delimiter=',', quotechar='"').next() + # Now args is ['(20', ' "hello"', ' "world"', ' 3)'] + args = [x[1:] for x in args] + args[len(args) - 1] = args[len(args) - 1][:-1] + toret.args = args + + return toret + except AttributeError as err: + for innocent_line in ['+++ exited with', ' --- SIG', '', ' = ? ', 'ptrace(SYSCALL):No such process']: + if line.find(innocent_line) != -1: + return False + print line + raise err + +class MemregionTracker: + def __init__(self): + # memregion_map[addr_start] = Struct(addr_end, name, inode, offset) + self.memregion_map = {} + + def __find_overlap(self, addr_start, addr_end, return_immediately = True): + toret = [] + for cur_start in self.memregion_map.keys(): + memregion = self.memregion_map[cur_start] + cur_end = memregion.addr_end + if (addr_start >= cur_start and addr_start <= cur_end) or \ + (addr_end >= cur_start and addr_end <= cur_end) or \ + (cur_start >= addr_start and cur_start <= addr_end) or \ + (cur_end >= addr_start and cur_end <= addr_end): + if return_immediately: + return memregion + else: + toret.append(memregion) + if return_immediately: + return False + return toret + + + def insert(self, addr_start, addr_end, name, inode, offset): + assert self.__find_overlap(addr_start, addr_end) == False + self.memregion_map[addr_start] = Struct(addr_start = addr_start, addr_end = addr_end, name = name, inode = inode, offset = offset) + + def remove_overlaps(self, addr_start, addr_end, whole_regions = False): + while True: + found_region = self.__find_overlap(addr_start, addr_end) + if found_region == False: + return + + found_region = copy.deepcopy(found_region) + del self.memregion_map[found_region.addr_start] + + if not whole_regions: + if(found_region.addr_start < addr_start): + new_region = copy.deepcopy(found_region) + new_region.addr_end = addr_start - 1 + self.memregion_map[new_region.addr_start] = new_region + if(found_region.addr_start > addr_end): + new_region = copy.deepcopy(found_region) + new_region.addr_start = addr_end + 1 + new_region.offset = (new_region.addr_start - found_region.addr_start) + found_region.offset + self.memregion_map[new_region.addr_start] = new_region + + def file_mapped(self, inode): + for region in self.memregion_map.values(): + if region.inode == inode: + return True + return False + + def resolve_range(self, addr_start, addr_end): + toret = [] + overlap_regions = copy.deepcopy(self.__find_overlap(addr_start, addr_end, return_immediately = False)) + overlap_regions = sorted(overlap_regions, key = lambda region: region.addr_start) + for region in overlap_regions: + if region.addr_start < addr_start: + assert addr_start <= region.addr_end + region.offset = (addr_start - region.addr_start) + region.offset + region.addr_start = addr_start + if region.addr_end > addr_end: + assert addr_end >= region.addr_start + region.addr_end = addr_end + assert region.addr_start >= addr_start + assert region.addr_end <= addr_end + toret.append(region) + return toret + +class FileDescriptorTracker: + def __init__(self): + self.fd_details = {} + + def new_fd_mapping(self, fd, name, pos, attribs, inode): + if fd in self.fd_details: + print self.fd_details[fd] + assert fd not in self.fd_details + attribs = set(attribs) + self.fd_details[fd] = Struct(name = name, pos = pos, attribs = attribs, inode = inode) + + def set_equivalent(self, oldfd, newfd): + assert oldfd in self.fd_details + assert newfd not in self.fd_details + self.fd_details[newfd] = self.fd_details[oldfd] + + def remove_fd_mapping(self, fd): + assert fd in self.fd_details + del self.fd_details[fd] + + def is_watched(self, fd): + return (fd in self.fd_details) + + def get_pos(self, fd): + assert fd in self.fd_details + return self.fd_details[fd].pos + + def get_inode(self, fd): + assert fd in self.fd_details + return self.fd_details[fd].inode + + def get_attribs(self, fd): + assert fd in self.fd_details + return self.fd_details[fd].attribs + + def set_pos(self, fd, pos): + assert fd in self.fd_details + self.fd_details[fd].pos = pos + + def get_name(self, fd): + assert fd in self.fd_details + return self.fd_details[fd].name + + def get_fds_fname(self, name): + result = [fd for fd in self.fd_details if self.fd_details[fd].name == name] + return result + + def get_fds(self, inode): + result = [fd for fd in self.fd_details if self.fd_details[fd].inode == inode] + return result + + def get_fds_attribs(self, attrib): + toret = [] + for fd in self.fd_details: + if attrib in self.fd_details[fd].attribs: + toret.append(fd) + return toret + +def __replayed_stat(path): + try: + return os.stat(replayed_path(path)) + except OSError as err: + return False + +def __parent_inode(path): + return __replayed_stat(os.path.dirname(path)).st_ino + +def __replayed_truncate(path, new_size): + old_mode = writeable_toggle(replayed_path(path)) + tmp_fd = os.open(replayed_path(path), os.O_WRONLY) + os.ftruncate(tmp_fd, new_size) + os.close(tmp_fd) + writeable_toggle(replayed_path(path), old_mode) + +def __get_files_from_inode(inode): + results = subprocess.check_output(['find', aliceconfig().scratchpad_dir, '-inum', str(inode)]) + toret = [] + for path in results.split('\n'): + if path != '': + # Converting the (replayed) path into original path + assert path.startswith(aliceconfig().scratchpad_dir) + path = path.replace(aliceconfig().scratchpad_dir, aliceconfig().base_path + '/', 1) + path = re.sub(r'//', r'/', path) + + assert __replayed_stat(path) + assert __replayed_stat(path).st_ino == inode + toret.append(path) + return toret + +class ProcessTracker: + def __init__(self, pid): + self.pid = pid + self.memtracker = MemregionTracker() + self.fdtracker = FileDescriptorTracker() + self.fdtracker_unwatched = FileDescriptorTracker() + self.cwd = aliceconfig().starting_cwd + self.child_tids = [] + + def record_fork(self, forked_tid): + assert forked_tid not in ProcessTracker.trackers_map + toret = copy.deepcopy(self) + toret.pid = forked_tid + toret.child_tids = [] + ProcessTracker.trackers_map[forked_tid] = toret + + def record_clone(self, cloned_tid): + assert cloned_tid not in ProcessTracker.trackers_map + self.child_tids.append(cloned_tid) + ProcessTracker.trackers_map[cloned_tid] = self + + def record_execve(self): + fds_to_remove = self.fdtracker.get_fds_attribs('O_CLOEXEC') + for fd in fds_to_remove: + self.fdtracker.remove_fd_mapping(fd) + + fds_to_remove = self.fdtracker_unwatched.get_fds_attribs('O_CLOEXEC') + for fd in fds_to_remove: + self.fdtracker_unwatched.remove_fd_mapping(fd) + + self.memtracker = MemregionTracker() + + for child_tid in self.child_tids: + ProcessTracker.trackers_map[child_tid] = None + self.child_tids = [] + + + def set_cwd(self, path): + self.cwd = path + + def original_path(self, path): + if not path.startswith('/'): + path = self.cwd + '/' + path + while True: + old_path = path + path = re.sub(r'//', r'/', path) + path = re.sub(r'/\./', r'/', path) + path = re.sub(r'/[^/]*/\.\./', r'/', path) + if path == old_path: + break + return path + + trackers_map = {} ## trackers_map[pid] = (memtracker, fdtracker, proctracker) + @staticmethod + def get_proctracker(tid): + if tid not in ProcessTracker.trackers_map: + # Pid corresponds to a process that was created directly from the workload. + # i.e., not forked from anywhere + ProcessTracker.trackers_map[tid] = ProcessTracker(tid) + toret = ProcessTracker.trackers_map[tid] + assert toret.pid == tid or tid in toret.child_tids + return toret + +symtab = None +SymbolTableEntry = namedtuple('SymbolTableEntry', + ['func_name', 'instr_offset', 'src_filename', 'src_line_num']) +StackEntry = namedtuple('StackEntry', + ['func_name', 'instr_offset', 'src_filename', 'src_line_num', + 'binary_filename', 'addr_offset', 'raw_addr']) +def __get_backtrace(stackinfo): + global symtab + backtrace = [] + + if aliceconfig().ignore_stacktrace: return backtrace + + assert stackinfo[0] == '[' + assert stackinfo[-2] == ']' + stackinfo = stackinfo[1:-2].strip() + + if stackinfo == '': + return [] + + stack_addrs_lst = stackinfo.split() + for addr in stack_addrs_lst: + binary_filename, addr_offset, raw_addr = addr.split(':') + symtab_for_file = symtab[binary_filename] + + # try both addr_offset and raw_addr to see if either one matches: + if addr_offset in symtab_for_file: + syms = SymbolTableEntry._make(symtab_for_file[addr_offset]) + elif raw_addr in symtab_for_file: + syms = SymbolTableEntry._make(symtab_for_file[raw_addr]) + else: + syms = SymbolTableEntry(None, None, None, None) + + assert len(syms) == 4 + t = StackEntry(syms.func_name, syms.instr_offset, syms.src_filename, syms.src_line_num, binary_filename, addr_offset, raw_addr) + backtrace.append(t) + + return backtrace + +__directory_symlinks = [] +def __get_micro_op(syscall_tid, line, stackinfo, mtrace_recorded): + micro_operations = [] + + assert type(syscall_tid) == int + proctracker = ProcessTracker.get_proctracker(syscall_tid) + memtracker = proctracker.memtracker + fdtracker = proctracker.fdtracker + fdtracker_unwatched = proctracker.fdtracker_unwatched + + global __directory_symlinks + parsed_line = parse_line(line) + + if parsed_line == False: + return [] + + ### Known Issues: + ### 1. Access time with read() kind of calls, modification times in general, other attributes + ### 2. Symlinks + + if parsed_line.syscall == 'open' or \ + (parsed_line.syscall == 'openat' and parsed_line.args[0] == 'AT_FDCWD'): + if parsed_line.syscall == 'openat': + parsed_line.args.pop(0) + flags = parsed_line.args[1].split('|') + name = proctracker.original_path(eval(parsed_line.args[0])) + mode = parsed_line.args[2] if len(parsed_line.args) == 3 else False + fd = safe_string_to_int(parsed_line.ret); + if is_interesting(name): + if 'O_WRONLY' in flags or 'O_RDWR' in flags: + assert 'O_ASYNC' not in flags + assert 'O_DIRECTORY' not in flags + if fd >= 0 and 'O_DIRECTORY' not in flags: + # Finished with most of the asserts and initialization. Actually handling the open() here. + + newly_created = False + if not __replayed_stat(name): + assert 'O_CREAT' in flags + assert 'O_WRONLY' in flags or 'O_RDWR' in flags + assert len(fdtracker.get_fds_fname(name)) == 0 + assert mode + tmp_fd = os.open(replayed_path(name), os.O_CREAT | os.O_WRONLY, eval(mode)) + assert tmp_fd > 0 + os.close(tmp_fd) + inode = __replayed_stat(name).st_ino + new_op = Struct(op = 'creat', name = name, mode = mode, inode = inode, parent = __parent_inode(name)) + micro_operations.append(new_op) + newly_created = True + else: + inode = __replayed_stat(name).st_ino + + if 'O_TRUNC' in flags: + assert 'O_WRONLY' in flags or 'O_RDWR' in flags + if not newly_created: + new_op = Struct(op = 'trunc', name = name, initial_size = __replayed_stat(name).st_size, final_size = 0, inode = inode) + micro_operations.append(new_op) + __replayed_truncate(name, 0) + + fd_flags = [] + if 'O_SYNC' in flags or 'O_DSYNC' in flags or 'O_RSYNC' in flags: + fd_flags.append('O_SYNC') + if 'O_CLOEXEC' in flags: + fd_flags.append('O_CLOEXEC') + + if 'O_APPEND' in flags: + fdtracker.new_fd_mapping(fd, name, __replayed_stat(name).st_size, fd_flags, inode) + else: + fdtracker.new_fd_mapping(fd, name, 0, fd_flags, inode) + elif fd >= 0: + fd_flags = [] + if 'O_CLOEXEC' in flags: + fd_flags.append('O_CLOEXEC') + fdtracker_unwatched.new_fd_mapping(fd, name, 0, fd_flags, 0) + elif parsed_line.syscall in ['write', 'writev', 'pwrite', 'pwritev']: + fd = safe_string_to_int(parsed_line.args[0]) + name = None + if fdtracker_unwatched.is_watched(fd): + name = fdtracker_unwatched.get_name(fd) + elif fdtracker.is_watched(fd): + name = fdtracker.get_name(fd) + if fdtracker.is_watched(fd) or fd == 1: + dump_file = eval(parsed_line.args[-2]) + dump_offset = safe_string_to_int(parsed_line.args[-1]) + if fd == 1: + count = safe_string_to_int(parsed_line.args[2]) + fd_data = os.open(dump_file, os.O_RDONLY) + os.lseek(fd_data, dump_offset, os.SEEK_SET) + buf = os.read(fd_data, count) + os.close(fd_data) + new_op = Struct(op = 'stdout', data = buf) + micro_operations.append(new_op) + else: + if parsed_line.syscall == 'write': + count = safe_string_to_int(parsed_line.args[2]) + pos = fdtracker.get_pos(fd) + elif parsed_line.syscall == 'writev': + count = safe_string_to_int(parsed_line.args[3]) + pos = fdtracker.get_pos(fd) + elif parsed_line.syscall == 'pwrite': + count = safe_string_to_int(parsed_line.args[2]) + pos = safe_string_to_int(parsed_line.args[3]) + elif parsed_line.syscall == 'pwritev': + count = safe_string_to_int(parsed_line.args[4]) + pos = safe_string_to_int(parsed_line.args[3]) + assert safe_string_to_int(parsed_line.ret) == count + name = fdtracker.get_name(fd) + inode = fdtracker.get_inode(fd) + size = __replayed_stat(name).st_size + overwrite_size = 0 + if pos < size: + if pos + count < size: + overwrite_size = count + else: + overwrite_size = size - pos + new_op = Struct(op = 'write', name = name, offset = pos, count = overwrite_size, dump_file = dump_file, dump_offset = dump_offset, inode = inode) + assert new_op.count > 0 + micro_operations.append(new_op) + if 'O_SYNC' in fdtracker.get_attribs(fd): + new_op = Struct(op = 'file_sync_range', name = name, offset = pos, count = overwrite_size, inode = inode) + micro_operations.append(new_op) + pos += overwrite_size + count -= overwrite_size + dump_offset += overwrite_size + + if(pos > size): + new_op = Struct(op = 'trunc', name = name, final_size = pos, inode = inode, initial_size = size) + micro_operations.append(new_op) + __replayed_truncate(name, size) + size = pos + + if(pos + count > size): + new_op = Struct(op = 'append', name = name, offset = pos, count = count, dump_file = dump_file, dump_offset = dump_offset, inode = inode) + micro_operations.append(new_op) + __replayed_truncate(name, pos + count) + + if 'O_SYNC' in fdtracker.get_attribs(fd): + new_op = Struct(op = 'file_sync_range', name = name, offset = pos, count = count, inode = inode) + micro_operations.append(new_op) + if parsed_line.syscall not in ['pwrite', 'pwritev']: + fdtracker.set_pos(fd, pos + count) + elif parsed_line.syscall == 'close': + if int(parsed_line.ret) == -1: + if aliceconfig().debug_level >= 2: + print 'WARNING: close() returned -1. ' + line + else: + fd = safe_string_to_int(parsed_line.args[0]) + if fdtracker.is_watched(fd): + fdtracker.remove_fd_mapping(fd) + else: + if fdtracker_unwatched.is_watched(fd): + fdtracker_unwatched.remove_fd_mapping(fd) + elif parsed_line.syscall == 'link': + if int(parsed_line.ret) != -1: + source = proctracker.original_path(eval(parsed_line.args[0])) + dest = proctracker.original_path(eval(parsed_line.args[1])) + if is_interesting(source): + assert is_interesting(dest) + assert not __replayed_stat(dest) + assert __replayed_stat(source) + source_inode = __replayed_stat(source).st_ino + micro_operations.append(Struct(op = 'link', source = source, dest = dest, source_inode = source_inode, source_parent = __parent_inode(source), dest_parent = __parent_inode(dest))) + os.link(replayed_path(source), replayed_path(dest)) + else: + assert not is_interesting(dest) + elif parsed_line.syscall == 'rename': + if int(parsed_line.ret) != -1: + source = proctracker.original_path(eval(parsed_line.args[0])) + dest = proctracker.original_path(eval(parsed_line.args[1])) + if is_interesting(source): + assert is_interesting(dest) + assert __replayed_stat(source) + source_inode = __replayed_stat(source).st_ino + source_hardlinks = __replayed_stat(source).st_nlink + source_size = __replayed_stat(source).st_size + dest_inode = False + dest_hardlinks = 0 + dest_size = 0 + if __replayed_stat(dest): + dest_inode = __replayed_stat(dest).st_ino + dest_hardlinks = __replayed_stat(dest).st_nlink + dest_size = __replayed_stat(dest).st_size + micro_operations.append(Struct(op = 'rename', source = source, dest = dest, source_inode = source_inode, dest_inode = dest_inode, source_parent = __parent_inode(source), dest_parent = __parent_inode(dest), source_hardlinks = source_hardlinks, dest_hardlinks = dest_hardlinks, dest_size = dest_size, source_size = source_size)) + if dest_hardlinks == 1: + assert len(fdtracker.get_fds(dest_inode)) == 0 + assert memtracker.file_mapped(dest_inode) == False + os.rename(replayed_path(dest), replayed_path(dest) + '.deleted_' + str(uuid.uuid1())) + os.rename(replayed_path(source), replayed_path(dest)) + elif parsed_line.syscall == 'unlink': + if int(parsed_line.ret) != -1: + name = proctracker.original_path(eval(parsed_line.args[0])) + if is_interesting(name): + assert __replayed_stat(name) + inode = __replayed_stat(name).st_ino + if os.path.isdir(replayed_path(name)): + assert inode in __directory_symlinks + micro_operations.append(Struct(op = 'rmdir', name = name, inode = inode, parent = __parent_inode(name))) + os.rename(replayed_path(name), replayed_path(name) + '.deleted_' + str(uuid.uuid1())) + else: + hardlinks = __replayed_stat(name).st_nlink + size = __replayed_stat(name).st_size + micro_operations.append(Struct(op = 'unlink', name = name, inode = inode, hardlinks = hardlinks, parent = __parent_inode(name), size = size)) + # A simple os.unlink might be sufficient, but making sure that the inode is not re-used. + if hardlinks > 1: + os.unlink(replayed_path(name)) + if len(fdtracker.get_fds(inode)) > 1: + print "Warning: File unlinked while being open: " + name + if memtracker.file_mapped(inode): + print "Warning: File unlinked while being mapped: " + name + else: + os.rename(replayed_path(name), replayed_path(name) + '.deleted_' + str(uuid.uuid1())) + elif parsed_line.syscall == 'lseek': + if int(parsed_line.ret) != -1: + fd = safe_string_to_int(parsed_line.args[0]) + if fdtracker.is_watched(fd): + fdtracker.set_pos(fd, int(parsed_line.ret)) + elif parsed_line.syscall in ['truncate', 'ftruncate']: + assert int(parsed_line.ret) != -1 + if parsed_line.syscall == 'truncate': + name = proctracker.original_path(eval(parsed_line.args[0])) + interesting = is_interesting(name) + if interesting: + assert __replayed_stat(name) + inode = __replayed_stat(name).st_ino + init_size = __replayed_stat(name).st_size + else: + fd = safe_string_to_int(parsed_line.args[0]) + interesting = fdtracker.is_watched(fd) + if interesting: + name = fdtracker.get_name(fd) + inode = fdtracker.get_inode(fd) + files = __get_files_from_inode(inode) + assert len(files) > 0 + init_size = __replayed_stat(files[0]).st_size + if interesting: + size = safe_string_to_int(parsed_line.args[1]) + new_op = Struct(op = 'trunc', name = name, final_size = size, inode = inode, initial_size = init_size) + micro_operations.append(new_op) + __replayed_truncate(name, size) + elif parsed_line.syscall == 'fallocate': + if int(parsed_line.ret) != -1: + fd = safe_string_to_int(parsed_line.args[0]) + if fdtracker.is_watched(fd): + mode = parsed_line.args[1] + assert mode == '0' + offset = safe_string_to_int(parsed_line.args[2]) + count = safe_string_to_int(parsed_line.args[3]) + inode = fdtracker.get_inode(fd) + init_size = __replayed_stat(name).st_size + if offset + size > init_size: + new_op = Struct(op = 'trunc', name = name, final_size = offset + count, inode = inode, initial_size = init_size) + micro_operations.append(new_op) + __replayed_truncate(name, offset + count) + data = ''.join('0' for x in range(count)) + new_op = Struct(op = 'write', name = name, inode = inode, offset = offset, count = count, dump_file = '', dump_offset = 0, override_data = data) + assert new_op.count > 0 + micro_operations.append(new_op) + elif parsed_line.syscall in ['fsync', 'fdatasync']: + assert int(parsed_line.ret) == 0 + fd = safe_string_to_int(parsed_line.args[0]) + if fdtracker.is_watched(fd): + name = fdtracker.get_name(fd) + inode = fdtracker.get_inode(fd) + files = __get_files_from_inode(inode) + assert len(files) > 0 + size = __replayed_stat(files[0]).st_size + micro_operations.append(Struct(op = parsed_line.syscall, name = name, inode = inode, size = size)) + elif parsed_line.syscall == 'mkdir': + if int(parsed_line.ret) != -1: + name = proctracker.original_path(eval(parsed_line.args[0])) + mode = parsed_line.args[1] + if is_interesting(name): + os.mkdir(replayed_path(name), eval(mode)) + inode = __replayed_stat(name).st_ino + micro_operations.append(Struct(op = 'mkdir', name = name, mode = mode, inode = inode, parent = __parent_inode(name))) + elif parsed_line.syscall == 'rmdir': + if int(parsed_line.ret) != -1: + name = proctracker.original_path(eval(parsed_line.args[0])) + if is_interesting(name): + inode = __replayed_stat(name).st_ino + micro_operations.append(Struct(op = 'rmdir', name = name, inode = inode, parent = __parent_inode(name))) + os.rename(replayed_path(name), replayed_path(name) + '.deleted_' + str(uuid.uuid1())) + elif parsed_line.syscall == 'chdir': + if int(parsed_line.ret) == 0: + proctracker.set_cwd(proctracker.original_path(eval(parsed_line.args[0]))) + elif parsed_line.syscall == 'fchdir': + if int(parsed_line.ret) == 0: + fd = eval(parsed_line.args[0]) + if fdtracker.is_watched(fd): + name = fdtracker.get_name(fd) + else: + assert fdtracker_unwatched.is_watched(fd) + name = fdtracker_unwatched.get_name(fd) + proctracker.set_cwd(name) + elif parsed_line.syscall == 'clone': + new_tid = int(parsed_line.ret) + if new_tid != -1: + flags_string = parsed_line.args[1] + assert(flags_string.startswith("flags=")) + flags = flags_string[6:].split('|') + if 'CLONE_VM' in flags: + assert 'CLONE_FILES' in flags + assert 'CLONE_FS' in flags + proctracker.record_clone(new_tid) + else: + assert 'CLONE_FILES' not in flags + assert 'CLONE_FS' not in flags + proctracker.record_fork(new_tid) + elif parsed_line.syscall == 'vfork': + new_pid = int(parsed_line.ret) + if new_pid != -1: + proctracker.record_fork(new_pid) + elif parsed_line.syscall in ['fcntl', 'fcntl64']: + fd = safe_string_to_int(parsed_line.args[0]) + cmd = parsed_line.args[1] + assert cmd in ['F_GETFD', 'F_SETFD', 'F_GETFL', 'F_SETFL', 'F_SETLK', 'F_SETLKW', 'F_GETLK', 'F_SETLK64', 'F_SETLKW64', 'F_GETLK64', 'F_DUPFD'] + + tracker = None + if fdtracker.is_watched(fd): + tracker = fdtracker + elif fdtracker_unwatched.is_watched(fd): + tracker = fdtracker_unwatched + + if tracker: + if cmd == 'F_SETFD': + assert parsed_line.args[2] in ['FD_CLOEXEC', '0'] + if parsed_line.args[2] == 'FD_CLOEXEC': + tracker.get_attribs(fd).add('O_CLOEXEC') + else: + tracker.get_attribs(fd).discard('O_CLOEXEC') + elif cmd == 'F_DUPFD' and eval(parsed_line.ret) != -1: + new_fd = eval(parsed_line.ret) + old_fd = eval(parsed_line.args[0]) + tracker.set_equivalent(old_fd, new_fd) + elif cmd == 'F_SETFL': + assert tracker == fdtracker_unwatched + elif parsed_line.syscall in ['mmap', 'mmap2']: + addr_start = safe_string_to_int(parsed_line.ret) + length = safe_string_to_int(parsed_line.args[1]) + prot = parsed_line.args[2].split('|') + flags = parsed_line.args[3].split('|') + fd = safe_string_to_int(parsed_line.args[4]) + offset = safe_string_to_int(parsed_line.args[5]) + if parsed_line.syscall == 'mmap2': + offset = offset * 4096 + + if addr_start == -1: + return + + addr_end = addr_start + length - 1 + if 'MAP_FIXED' in flags: + given_addr = safe_string_to_int(parsed_line.args[0]) + assert given_addr == addr_start + assert 'MAP_GROWSDOWN' not in flags + memtracker.remove_overlaps(addr_start, addr_end) + + if 'MAP_ANON' not in flags and 'MAP_ANONYMOUS' not in flags and \ + fdtracker.is_watched(fd) and 'MAP_SHARED' in flags and \ + 'PROT_WRITE' in prot: + + name = fdtracker.get_name(fd) + file_size = __replayed_stat(name).st_size + assert file_size <= offset + length + if not aliceconfig().ignore_mmap: assert syscall_tid in mtrace_recorded + assert 'MAP_GROWSDOWN' not in flags + memtracker.insert(addr_start, addr_end, fdtracker.get_name(fd), fdtracker.get_inode(fd), offset) + elif parsed_line.syscall == 'munmap': + addr_start = safe_string_to_int(parsed_line.args[0]) + length = safe_string_to_int(parsed_line.args[1]) + addr_end = addr_start + length - 1 + ret = safe_string_to_int(parsed_line.ret) + if ret != -1: + memtracker.remove_overlaps(addr_start, addr_end, whole_regions = True) + elif parsed_line.syscall == 'msync': + addr_start = safe_string_to_int(parsed_line.args[0]) + length = safe_string_to_int(parsed_line.args[1]) + flags = parsed_line.args[2].split('|') + ret = safe_string_to_int(parsed_line.ret) + + addr_end = addr_start + length - 1 + if ret != -1: + regions = memtracker.resolve_range(addr_start, addr_end) + for region in regions: + count = region.addr_end - region.addr_start + 1 + new_op = Struct(op = 'file_sync_range', name = region.name, inode = region.inode, offset = region.offset, count = count) + micro_operations.append(new_op) + elif parsed_line.syscall == 'mwrite': + addr_start = safe_string_to_int(parsed_line.args[0]) + length = safe_string_to_int(parsed_line.args[2]) + dump_file = eval(parsed_line.args[3]) + dump_offset = safe_string_to_int(parsed_line.args[4]) + + addr_end = addr_start + length - 1 + regions = memtracker.resolve_range(addr_start, addr_end) + for region in regions: + count = region.addr_end - region.addr_start + 1 + cur_dump_offset = dump_offset + (region.addr_start - addr_start) + offset = region.offset + name = region.name + inode = region.inode + new_op = Struct(op = 'write', name = name, inode = inode, offset = offset, count = count, dump_file = dump_file, dump_offset = cur_dump_offset) + assert new_op.count > 0 + micro_operations.append(new_op) + elif parsed_line.syscall in ['dup', 'dup2', 'dup3']: + newfd = safe_string_to_int(parsed_line.ret) + oldfd = safe_string_to_int(parsed_line.args[0]) + if newfd != -1: + if parsed_line.syscall in ['dup2', 'dup3']: + if fdtracker.is_watched(newfd): + fdtracker.remove_fd_mapping(newfd) + elif fdtracker_unwatched.is_watched(newfd): + fdtracker_unwatched.remove_fd_mapping(newfd) + if fdtracker.is_watched(oldfd): + fdtracker.set_equivalent(oldfd, newfd) + elif fdtracker_unwatched.is_watched(oldfd): + fdtracker_unwatched.set_equivalent(oldfd, newfd) + elif parsed_line.syscall in ['chmod', 'fchmod', 'chown', 'fchown', 'umask']: + if parsed_line.syscall.startswith('f'): + fd = eval(parsed_line.args[0]) + if fdtracker.is_watched(fd): + print 'WARNING: ' + line + ' :: file = ' + fdtracker.get_name(fd) + elif parsed_line.syscall == 'umask': + if not 'umask_warned' in globals(): + globals()['umask_warned'] = True + print 'WARNING: UMASK' + else: + name = proctracker.original_path(eval(parsed_line.args[0])) + if is_interesting(name): + print 'WARNING: ' + line + elif parsed_line.syscall == 'ioctl': + fd = int(parsed_line.args[0]) + assert not fdtracker.is_watched(fd) + if fd not in [0, 1, 2]: + name = None + if fdtracker_unwatched.is_watched(fd): + name = fdtracker_unwatched.get_name(fd) + debug_level = 0 + for start in ['/usr/bin', '/dev/snd', '/dev/tty', '/dev/vmnet', '/dev/urandom'] + aliceconfig().ignore_ioctl: + if str(name).startswith(start): + debug_level = 2 + if name == None: + debug_level = 2 + if aliceconfig().debug_level >= debug_level: + print 'WARNING: ' + line + ' name = ' + str(name) + elif parsed_line.syscall in ['shmget', 'shmat', 'shmdt', 'shmctl']: + if parsed_line.syscall == 'shmget': + assert parsed_line.args[0] == 'IPC_PRIVATE' + elif parsed_line.syscall == 'execve': + proctracker.record_execve() + elif parsed_line.syscall in ['io_setup', 'aio_read', 'io_getevents', 'io_destroy']: + if aliceconfig().debug_level >= 2: + print 'Warning: AIO ' + line + elif parsed_line.syscall == 'symlink': + if eval(parsed_line.ret) != -1: + source = proctracker.original_path(eval(parsed_line.args[0])) + dest = proctracker.original_path(eval(parsed_line.args[1])) + if is_interesting(dest) or is_interesting(source): + print 'WARNING: ' + line + if is_interesting(dest): + source_is_dir = False + if source.startswith(aliceconfig().base_path): + if os.path.isdir(replayed_path(source)): + source_is_dir = True + else: + print 'WARNING: symlink source outside base path. Assuming file link.' + if source_is_dir == True: + os.mkdir(replayed_path(dest), 0777) + inode = __replayed_stat(dest).st_ino + __directory_symlinks.append(inode) + micro_operations.append(Struct(op = 'mkdir', name = dest, mode = '0777', inode = inode, parent = __parent_inode(dest))) + else: + tmp_fd = os.open(replayed_path(dest), os.O_CREAT | os.O_WRONLY, 0666) + assert tmp_fd > 0 + os.close(tmp_fd) + inode = __replayed_stat(dest).st_ino + new_op = Struct(op = 'creat', name = dest, mode = 0666, inode = inode, parent = __parent_inode(dest)) + micro_operations.append(new_op) + elif parsed_line.syscall == 'mremap': + ret_address = safe_string_to_int(parsed_line.ret) + if ret_address != -1: + start_addr = safe_string_to_int(parsed_line.args[0]) + end_addr = start_addr + safe_string_to_int(parsed_line.args[1]) - 1 + assert(len(memtracker.resolve_range(start_addr, end_addr)) == 0) + else: + if parsed_line.syscall not in innocent_syscalls and not parsed_line.syscall.startswith("ignore_"): + raise Exception("Unhandled system call: " + parsed_line.syscall) + for op in micro_operations: + op.hidden_tid = syscall_tid + op.hidden_time = parsed_line.str_time + op.hidden_pid = proctracker.pid + op.hidden_full_line = copy.deepcopy(line) + op.hidden_parsed_line = copy.deepcopy(parsed_line) + op.hidden_stackinfo = copy.deepcopy(stackinfo) + op.hidden_backtrace = __get_backtrace(stackinfo) + return micro_operations + + +def get_micro_ops(): + global innocent_syscalls, symtab, SymbolTableEntry + + files = commands.getoutput("ls " + aliceconfig().strace_file_prefix + ".* | grep -v byte_dump | grep -v stackinfo | grep -v symtab").split() + rows = [] + mtrace_recorded = [] + assert len(files) > 0 + for trace_file in files: + f = open(trace_file, 'r') + array = trace_file.split('.') + pid = int(array[len(array) - 1]) + if array[-2] == 'mtrace': + mtrace_recorded.append(pid) + dump_offset = 0 + m = re.search(r'\.[^.]*$', trace_file) + dump_file = trace_file[0 : m.start(0)] + '.byte_dump' + trace_file[m.start(0) : ] + if not aliceconfig().ignore_stacktrace: + stackinfo_file = open(trace_file[0 : m.start(0)] + '.stackinfo' + trace_file[m.start(0) : ], 'r') + for line in f: + parsed_line = parse_line(line) + if parsed_line: + if parsed_line.syscall in ['write', 'writev', 'pwrite', 'pwritev', 'mwrite']: + if parsed_line.syscall == 'pwrite': + write_size = safe_string_to_int(parsed_line.args[-2]) + else: + write_size = safe_string_to_int(parsed_line.args[-1]) + m = re.search(r'\) += [^,]*$', line) + line = line[ 0 : m.start(0) ] + ', "' + dump_file + '", ' + str(dump_offset) + line[m.start(0) : ] + dump_offset += write_size + stacktrace = '[]\n' if aliceconfig().ignore_stacktrace else stackinfo_file.readline() + if parsed_line.syscall in innocent_syscalls or parsed_line.syscall.startswith("ignore_"): + pass + else: + rows.append((pid, parsed_line.time, line, stacktrace)) + + rows = sorted(rows, key = lambda row: row[1]) + + os.system("rm -rf " + aliceconfig().scratchpad_dir) + os.system("cp -R " + aliceconfig().initial_snapshot + " " + aliceconfig().scratchpad_dir) + + path_inode_map = get_path_inode_map(aliceconfig().scratchpad_dir) + + if not aliceconfig().ignore_stacktrace: + symtab = pickle.load(open(aliceconfig().strace_file_prefix + '.symtab')) + micro_operations = [] + for row in rows: + syscall_tid = row[0] + line = row[2] + stackinfo = row[3] + line = line.strip() + try: + micro_operations += __get_micro_op(syscall_tid, line, stackinfo, mtrace_recorded) + except: + traceback.print_exc() + print row + print '----------------------------------------------------' + for op in micro_operations: + print op + exit() + + return (path_inode_map, micro_operations) diff --git a/_aliceutils.py b/_aliceutils.py new file mode 100644 index 0000000..5e0ef3b --- /dev/null +++ b/_aliceutils.py @@ -0,0 +1,117 @@ +import os +import argparse +import subprocess +import re + +__aliceconfig = None +def init_aliceconfig(args): + global current_original_path, __aliceconfig + parser = argparse.ArgumentParser() + parser.add_argument('--strace_file_prefix', dest = 'strace_file_prefix', type = str, default = False) + parser.add_argument('--initial_snapshot', dest = 'initial_snapshot', type = str, default = False) + parser.add_argument('--checker_tool', dest = 'checker_tool', type = str, default = False) + parser.add_argument('--base_path', dest = 'base_path', type = str, default = False) + parser.add_argument('--starting_cwd', dest = 'starting_cwd', type = str, default = False) + parser.add_argument('--interesting_path_string', dest = 'interesting_path_string', type = str, default = False) + parser.add_argument('--scratchpad_dir', dest = 'scratchpad_dir', type = str, default = '/tmp') + parser.add_argument('--debug_level', dest = 'debug_level', type = int, default = 0) + parser.add_argument('--ignore_ioctl', dest = 'ignore_ioctl', type = list, default = []) + parser.add_argument('--ignore_mmap', dest = 'ignore_mmap', type = bool, default = False) + parser.add_argument('--ignore_stacktrace', dest = 'ignore_stacktrace', type = bool, default = False) + + __aliceconfig = parser.parse_args('') + for key in __aliceconfig.__dict__: + if key in args: + __aliceconfig.__dict__[key] = args[key] + + + assert __aliceconfig.strace_file_prefix != False + assert __aliceconfig.initial_snapshot != False + assert __aliceconfig.base_path != False and __aliceconfig.base_path.startswith('/') + if __aliceconfig.base_path.endswith('/'): + __aliceconfig.base_path = __aliceconfig.base_path[0 : -1] + + if __aliceconfig.interesting_path_string == False: + __aliceconfig.interesting_path_string = r'^' + __aliceconfig.base_path + + if 'starting_cwd' not in __aliceconfig.__dict__ or __aliceconfig.starting_cwd == False: + __aliceconfig.starting_cwd = __aliceconfig.base_path + + assert __aliceconfig.scratchpad_dir != False + +def aliceconfig(): + return __aliceconfig + +def get_path_inode_map(directory): + result = {} + while(directory.endswith('/')): + directory = directory[ : -1] + for inode_path in subprocess.check_output("find " + directory + " -printf '%i %p %y\n'", shell = True).split('\n'): + if inode_path == '': + continue + (inode, path, entry_type) = inode_path.split(' ') + inode = int(inode) + assert entry_type == 'd' or entry_type == 'f' + result[path] = (inode, entry_type) + return result + + +def colorize(s, i): + return '\033[00;' + str(30 + i) + 'm' + s + '\033[0m' + +def coded_colorize(s, s2 = None): + colors=[1,3,5,6,11,12,14,15] + if s2 == None: + s2 = s + return colorize(s, colors[hash(s2) % len(colors)]) + +def colors_test(fname): + f = open(fname, 'w') + for i in range(0, 30): + f.write(colorize(str(i), i) + '\n') + f.close() + +def short_path(name): + if not __aliceconfig or not name.startswith(__aliceconfig.base_path): + return name + return name.replace(re.sub(r'//', r'/', __aliceconfig.base_path + '/'), '', 1) + +# The input parameter must already have gone through original_path() +def initial_path(name): + if not name.startswith(__aliceconfig.base_path): + return False + toret = name.replace(__aliceconfig.base_path, __aliceconfig.initial_snapshot + '/', 1) + return re.sub(r'//', r'/', toret) + +# The input parameter must already have gone through original_path() +def replayed_path(name): + if not name.startswith(__aliceconfig.base_path): + return False + toret = name.replace(__aliceconfig.base_path, __aliceconfig.scratchpad_dir + '/', 1) + return re.sub(r'//', r'/', toret) + +def safe_string_to_int(s): + try: + if len(s) >= 2 and s[0:2] == "0x": + return int(s, 16) + elif s[0] == '0': + return int(s, 8) + return int(s) + except ValueError as err: + print s + raise err + +def is_interesting(path): + return re.search(aliceconfig().interesting_path_string, path) + +def writeable_toggle(path, mode = None): + if mode == 'UNTOGGLED': + return + elif mode != None: + os.chmod(path, mode) + if os.access(path, os.W_OK): + return 'UNTOGGLED' + if not os.access(path, os.W_OK): + old_mode = os.stat(path).st_mode + os.chmod(path, 0777) + return old_mode diff --git a/alice-strace/.tarball-version b/alice-strace/.tarball-version new file mode 100644 index 0000000..ef216a5 --- /dev/null +++ b/alice-strace/.tarball-version @@ -0,0 +1 @@ +4.8 diff --git a/alice-strace/.version b/alice-strace/.version new file mode 100644 index 0000000..ef216a5 --- /dev/null +++ b/alice-strace/.version @@ -0,0 +1 @@ +4.8 diff --git a/alice-strace/AUTHORS b/alice-strace/AUTHORS new file mode 100644 index 0000000..bbba831 --- /dev/null +++ b/alice-strace/AUTHORS @@ -0,0 +1 @@ +See the file CREDITS. Automake likes us to have this file called AUTHORS. diff --git a/alice-strace/COPYING b/alice-strace/COPYING new file mode 100644 index 0000000..e9078d3 --- /dev/null +++ b/alice-strace/COPYING @@ -0,0 +1,29 @@ +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/alice-strace/CREDITS b/alice-strace/CREDITS new file mode 100644 index 0000000..399bcaf --- /dev/null +++ b/alice-strace/CREDITS @@ -0,0 +1,130 @@ +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 + Andi Kleen + Andreas Schwab + Anton Blanchard + Arkadiusz Miskiewicz + Bai Weidong + Ben Noordhuis + Bernhard Reutner-Fischer + Bo Kullmar + Cai Fei + Carlos O'Donell + Carmelo AMOROSO + 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 + Edgar E. Iglesias + Fernando Luis Vazquez Cao + Florian Lohoff + Frederik Schüler + Gabor Gombas + Ganesan Rajagopal + Gaël Roualland + Grant Edwards + Greg Banks + H.J. Lu + Heiko Carstens + Henrik Storner + Holger Hans Peter Freyther + Jakub Bogusz + Jakub Jelinek + James Hogan + Jan Kratochvil + Jeff Mahoney + Joe Ilacqua + Johannes Stezenbach + John Hughes + John Spencer + Ju"rgen Fluk + Juergen Weigert + Keith Thompson + Kirill A. Shutemov + Kyle McMartin + Lai JiangShan + Leonard N. Zubkoff + Linus Torvalds + Lupe Christoph + Mark Wielaard + Marty Leisner + Matt Day + Matthias Pfaller + Maxim Shchetynin + Maxin B. John + Michael E Chastain + Michael Holzheu + Michail Litvak + Michal Ludvig + Mike Frysinger + Mike Stroyan + Muttley Meen + Namhyung Kim + Nate Eldredge + Nate Sammons + Neil Campbell + Paolo Bonzini + Paul Mundt + Pavel Machek + Peter Jones + Pádraig Brady + Rajeev V. Pillai + Ralf Baechle + Randolph Chung + Reuben Sumner + Richard Braakman + Richard Henderson + Richard Hirst + Roland Borde + Roland McGrath + Sami Farin + Scott Tsai + Sebastian Pipping + Sergei Trofimovich + Simon Murray + Solar Designer + Srinivasa Ds + Stanislav Brabec + Steve Bennett + Steve McIntyre + Thanh Ma + Thiemo Seufer + Thomas Bogendoerfer + Tim Yamin + Timo Lindfors + Tom Dyas + Tommi Rantala + Topi Miettinen + Ulrich Drepper + Wang Chao + Wichert Akkerman + Xiaoning Ding + Yang Zhiguo + Zach Brown + Zev Weiss + Zhang Le + Марк Коренберг diff --git a/alice-strace/ChangeLog b/alice-strace/ChangeLog new file mode 100644 index 0000000..c135d85 --- /dev/null +++ b/alice-strace/ChangeLog @@ -0,0 +1,7507 @@ +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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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). + + 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. + + 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 + + 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. + + 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. + + 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. + + 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 :) + + 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. + + 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 + + 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". + + 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). + + 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 + + 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]. + + 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. + + Improve comment text. No code changes. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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]. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + Stop needlessly using static variable. + * syscall.c: Remove static long psr. + (get_scno): Use local psr variable. + (get_syscall_result): Likewise. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + 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. + + 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 + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + 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 + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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'. + + 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/ + + qemu_multiarch_testing/: a directory with scripts for build testing. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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". + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + Define RLIM64_INFINITY only if not defined. + * resource.c (RLIM64_INFINITY): Define only if it isn't defined. + + 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. + + 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. + + 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. + + 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. + + Trivial optimization. + * strace.c (cleanup): Read 'interrupted' volatile variable only once. + + 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. + + 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. + + 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. + + 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. + + 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". + + 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. + + 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[] + + Trivial optimization. + * strace.c: Set default interactive = 1 statically instead + of doing it in main(). + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + Fix epoll_wait and epoll_pwait decoding. + * desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments + as integers. + + Reported-by: Марк Коренберг + + Decode EPOLLRDHUP. + * desc.c (epollevents): Add EPOLLRDHUP. + + Reported-by: Марк Коренберг + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 . + + 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. + + * syscall.c (sys_indir): Use %ld for printing long, not %u. + + 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. + + 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. + + 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. + + 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(). + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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". + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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 + + 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". + + 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. + + 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. + + * strace.c (verror_msg): Rewrite without use of heap memory allocation. + + 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. + + 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 + + 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 " )" + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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/alice-strace/ChangeLog-CVS b/alice-strace/ChangeLog-CVS new file mode 100644 index 0000000..b5262ad --- /dev/null +++ b/alice-strace/ChangeLog-CVS @@ -0,0 +1,5614 @@ +2009-07-08 Dmitry V. Levin + + Clean up spacing to fix warnings reported by git diff --check. + * ChangeLog: Fix spaces before tab in indent. + * bjm.c: Likewise. + * debian/changelog: Likewise. + * strace-graph: Likewise. + * syscall.c: Likewise. + * INSTALL: Fix trailing blank lines. + * README-linux: Likewise. + * README-svr4: Likewise. + * linux/sparc/gen.pl: Likewise. + * linux/sparc/syscall1.h: Likewise. + * linux/sparc64/syscall1.h: Likewise. + * linux/x86_64/gentab.pl: Likewise. + * sunos4/syscall.h: Likewise. + * test/Makefile: Likewise. + * debian/rules: Fix trailing whitespaces. + * desc.c: Likewise. + * svr4/syscallent.h: Likewise. + * test/childthread.c: Likewise. + * test/leaderkill.c: Likewise. + +2009-07-07 Dmitry V. Levin + + * .cvsignore: Remove. + * README-CVS: Rename to README-hacking. + * Makefile.am (EXTRA_DIST): Remove README-CVS. + +2009-06-01 Dmitry V. Levin + + * bjm.c (sys_query_module): Fix format warning reported by + gcc -Wformat-security. + * file.c (tprint_open_modes): Likewise. + * process.c (printargv): Likewise. + * signal.c (printsignal): Likewise. + + Clean up header checks. + * configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and + easily updated, and reduce merging errors in the future. + * system.c: Convert all non-standard #ifdef checks for specific + headers to regular #ifdef HAVE_*_H checks. + Signed-off-by: Mike Frysinger + +2009-04-20 Denys Vlasenko + + * file.c (printstatsol, printstat_sparc64): + Remove NULL/error check for addr parameter. + (printoldstat, printstat, printoldstat64): + Move NULL/error check for addr parameter + so that it happens before printstatsol/printstat_sparc64 calls. + +2009-04-16 Denys Vlasenko + + * file.c (print_dirfd): Use int for file descriptor, not a long. + * process.c (printwaitn): Use int for PID, not a long. + +2009-04-15 Denys Vlasenko + + * signal (sys_rt_sigtimedwait): Fix sigtimedwait syscall decoding. + +2009-04-15 Denys Vlasenko + + * signal (sys_rt_sigaction): Print struct sigaction correctly + in 32/64 environment. + * desc.c (printflock): Add #ifdefs around earlier flock 32/64 fix + so that we don't waste time on arches with one personality. + +2009-04-14 Denys Vlasenko + + * signal.c: Whitespace, comment, and style fixes, no code changes. + * file.c: Ditto. + * time.c: Ditto. + * process.c: Ditto. + * resource.c: Ditto. + +2009-03-23 Denys Vlasenko + + * system.c (sram_alloc_flag): Add L2_SRAM constant. + by Mike Frysinger (vapier AT gentoo.org). + (sys_sram_alloc): Fix improperly used %zu: + tcp->u_arg is not a size_t, it is a long. + * net.c (printcmsghdr): Fix improperly used %zu: + struct cmsghdr::cmsg_len is not a size_t. + +2009-03-10 Denys Vlasenko + + Decode fcntl's F_{GET,SET}LEASE, F_NOTIFY, and F_DUPFD_CLOEXEC. + By Mike Frysinger (vapier AT gentoo.org) + * desc.c: Add F_SETLEASE, F_GETLEASE, F_NOTIFY, + F_DUPFD_CLOEXEC to fcntlcmds[]. Create notifyflags[] array. + (sys_fcntl): Handle new flags. + + Optimize printing of open modes. + * defs.h: Declare sprint_open_modes(), + remove unused parameter in tprint_open_modes(). + * desc.c (sprint_open_modes): Move fuction definition from here... + * file.c (sprint_open_modes): To here. + (tprint_open_modes): Use sprint_open_modes(), it already + generates needed string. + * ipc.c: Remove unused parameter from calls + to tprint_open_modes(). + +2009-02-27 Denys Vlasenko + + AVR32 support by Hans-Christian Egtvedt + (hans-christian.egtvedt AT atmel.com). + * configure.ac: Make it recognize avr32. + * defs.h: Define LINUX_AVR32. + * linux/avr32/syscallent.h: New file. + * Makefile.am: Reference linux/avr32/syscallent.h. + * proc.c (change_syscall, setarg): Add support for avr32. + (struct xlat struct_user_offsets[]): Ditto. + * syscall.c (get_scno): Ditto. + (get_error, force_result, syscall_enter): Ditto. + * util.c (getpc, printcall): Ditto. + +2009-02-25 Denys Vlasenko + + CRIS support by Hinko Kocevar (hinko.kocevar AT cetrtapot.si) + * configure.ac: Make it recognize cris. + * process.c: Define ARG_xxx constants for cris. + (change_syscall): Add support for cris. + (struct_user_offsets): Add cris-specific data. + * signal.c (sys_sigreturn): Add support for cris. + * syscall.c (get_scno): Add support for cris. + (syscall_fixup): Add support for cris. + (get_error): Add support for cris. + (syscall_enter): Add support for cris. + (force_result): While at it, fix cpp directives indentation. + * util.c (printcall): Add support for cris. + +2009-02-24 Denys Vlasenko + + * process.c: Indent preprocessor directives so that nesting + can be figured out. Add PTRACE_SET_SYSCALL to ptrace_cmds[]. + * ioctlent.sh: Improved by Mike Frysinger. + * HACKING-scripts: New file by Mike Frysinger. + +2009-02-20 Denys Vlasenko + + Further signalent.h cleanup. + * linux/ia64/signalent.h: Remove, it is identical to common signalent.h + sans "SIGRTnn" definitions which are redundant. + * linux/powerpc/signalent.h: Remove, it is identical to common signalent.h + sans outdated "SIGUNUSED" which should be "SIGSYS". + * linux/s390/signalent.h: Ditto. + * linux/s390x/signalent.h: Ditto. + * Makefile.am: Remove references to the above files. + +2009-02-20 Denys Vlasenko + + Patch by Mike Frysinger (vapier AT gentoo.org). + * linux/ioctlent.sh: Update sed machinery to parse _IOC() macros + with two constants. + +2009-02-20 Denys Vlasenko + + Patch by Mike Frysinger (vapier AT gentoo.org). + * Makefile.am: Remove reference to linux/sh/signalent.h. + * linux/sh/signalent.h: Remove, it is identical to common signalent.h. + +2009-02-20 Denys Vlasenko + + Patch by Mike Frysinger (vapier AT gentoo.org). + * linux/errnoent.h: Make ERRNO_58 show EDEADLOCK for POWERPC. + * Makefile.am: Remove reference to linux/powerpc/errnoent.h. + * linux/powerpc/errnoent.h: Remove, we can use common errnoent.h now. + +2009-02-20 Denys Vlasenko + + Patch by Mike Frysinger (vapier AT gentoo.org). + Removing redundant errnoent.h files. + * Makefile.am: Remove reference to linux/ia64/errnoent.h, + linux/s390/errnoent.h, linux/s390x/errnoent.h and linux/sh/errnoent.h. + * linux/ia64/errnoent.h: Remove, this arch uses common errnoent.h. + * linux/s390/errnoent.h: Ditto. + * linux/s390x/errnoent.h: Ditto. + * linux/sh/errnoent.h: Ditto. + +2009-02-10 Roland McGrath + + * configure.ac: Check for struct sigcontext. + * signal.c [LINUX] [M68K] (struct sigcontext): Don't define it if + [HAVE_STRUCT_SIGCONTEXT]. + From Muttley Meen . + +2009-02-09 Denys Vlasenko + + * defs.h: Correct the comment about TCB_SUSPENDED. + * strace.c: Fix misplaced #endif. + * util.c: Indent preprocessor directives, mark code parts + which can never be reached by compilation because of + the combination of #if directives. These are likely dead code, + I want to remove them later. + +2009-01-29 Denys Vlasenko + + * strace.c (newoutf): Prevent -o FILENAME overflowing the stack. + (startup_attach): Fix wrong pid in "Process attached". + (handle_group_exit): Do not consider exit to be spurious if + tcb has TCB_STARTUP bit set - we can attach to the task + right before its death, it can legitimately happen. + (handle_stopped_tcbs): Ditto. + +2009-01-26 Denys Vlasenko + + * process.c (printwaitn): Add comment about wait4() pid expansion. + Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading + (by implying "any 64-bit platform"). + * defs.h: Remove now-unused LINUX_64BIT define. + * resource.c (sys_osf_getrusage): Fix indentation. + +2009-01-26 Denys Vlasenko + + * process.c (internal_clone): Fix fallout from tcb table expansion + simplification. Due to overlooked else, I forgot to group + fork_tcb(tcp) and alloctcb(pid) in a block. + +2009-01-23 Michal Nowak + + * syscall.c (get_scno): Fix warnings about unused variable 'pid'. + +2009-01-23 Michal Nowak + + * mem.c (print_ldt_entry): Fix warning: + Format '%#08lx' expects type 'long unsigned int', but + argument 2 was type 'unsigned int'. + +2009-01-17 Denys Vlasenko + + Two cleanups: tcb table expansion failure is not really a survivable + event, we do not have any viable way to continue. No wonder most + places where that is detected have FIXMEs. + It's way simpler to treat as fatal failure, and handle it inside + tcb table expansion finctions. + Second cleanup: tidy up haphazard locations of a few externs. + + * defs.h: Change return type of expand_tcbtab() to void. + Declare change_syscall(). + * process.c: Change all callsites of alloctcb(), alloc_tcb() and + fork_tcb(), removing now-redundant error checks. + (fork_tcb): Change return type to void - it can't fail now. + * strace.c: Move extern declarations out of function bodies. + Change all callsites of alloctcb(), alloc_tcb() and + fork_tcb(), removing now-redundant error checks. + (expand_tcbtab): Change return type to void - it can't fail now. + On failure to expand, print a message, clean up, and exit. + (alloc_tcb): On failure to expand, print a message, clean up, and exit. + * util.c (setbpt): Remove extern declaration from function body. + +2009-01-14 Denys Vlasenko + + * linux/bfin/syscallent.h: sys_futex has 6 parameters, not 5. + +2009-01-13 Denys Vlasenko + + Fixes for ptrace() argument parsing. + * process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, + PTRACE_GETSIGINFO, PTRACE_SETSIGINFO. + * defs.h: Declare several "extern const struct xlat" arrays here. + * desc.c: Remove open_mode_flags[] and open_access_modes[] + extern declarations. + * net.c: Remove open_mode_flags[] extern declaration. + * sock.c: Remove addrfams[] extern declaration. + * util.c: Remove struct_user_offsets[] extern declaration. + * signal.c: Remove open_mode_flags[] extern declaration. + +2009-01-06 Denys Vlasenko + + Output format fixes, improving the situation after recent + change which added beeter handling of processes suddenly + disappearing. Now we often do not finish last line + before exiting in those cases. + The only change affecting something other than output + is change in umovestr where we were calling + abort() on ptrace error. + + * strace.c (trace): If trace_syscall() failed with ESRCH, + finish current output line with " ". + (mp_ioctl): While we are at it, fix gross style mismatch + in this function definition. No code chages. + * syscall.c (trace_syscall): If decode fails on syscall exit, + finish current output line with "= ? ". + * util.c (umoven): Do not complain if error is ESRCH. + (umovestr): Do not complain and do not abort() if error is ESRCH. + * defs.h: Remove unused tcp parameter from printtrailer(). + * process.c: Adjust printtrailer() calls accordingly. + * strace.c: Adjust printtrailer() calls accordingly. + * syscall.c: Adjust printtrailer() calls accordingly. + +2009-01-06 Denys Vlasenko + + * desc.c (printflock): Fix display of fcntl(F_SETLK) on + non-native 32-bit architecture. + Fixes RH#471169 "format fcntl64() system calls for + 32 bit application incorrect". + * desc.c: const'ify two static struct xlat vector[]'s, + convert all remaining old style C parameter declarations + in this file. + +2008-11-13 Kirill A. Shutemov + + * linux/arm/syscallent.h: Update syscalls. + Based on patch by Enrico Scholz. + + * linux/arm/syscallent.h: Fix build on ARM EABI which does not + provide syscalls socketcall and ipc. + +2009-01-01 Andreas Schwab + + * net.c (sys_accept): Properly decode third argument as pointer to + int. + +2008-12-30 Denys Vlasenko + + Experimental support for -D option. + Unlike normal case, with -D *grandparent* process exec's, + becoming a traced process. Child exits (this prevents traced process + from having children it doesn't expect to have), and grandchild + attaches to grandparent similarly to strace -p PID. + This allows for more transparent interaction in cases + when process and its parent are communicating via signals, + wait() etc. Without -D, strace process gets lodged in between, + disrupting parent<->child link. + * strace.c: Add global flag variable daemonized_tracer for -D option. + (startup_attach): If -D, fork and block parent in pause(). + In this case we are already a child, we in fact created a grandchild. + After attaching to grandparent, grandchild SIGKILLs parent. + (startup_child): If -D, parent blocks in wait(), then + execs the program to strace. Normally (w/o -D), it is child + who execs the program. + (main): Detect -D option, call startup_attach() if it is given. + +2008-12-30 Kirill A. Shutemov + + Fix some warnings on ARM build. + * defs.h: include on arm too. + * syscall.c: EABI arm does not need decode_subcall(), + ifdef it out. + +2008-12-29 Nick Black + + * linux/syscallent.h: Mark sendfile(2) as network syscall. + * linux/*/syscallent.h: Same, for all architectures. + +2008-12-17 Denys Vlasenko + + Make strace detect when traced process suddenly disappeared + (prime example is randomly arriving SIGKILL). + * defs.h (do_ptrace, ptrace_restart): Declare new functions + * process.c: Use ptrace_restart instead of bare ptrace. + This catches and records ESRCH errors. + Print "" if syscall decode or result can't be + determined because of an earlier error in ptrace() + * syscall.c (trace_syscall): Stop indiscriminately bailing out + on errors, print "syscall(????" or even "????(????" but continue. + * util.c (do_ptrace, ptrace_restart): Define new functions. + (upeek): use do_ptrace in order to catch and record ESRCH. + Do not print error message in this case. + Fixes RH#472053. + +2008-12-17 Denys Vlasenko + + * signal.c (sys_sigaction, sys_rt_sigaction): Fix typo + in (sa_handler == SIG_IGN) comparison, it was using SIG_DFL + instead. + +2008-12-16 Denys Vlasenko + + * defs.h: Modify declaration of upeek to take struct tcb * + parameter instead of pid_t. + * process.c: Change all upeek calls accordingly. + * signal.c: Likewise. + * strace.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + +2008-11-11 Dmitry V. Levin + + * sock.c [LINUX] (sock_ioctl): Parse more SIOCS* ioctls. + +2008-12-09 Roland McGrath + + * strace.1 (DIAGNOSTICS): New section, describe exit behavior. + +2008-11-09 Dmitry V. Levin + + * process.c (prctl_options): Update constants from linux 2.6.27. + * system.c (capabilities): Add more capability values. + + * util.c (string_quote): Fix support for NUL-terminated string. + Add comments. + (printpathn): Fix the case when "..." was appended to the output + but no truncation was actually made. Add comments. + (printstr): Fix memory allocation. Fix two cases when "..." was + appended to the output but no truncation was actually made. + Add comments. + Fixes RH#470529. + +2008-10-23 Dmitry V. Levin + + Implement parsers for new linux syscalls. + * desc.c (do_dup2, [LINUX] sys_dup3): New functions. + (sys_dup2): Use do_dup2. + [LINUX] (sys_epoll_create1): New function. + [LINUX] (do_eventfd, sys_eventfd2): New functions. + [LINUX] (sys_eventfd): Use do_eventfd. + * net.c (do_pipe, [LINUX] sys_pipe2): New functions. + (sys_pipe): Use do_pipe. + * signal.c [LINUX] (do_signalfd, sys_signalfd4): New functions. + [LINUX] (sys_signalfd): Use do_signalfd. + * linux/syscall.h: Declare new sys_* functions. + * linux/syscallent.h: Hook up signalfd4, eventfd2, epoll_create1, + dup3, pipe2, inotify_init1. + * linux/x86_64/syscallent.h: Hook up paccept, signalfd4, eventfd2, + epoll_create1, dup3, pipe2, inotify_init1. + +2008-10-23 Mike Frysinger + + Port strace to the Blackfin architecture. + * configure.ac: Add bfin to supported architectures. + * process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture. + (change_syscall): Support Blackfin architecture. + * syscall.c: Declare r0 for Blackfin architecture. + (get_scno): Decode Blackfin syscall number. + (syscall_fixup): Extract Blackfin return value. + (get_error): Decode Blackfin return value. + (force_result): Poke Blackfin return value. + (syscall_enter): Extract Blackfin syscall arguments. + * defs.h: Define TCB_WAITEXECVE for Blackfin architecture. + * linux/syscall.h (sys_sram_alloc): Declare for Blackfin + architecture. + * system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall. + * util.c (getpc): Handle PC on Blackfin architecture. + (printcall): Likewise. + * linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin + headers. + * Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and + linux/bfin/syscallent.h. + +2008-09-18 Mike Frysinger + + * configure.ac: Accept uclinux hosts as linux. + +2008-10-22 Dmitry V. Levin + + Handle socket type flags introduced in linux 2.6.27. + * net.c (socktypes): Add SOCK_DCCP. + (sock_type_flags): New xlat structure. + (tprint_sock_type): New function. + (sys_socket, sys_socketpair): Use it to parse socket type and + socket type flags. + +2008-09-29 Dmitry V. Levin + + * strace.c (startup_child): Save child pid for future use. + (main): Exit/kill ourself with straced child's exitcode/signal. + (trace): If signalled process pid matches the saved child pid, + save the signal number. If terminated process pid matches the + saved child pid, save its exit status. + Patch from Denys Vlasenko + Fixes RH#105371. + +2008-09-12 Tomas Pospisek + Jan Kratochvil + + * strace.1 (DESCRIPTION): New description of unfinished system calls + and system calls restarting. + +2008-09-03 Dmitry V. Levin + + * desc.c (sys_fcntl): Do not initialize auxstr for failed syscall. + * process.c (sys_fork, sys_rfork) [USE_PROCFS]: Likewise. + * signal.c (sys_signal): Likewise. + * stream.c (internal_stream_ioctl): Likewise. + * time.c (sys_adjtimex): Likewise. + * syscall.c (trace_syscall): If RVAL_STR is set, then + print auxstr for failed syscall as well. + + * syscall.c (is_restart_error): New function. + * defs.h (is_restart_error): Declare it. + + * linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime(). + * time.c (sys_nanosleep): New function, based on is_restart_error(). + + * process.c (sys_prctl): Decode PR_SET_PDEATHSIG, PR_GET_PDEATHSIG, + PR_SET_DUMPABLE, PR_GET_DUMPABLE, PR_SET_KEEPCAPS, PR_GET_KEEPCAPS. + Fix PR_GET_UNALIGN decoder. + (prctl_options): Add more constants. + + * linux/syscallent.h: Use sys_prctl() decoder for "prctl" syscall. + * linux/alpha/syscallent.h: Likewise. + * linux/arm/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/x86_64/syscallent.h: Likewise. + +2008-09-02 Dmitry V. Levin + + * linux/x86_64/syscallent.h: Fix syscall numbers for "tee" and + "sync_file_range". + From Fernando Luis Vazquez Cao + +2008-08-28 Roland McGrath + + * strace.1 (BUGS): New section, mention SIGTRAP interference. + + * strace.spec (%ifarch %{strace64_arches}): Use cp -p instead of ln + for %{rhel} < 6. + + * configure.ac, NEWS: Version 4.5.18. + * strace.spec: 4.5.18-1. + +2008-08-24 Roland McGrath + + * linux/syscall.h (SYS_socket_subcall et al, SYS_ipc_subcall et al): + Don't define these if [__ARM_EABI__]. + Reported by Johannes Stezenbach . + + * syscall.c (trace_syscall): Conditionalize on [SYS_socket_subcall] + and [SYS_ipc_subcall] individually. + + * linux/powerpc/syscallent.h: Handle subpage_prot. + * mem.c [LINUX && POWERPC] (sys_subpage_prot): New function. + * linux/syscall.h [POWERPC]: Declare it. + From Simon Murray . + + * mem.c (mmap_prot): Handle PROT_SAO. + From Simon Murray . + + * mem.c (madvise_flags): Typo fixes. Rename to madvise_cmds. + (sys_madvise): Use printxval, not printflags. + Reported by Rajeev V. Pillai . + +2008-08-19 Roland McGrath + + * signal.c (sys_sigaction, sys_rt_sigaction): Don't omit the rest of + the struct after sa_handler is a known constant. Some sa_flags bits + have meaning even for SIG_IGN/SIG_DFL. + +2008-08-06 Jan Kratochvil + + * util.c (CLONE_VM): Define if not defined already. + (setbpt): Clear CLONE_VM in the case we already clear CLONE_VFORK for + SYS_clone and SYS_clone2. + Reported by Michal Nowak. + Fixes RH#455078. + +2008-08-06 Jan Kratochvil + + Fix compiler warnings. + * signal.c (sys_signal): Cast to SIG_* to the matching type LONG. + * strace.c (trace): Variables PSR and PC are now signed. + * syscall.c (syscall_enter): Variable RBS_END is now signed long. + Remove/add the RBS_END casts appropriately. + * util.c [IA64] (arg_setup): Variable BSP is now signed long. + Remove/add the BSP casts appropriately. + : Initialize *STATE. + +2008-07-31 Roland McGrath + + * Makefile.am (EXTRA_DIST): Add new linux/arm/ files. + + * file.c [LINUX] (struct kernel_dirent): Define it locally, + do not use . + Fixes RH#457291. + + * configure.ac: Add AC_HEADER_STDBOOL. + * defs.h [HAVE_STDBOOL_H]: #include . + Fixes Debian#492774. + +2008-07-24 Dmitry V. Levin + + * strace.c (main): Fix -F option backwards compatibility. + +2008-07-22 Roland McGrath + + * Makefile.am (EXTRA_DIST): Add new debian/ files. + +2008-07-21 Roland McGrath + + * configure.ac: Version 4.5.17. + * strace.spec: 4.5.17-1. + + * defs.h [LINUXSPARC]: Don't #include . + +2008-07-19 Frederik Schüler + + * debian/control: Add strace64 package. + * debian/rules: Use debhelper flag --same-arch instead of --arch in + order to build strace64 only on the specified architectures. + * debian/strace64.install: New file, list for dh_install. + * debian/strace64.manpages: New file, list for dh_install. + * debian/changelog: Add prereleases entries. + Fixes Debian#491167, Debian#491188. + +2008-07-18 Andreas Schwab + + * linux/ia64/syscallent.h: Decode mincore syscall. + + * linux/powerpc/syscallent.h: Fix argument count for request_key. + + * term.c (term_ioctl): Decode indirect parameter as int, not long. + +2008-07-17 Roland McGrath + + * NEWS, strace.spec: Updates in preparation for release. + + * process.c (printwaitn): When current personality's wordsize is + smaller than native, sign-extend the PID argument from 32 bits. + + * process.c (futexops): Update table. + (sys_futex): Handle FUTEX_WAIT_BITSET correctly. + From Ulrich Drepper . + Fixes RH#448628. + + * linux/syscallent.h: Fix "futex" argument count. + * linux/alpha/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + From Ulrich Drepper . + Fixes RH#448629. + + * signal.c (sigact_flags): Prefer SA_NODEFER to SA_NOMASK, + SA_RESETHAND to SA_ONESHOT. + Fixes RH#455821. + +2008-07-09 Frederik Schüler + + * debian/rules: Remove the broken udeb creation routines, and redo the + complete install procedure using debhelper. + * debian/strace.docs: New file, list for dh_installdocs. + * debian/strace.examples: New file, list for dh_installexamples. + * debian/strace.install: New file, list for dh_install. + * debian/strace-udeb.install: New file, list for dh_install. + * debian/strace.manpages : New file, list for dh_installmanpages. + * debian/copyright: Update. + * debian/control: Fix libc6 build dependency for alpha and ia64. + (strace-udeb: XC-Package-Type): Add header. + * debian/changelog: Cosmetic changes. + +2008-07-03 Jan Kratochvil + + Trace vfork under -f on all the platforms. + * strace.1 <-f>: Describe Linux catches new children immediately. + <-F>: Make the option obsolete. Move the SunOS VFORK comment to the + `-f' option description. + * defs.h (followvfork): Declaration removed. + * strace.c (followvfork): Variable removed. + (main) <-F>: Merge with the `-f' option. + (trace): Make !FOLLOWVFORK unconditional. + * process.c (internal_fork): Make !FOLLOWVFORK unconditional. + +2008-07-01 Frederik Schüler + + * debian/changelog: List all bugs closed since the last release. + * debian/control: Remove Wichert Akkerman from uploaders list. + * debian/control: Bump standards version to 3.8.0. + * debian/control: Add Homepage field. + * debian/rules: Fix dpkg-gencontrol call. + * debian/compat: New file, set to compatibility level 5. + * debian/rules: Call dh_clean on clean target. + * debian/rules: Add dh_md5sums call. + Fixes Debian#439428. + +2008-06-30 Jan Kratochvil + + Fix ia64 `-f' on clone2 formerly crashing the child. + * util.c [IA64] (restore_arg0, restore_arg1): Define as empty. + Fixes RH#453438. + +2008-06-27 Jan Kratochvil + + * util.c (CLONE_VFORK): Define if not defined already. + (setbpt): Clear CLONE_VFORK for SYS_clone and SYS_clone2. + Reported by Vitaly Mayatskikh. + Fixes RH#455078. + +2008-06-29 Dmitry V. Levin + + * linux/x86_64/syscallent.h: Remove duplicate syscall entries + for #283 and #284. + +2008-06-27 Jan Kratochvil + + * linux/syscallent.h: Remove a duplicite syscall stub #326. + +2008-05-27 Roland McGrath + + * syscall.c [LINUX] (is_negated_errno): New function. + (get_error) [LINUX]: Use it for all such cases. + Fixes RH#447587. + +2008-05-19 Roland McGrath + + * linux/x86_64/syscallent.h: Update entries for timerfd_* and fallocate. + + * file.c (sys_fallocate): New function. + * linux/syscall.h: Declare it. + * linux/syscallent.h: Update entry. + From Kyle McMartin . + + * time.c (sys_timerfd_create): New function. + (sys_timerfd_settime, sys_timerfd_gettime): New functions. + * linux/syscall.h: Declare them. + * linux/syscallent.h: Update entries for those syscalls. + From Kyle McMartin . + + * debian/rules (binary-arch): Fix chmod/chown typo. + Fixes Debian#459255. + + * debian/rules (binary-arch): Install strace-graph in examples/ + directory under package doc. + Fixes Debian#469068. + + * signal.c (sys_kill): When current personality's wordsize is smaller + than native, sign-extend the PID argument from 32 bits. + Fixes RH#430585. + + * configure.ac: Add check for struct sigcontext_struct in . + * signal.c [! HAVE_ASM_SIGCONTEXT_H] [I386] (struct sigcontext_struct): + Conditionalize definition on !HAVE_STRUCT_SIGCONTEXT_STRUCT. + Fixes Debian#456879. + + * util.c [LINUX] (setbpt): Use correct SYS_clone number for current + personality. + Fixes RH#447475. + +2008-05-08 David S. Miller + + * syscall.c (socket_map, sparc_socket_decode): Delete. + (trace_syscall): Use common socketcall and ipc subcall + support on sparc. + * linux/sparc/syscall.h (sys_semtimedop): Declare. + (SYS_socket_subcall, SYS_sub_socket, SYS_sub_bind, + SYS_sub_connect, SYS_sub_listen, SYS_sub_accept, + SYS_sub_getsockname, SYS_sub_getpeername, + SYS_sub_socketpair, SYS_sub_send, SYS_sub_recv, + SYS_sub_sendto, SYS_sub_recvfrom, SYS_sub_shutdown, + SYS_sub_setsockopt, SYS_sub_getsockopt, SYS_sub_sendmsg, + SYS_sub_recvmsg, SYS_socket_nsubcalls, SYS_ipc_subcall, + SYS_sub_semop, SYS_sub_semget, SYS_sub_semctl, + SYS_sub_semtimedop, SYS_sub_msgsnd, SYS_sub_msgrcv, + SYS_sub_msgget, SYS_sub_msgctl, SYS_sub_shmat, + SYS_sub_shmdt, SYS_sub_shmget, SYS_sub_shmctl, + SYS_ipc_nsubcalls): Define + * linux/sparc/syscallent.h: Add socketcall and ipc entries. + +2008-01-25 Bruna Moreira + + * defs.h [ARM]: Define SUPPORTED_PERSONALITIES to 2. + * syscall.c (get_scno) [ARM]: Add support for architecture specific + syscalls. + * linux/arm/syscallent.h: Update network syscalls list. + * linux/arm/syscallent1.h: New file. Add new architecture specific + syscalls. + * linux/arm/errnoent1.h: New file. + * linux/arm/ioctlent1.h: New file. + * linux/arm/signalent1.h: New file. + Fixes Debian#441000. + +2008-01-07 Paul Mundt + + * linux/sh64/syscallent.h: Update numerous calls, fix others. + +2007-08-26 Daniel Jacobowitz + + * defs.h [MIPS]: Include . + (MAX_QUALS): Update for MIPS. + (LINUX_MIPSO32, LINUX_MIPSN32, LINUX_MIPSN64, LINUX_MIPS64): Define. + (struct tcb): Add ext_arg for MIPS N32. + (TCB_WAITEXECVE): Define for MIPS. + (ALIGN64): Use LINUX_MIPSO32. + * file.c (sys_lseek): Use ext_arg for MIPS N32. + (sys_readahead, sys_fadvise64_64): Likewise. + * io.c (sys_pread64, sys_pwrite64): Likewise. + * mem.c (print_mmap): Take OFFSET argument. + (sys_old_mmap): Update call to print_mmap. + (sys_mmap): Use ext_arg for MIPS N32. + * process.c (struct_user_offsets): Add MIPS registers. + * signal.c (sys_sigreturn): Handle MIPS N32 and MIPS N64. Correct + MIPS O32 call to sprintsigmask. + * syscall.c (internal_syscall): Handle MIPS N32. Check for + TCB_WAITEXECVE on MIPS. + (force_result): Add a comment about MIPS N32. + (syscall_enter): Handle MIPS N32 and MIPS N64. + * linux/syscall.h (sys_pread64, sys_pwrite64): Declare. + * linux/mips/syscallent.h: Include "dummy.h". Handle alternate + MIPS ABIs. + +2008-04-19 Dmitry V. Levin + + * file.c [_LFS64_LARGEFILE] (sys_getdents64): Do the same + d_reclen check as in sys_getdents: warn if d_reclen is 0 rather + than looping forever. + [FREEBSD] (sys_getdirentries): Likewise. + Signed-off-by: Mike Frysinger + + * file.c [LINUXSPARC] (printstatsol): Fix sprinttime() + invocation. The sprinttime() function takes a time_t argument, + but timestruct_t argument was given. + Signed-off-by: Mike Frysinger + + * file.c (sprinttime): Check localtime() return value, to avoid + potential NULL dereference due to invalid time structures. + Signed-off-by: Harald van Dijk + Signed-off-by: Mike Frysinger + + * linux/errnoent.h: Update errno list based on latest + linux/errno.h and asm-generic/errno*.h files. + Signed-off-by: Mike Frysinger + + * signalent.sh: Fix sort(1) old-style options. + * syscallent.sh: Likewise. + Signed-off-by: Mike Frysinger + + * count.c (call_summary_pers): Check calloc() return value. + Signed-off-by: "Yang Zhiguo" + +2008-03-26 Roland McGrath + + * strace.spec (strace64_arches): Add sparc64. + +2007-11-20 Roland McGrath + + * CREDITS, ChangeLog: Converted contents to UTF8. + +2007-11-19 Roland McGrath + + * strace.spec: Add BuildRequires on libaio-devel, libacl-devel. + +2007-11-19 Andreas Schwab + + * process.c (sys_ptrace) [IA64]: For PTRACE_PEEKDATA, + PTRACE_PEEKTEXT and PTRACE_PEEKUSER the data is returned directly. + + * linux/syscallent.h: Fix argument count for getdents64. + * linux/arm/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + * linux/ia64/syscallent.h: Use sys_getdents64. + * linux/sh/syscallent.h: Likewise. + +2007-11-06 Jan Kratochvil + + * strace.c [LINUX] (droptcb): Recurse on TCP->parent if it is a + TCB_EXITING zombie group leader. + * test/childthread.c: New file. + * test/.cvsignore, test/Makefile: Add it. + Code advisory: Roland McGrath + Fixes RH#354261. + +2007-11-03 Roland McGrath + + * process.c (prctl_options): Add numerous constants. + From Sami Farin . + Fixes RH#364401. + +2007-11-03 Jan Kratochvil + + * strace.c (main): Move the STARTUP_CHILD call before setting up the + signal handlers. New comment about the valid internal states. + +2007-11-02 Thiemo Seufer + + * signal.c (m_siginfo_t): Add for MIPS. + (sys_sigreturn): struct sigcontext on MIPS has no sigset_t member, + acquire the signal mask with the same trick as on Sparc. + Fixes Debian#448802. + +2007-11-01 Roland McGrath + + * util.c (string_quote): Return nonzero if the string was unterminated. + (printstr): Use that value instead of just our own test. + (printpathn): Likewise. + Fixes RH#358241. + + * linux/mips/syscallent.h: Fix argument count for fadvise64_64. + From Paul Mundt . + + * linux/mips/syscallent.h: Fix argument count for lookup_dcookie. + From Paul Mundt . + + * linux/sh64/syscallent.h: Fix SYS_socket_subcall check. + From Paul Mundt . + + * linux/sh/syscallent.h: Update numerous calls. + From Paul Mundt . + +2007-09-22 Dmitry V. Levin + + * desc.c (sys_pselect6): Decode signal mask when entering syscall. + Relax signal mask size check. + + * time.c (print_timespec, sprint_timespec): New functions. + * defs.h (print_timespec, sprint_timespec): Declare them. + * desc.c (sys_io_getevents): Use print_timespec. + * stream.c (sys_ppoll): Likewise. + (decode_poll): Use sprint_timespec. + +2007-09-22 Alan Curry + Dmitry V. Levin + + * stream.c (decode_poll): Rearrange so that arguments are decoded + and printed on syscall entry, except for revents and the output + timespec which are now printed in the auxstr. + (sys_poll): Print the input timeout argument on syscall entry. + [LINUX] (sys_ppoll): Likewise. + Fixes Debian#369651. + +2007-09-22 Dmitry V. Levin + + * desc.c (sprintflags): Remove static qualifier, add "prefix" + argument, move function to ... + * util.c (sprintflags): ... here. + * defs.h (sprintflags): Declare it. + +2007-11-01 Roland McGrath + + * syscall.c (get_scno) [ARM]: Check TCB_WAITEXECVE. + Reported by Bernhard Fischer . + + * net.c (sockpacketoptions): Make PACKET_ADD_MEMBERSHIP and + PACKET_DROP_MEMBERSHIP conditional. + From Bernhard Fischer . + + * configure.ac: Match sh64* for SH64, sh* for SH. + Reported by Bernhard Fischer . + +2007-10-01 Dmitry V. Levin + + * net.c (printsock): Output AF_UNIX socket address using + printpathn() to avoid unprintable characters in output. + Suggested by Neil Campbell. + +2007-10-01 Dmitry V. Levin + + * util.c (string_quote): Move quoting code from ... + (printstr) ... here. Use string_quote. + (printpathn): Update for new string_quote interface. + (printpath): Use printpathn. + +2007-09-25 Dmitry V. Levin + + * strace.c (main): Use calloc for tcbtab allocation. + Check calloc return value. + Reported by Bai Weidong. + +2007-09-11 Roland McGrath + + * linux/sparc/syscall.h: Add missing decls. + * linux/sparc/syscallent.h: Correct entries for setgroups32, + getgroups32, sys_getdents64. + From Jakub Bogusz . + + * linux/alpha/syscallent.h: Correct entries for madvise, setresgid, + getresgid, pivot_root, mincore, pciconfig_iobase, getdents64. + From Jakub Bogusz . + + * linux/syscallent.h: Fix getegid32 entry. + From Jakub Bogusz . + + * defs.h [LINUXSPARC]: Use asm/psrcompat.h for [SPARC64], not asm/psr.h. + From Jakub Bogusz . + + * mem.c (sys_getpagesize): Define for [SPARC || SPARC64] too. + From Jakub Bogusz . + +2007-08-20 Dmitry V. Levin + + * syscall.c (qual_syscall, qualify): Fix nsyscalls and MAX_QUALS misuse. + Reported by Xiaoning Ding. + +2007-08-06 Jan Kratochvil + Roland McGrath + + * file.c [!HAVE_STAT64 && LINUX && X86_64] (struct stat64): Define it. + [!HAVE_STAT64 && LINUX && X86_64] (HAVE_STAT64, STAT64_SIZE): Define. + [HAVE_STAT64] (printstat64) [STAT64_SIZE]: Add compile-time assertion. + Fixes RH#222275. + + * file.c (printstat64): Test [HAVE_LONG_LONG] for st_size printing + and cast to widest type available. + +2007-08-03 Ulrich Drepper + + * file.c (open_mode_flags): Add O_CLOEXEC. + * net.c (msg_flags): Add MSG_CMSG_CLOEXEC. + Fixes RH#365781. + +2007-08-03 Roland McGrath + + * configure.ac, NEWS: Version 4.5.16. + * debian/changelog, strace.spec: 4.5.16-1. + + * debian/control (Build-Depends): Replace libc6-dev-s390x and + libc6-dev-sparc64 with gcc-multilib. + * debian/rules: Replace sparc-linux, s390-linux conditionals with + general "arch64_map" hair, handle x86_64 and powerpc64 too. + From Matthias Klose . + Fixes Debian#435303. + +2007-08-02 Jan Kratochvil + + * strace.c (detach): Moved the resume notification code to ... + (resume_from_tcp): ... a new function here. + (handle_group_exit): No longer detach also the thread group leader. + (trace): Fixed panic on exit of the TCB_GROUP_EXITING leader itself. + Fixes RH#247907. + + * test/leaderkill.c (start): Renamed to ... + (start0): ... here. + (start1): New function. + (main): Created a new spare thread. + +2007-08-01 Roland McGrath + + * util.c (umoven): Don't perror for EIO. + (umovestr): Likewise. + + * process.c (printargv): Handle boundary cases correctly. + Handle biarch fetching correctly. + + * util.c (printstr): Don't print ... if the string matches the length + limit exactly. + + * linux/sparc64/syscallent.h: Just #include the sparc file. + * linux/sparc64/syscallent1.h: Likewise. + * linux/sparc64/syscallent2.h: Likewise. + + * linux/arm/syscallent.h: Add entry for getcpu. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/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/sparc64/syscallent.h: Likewise. + + * linux/arm/syscallent.h: Add entry for eventfd. + * linux/ia64/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/sparc64/syscallent.h: Likewise. + + * linux/arm/syscallent.h: Add entry for timerfd. + * linux/ia64/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/sparc64/syscallent.h: Likewise. + + * linux/arm/syscallent.h: Add entry for signalfd. + * linux/ia64/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/sparc64/syscallent.h: Likewise. + + * linux/hppa/syscallent.h: Add entry for epoll_pwait. + * linux/ia64/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/sparc64/syscallent.h: Likewise. + +2007-07-23 Ulrich Drepper + + * process.c (sys_getcpu): New function. + * linux/syscall.h: Declare sys_getcpu. + * linux/syscallent.h: Add entry for getcpu. + + * desc.c (sys_eventfd): New function. + * linux/syscall.h: Declare sys_eventfd. + * linux/syscallent.h: Add entry for eventfd. + * linux/x86_64/syscallent.h: Likewise. + + * time.c (printitv_bitness): Add missing braces to enclose + conditional code. + (TDF_TIMER_ABSTIME): Define if not already. + (timerfdflags): New variable. + (sys_timerfd): New function. + * linux/syscall.h: Declare sys_timerfd. + * linux/syscallent.h: Add timerfd entry. + * linux/x86_64/syscallent.h: Likewise. + + * linux/syscall.h: Declare sys_signalfd. + * linux/syscallent.h: Add entry for signalfd. + * linux/x86_64/syscallent.h: Likewise. + * signal.c (sys_signalfd): New function. + + * desc.c (sys_epoll_wait): Move body of function to ... + (epoll_wait_common): ...here. New function. + (sys_epoll_pwait): New function. + * linux/syscall.h: Declare sys_epoll_pwait. + * linux/syscallent.h: Add entry for epoll_pwait. + * linux/x86_64/syscallent.h: Likewise. + +2007-07-23 Roland McGrath + + * time.c (printtv_bitness): SPECIAL only counts when tv_sec == 0. + + * linux/arm/syscallent.h: Add move_pages. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/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/sparc64/syscallent.h: Likewise. + + * linux/syscallent.h: move_pages takes 6 args, not 5. + * linux/x86_64/syscallent.h: Likewise. + +2007-07-23 Ulrich Drepper + + * defs.h: Add new parameter to printtv_bitness prototype. + (printttv): Pass zero for the new parameter. + (printtv_special): New macro. + * desc.c (decode_select): Pass zero for the new parameter of + printtv_bitness. + * file.c (utimensatflags): New macro. + (sys_osf_utimes): Pass zero for the new parameter of + printtv_bitness. + (sys_utimes): Likewise. + (sys_futimesat): Likewise. + (decode_utimes): Add new parameter. Pass it to the + printtv_bitness calls. Fix printing of time values. + (sys_utimensat): New function. + * time.c (UTIME_NOW, UTIME_OMIT): Define if not already + happened. + (printtv_bitness): Add new parameter. Print special UTIME_* + values as strings if set. + (sys_osf_gettimeofday): Pass zero for the new parameter of + printtv_bitness. + (sys_osf_settimeofday): Likewise. + * linux/syscall.h: Declare sys_utimensat. + * linux/syscallent.h: Add utimensat entry. + * linux/x86_64/syscallent.h: Likewise. + + * mem.c (move_pages_flags): New variable. + (sys_move_pages): New function. + * linux/syscall.h: Declare sys_move_pages. + * linux/syscallent.h: Add entry for sys_move_pages. + * linux/x86_64/syscallent.h: Likewise. + + * mem.c (MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Define. + (mbindflags): Add MPOL_MF_MOVE and MPOL_MF_MOVE_ALL entries. + +2007-07-23 Roland McGrath + + * util.c (tv_add): Fix rounding comparison. + Reported by Bai Weidong . + +2007-07-11 Roland McGrath + + * count.c (call_summary_pers): Use tv_float conversion for output of + cumulative time, in case it is negative from bogus -O value. + From Lai JiangShan . + + * strace.c (handle_group_exit): Detach TCP before LEADER. + Don't use PTRACE_KILL on LEADER. + + * util.c (printstr): Fix size calculation for outstr allocation. + + * configure.ac (struct sigcontext.sc_hi2): Use #ifdef around + to match signal.c include conditions. + +2007-07-05 Roland McGrath + + * debian/rules: Use debian/$(package) instead of debian/tmp as temp dir. + + * configure.ac: Use before . + + * debian/changelog: Harmonize with debian version. + * debian/control (Uploaders): Fix surname spelling. + (Build-Depends): Make debhelper requirement (>= 5.0.0). + (Standards-Version): Update to 3.7.2. + + * .cvsignore: Add some automake-created files. + + * file.c (sys_utime): Use personality_wordsize to handle biarch. + Fixes RH#247185. + + * signal.c (sys_sigreturn) [MIPS]: Pass 3rd arg to sprintsigmask. + From Zhang Le . + + * strace.c (strace_fopen): [_LFS64_LARGEFILE]: Use fopen64. + Fixes Debian#385310. + + * strace.c (main): Fix error message for unfound -u user. + From Srinivasa Ds . + Fixes RH#247170. + + * debian/control (Architecture): Add armel. + + * linux/syscallent.h: Fix sys_delete_module arg count. + * linux/alpha/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/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/sparc64/syscallent.h: Likewise. + * linux/sparc64/syscallent2.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/dummy.h (sys_delete_module): Use sys_open. + From Johannes Stezenbach . + + * configure.ac: Check for struct sigcontext.sc_hi2. + * signal.c (sys_sigreturn) [MIPS]: Use sc_hi2 vs sc_sigset if found. + + * process.c [LINUX] (futexops): Add many new values. + [LINUX] (futexwakeops, futexwakecmps): New tables. + [LINUX] (sys_futex): Use them. + From Ulrich Drepper . + Fixes RH#241467. + +2007-07-05 Jan Kratochvil + + * strace.c (detach): New prototype. Extended the function comment. + [LINUX] (detach): Call droptcb() instead of the wrongly parametrized + detach() call. + (handle_group_exit): Call droptcb() instead of the wrongly parametrized + detach() call. Always call detach() only once from the group leader. + Comment the leader killing known bug tested by `test/leaderkill.c'. + Code advisory: Roland McGrath + Fixes RH#240961. + + * test/leaderkill.c: New file. + * test/.cvsignore, test/Makefile: Add it. + +2007-03-21 Andreas Schwab + + * file.c (sys_newfstatat): Don't use printstat64 on ppc64. + +2007-03-29 Vladimir Nadvornik + Dmitry V. Levin + + Trace linux SG_IO ioctl arguments and results. + * scsi.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (scsi_ioctl): New function. + * ioctl.c (ioctl_decode): Use scsi_ioctl(). + +2007-06-28 Dmitry V. Levin + + * util.c (tv_mul): Multiply tv_usec properly. + Patch from Cai Fei . + +2007-06-11 Jan Kratochvil + + Never interrupt when the attached traced process would be left stopped. + * strace.c (main): `-p' attaching moved to ... + (startup_attach): ... a new function, renamed a variable C to TCBI. + Block interrupting signals since the first tracee has been attached. + New comment about INTERRUPTED in the nonthreaded case. + [LINUX] (startup_attach): Check INTERRUPTED after each attached thread. + (main): Command spawning moved to ... + (startup_child): ... a new function, replaced RETURN with EXIT. + [LINUX] (detach): New variable CATCH_SIGSTOP, do not signal + new SIGSTOP for processes still in TCB_STARTUP. + (main): Move signals and BLOCKED_SET init before the tracees attaching, + [SUNOS4] (trace): Removed fixvfork () call as a dead code, SIGSTOP must + have been already caught before clearing TCB_STARTUP. + (trace): Removed the `!WIFSTOPPED(status)' dead code. + Clear TCB_STARTUP only in the case the received signal was SIGSTOP. + New comment when `TCB_BPTSET && TCB_STARTUP' combination can be set. + Code advisory: Roland McGrath + Fixes RH#240986. + +2007-05-24 Jan Kratochvil + + * strace.c [LINUX] (my_tgkill): New macro. + [LINUX] (detach): Use my_tgkill () instead of kill(2). + Fixes RH#240962. + +2007-03-30 Dmitry V. Levin + + * mem.c (mmap_flags): Add MAP_32BIT. + Reported by Kirill A. Shutemov. + +2007-01-12 Dmitry V. Levin + + * sock.c (sock_ioctl): Check umove() return code. + [LINUX]: Handle SIOCGIFTXQLEN and SIOCGIFMAP. + +2007-03-16 Roland McGrath + + * linux/s390/syscallent.h: Use sys_restart_syscall for 7. + * linux/s390x/syscallent.h: Likewise. + +2007-02-18 Roland McGrath + + * strace.spec (Summary): Remove trailing period. + (%files): Add %doc files. + (%changelog): Double %s in text. + (BuildRoot): Change to Fedora canonical. + (%install): Don't use %makeinstall macro. + (%build): Use %{?_smp_mflags}. + +2007-01-16 Roland McGrath + + * configure.ac, NEWS: Version 4.5.15. + * debian/changelog, strace.spec: 4.5.15-1. + +2007-01-16 Dmitry V. Levin + + Update mount parser to match kernel behaviour. + * system.c [LINUX] (MS_VERBOSE): Rename to MS_SILENT. + [LINUX] (MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED): + New macros. + [LINUX] (mount_flags): Add them. + [LINUX] (MS_MGC_MSK): New macro. + [LINUX] (sys_mount): Update parser to match kernel behaviour: + discard MS_MGC_VAL magic, do not decode type and/or data + strings when specified flags do not imply valid strings. + +2007-01-12 Dmitry V. Levin + + * time.c [LINUX] (tprint_timex32, tprint_timex): Decode adjtimex + modes as flags. + +2007-01-11 Dmitry V. Levin + + Update umount parser. + * system.c [LINUX] (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): New macros. + [LINUX] (umount_flags): New xlat structure with MNT_* entries. + [LINUX] (sys_umount2): Use umount_flags. + + Fix open(2) flags parser. + * defs.h (tprint_open_modes): New function. + * desc.c (sprint_open_modes): New function. + (sys_fcntl): Use tprint_open_modes() and sprint_open_modes(). + * file.c (openmodes): Split xlat into open_access_modes and + open_mode_flags. + (tprint_open_modes): New function. + (decode_open): Use it. + * ipc.c (sys_mq_open, printmqattr): Likewise. + Fixes RH#222385. + +2007-01-11 Roland McGrath + + * configure.ac, NEWS: Version 4.5.15. + * debian/changelog, strace.spec: 4.5.15-1. + + * debian/control (Uploaders): Add Frederik Schueler . + + * strace.spec (Release): Use %{?dist}. + + * system.c [LINUX] (CTL_CPU): Define in case header is missing it. + +2006-12-27 Dmitry V. Levin + + Add const qualifier to xlookup() return value. + * defs.h (xlookup): Add const qualifier to return value. + * desc.c (sprintflags): Likewise. + * process.c (printpriv): Update xlookup() use. + * signal.c (sprintsigmask): Add const qualifier to first argument and + return value. + * util.c (xlookup): Add const qualifier to return value. + (printxval): Update xlookup() use. + +2006-12-21 Dmitry V. Levin + + Move counts code to separate file. + * count.c: New file. + * Makefile.am (strace_SOURCES): Add count.c. + * syscall.c (call_counts, countv, counts, shortest, time_cmp, + syscall_cmp, count_cmp, sortfun, overhead, set_sortby, + set_overhead, call_summary_pers, call_summary): Move to count.c + * count.c (count_syscall): New function. + * defs.h (count_syscall): Declare it. + * syscall.c (trace_syscall): Use it. + +2006-12-20 Dmitry V. Levin + + * syscall.c (internal_syscall): Change conditions for internal_exit, + internal_fork, internal_clone, internal_exec and internal_wait + calls from switching on known scno values to switching on known + sysent[tcp->scno].sys_func values. + Fixes RH#179740. + + Show system call summary for each personality. + * syscall.c (countv): New call_counts pointers array. + (counts): Convert to macro wrapper around countv. + (call_summary_pers): New function. + (call_summary): Use it for each personality. + Fixes RH#192193. + +2006-12-12 Dmitry V. Levin + + Fix -ff -o behaviour. Fix piping trace output. + * defs.h (newoutf): Remove. + (alloctcb): Rename to alloc_tcb. Add alloctcb() macro wrapper + around alloc_tcb(). + * process.c [!USE_PROCFS] (internal_clone, internal_fork): + Remove newoutf() call. + * strace.c (set_cloexec_flag, strace_fopen, strace_popen, + swap_uid): New functions. + (popen_pid): New variable. + (newoutf): Make static, use strace_fopen(). + (main): Use strace_fopen() and strace_popen(), remove uids + swapping. Do not open outfname when followfork > 1. + Reinitialize tcp->outf properly. + (alloctcb): Rename to alloc_tcb. Use newoutf(). + (trace): Check popen_pid. Remove newoutf() call. + [USE_PROCFS] (proc_open, proc_poll_open): Use set_cloexec_flag(). + Fixes RH#204950, RH#218435, Debian#353935. + +2006-12-10 Dmitry V. Levin + + Add biarch support for "struct sigevent". + * time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (printsigevent32): + New function. + [LINUX] (printsigevent): [SUPPORTED_PERSONALITIES > 1] + Handle 32-bit personality. + + Add biarch support for "struct timex". + * time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32): + New function. + [LINUX] (tprint_timex): New function. + [LINUX] (sys_adjtimex): Use it. + + Enhance adjtimex parser. + * time.c [LINUX] (adjtimex_modes, adjtimex_status, + adjtimex_state): New xlat structures. + [LINUX] (sys_adjtimex): Print the whole struct timex. + Decode modes, status and return code. + + Add biarch support for "struct itimerval". + * time.c (printitv): Rename to printitv_bitness(). + Add printitv() macro wrapper around printitv_bitness(). + (printitv_bitness): Handle 32-bit personality. + [ALPHA] (sys_osf_getitimer, sys_osf_setitimer): + Use printitv_bitness(). + (tprint_timeval, tprint_timeval32): New functions. + (printtv_bitness, printitv_bitness, sys_adjtimex): Use them. + (printitv32): Remove. + + Add biarch support for "struct timeval". + * defs.h (bitness_t): New enum type. + (printtv_bitness, sprinttv): New function prototypes. + (printtv): Convert to macro wrapper around printtv_bitness(). + (printtv32): Remove. + * desc.c (decode_select): Use printtv_bitness() and sprinttv(). + (sys_oldselect, sys_osf_select, sys_select, sys_pselect6): + Update decode_select() use. + * file.c [ALPHA] (sys_osf_utimes): Use printtv_bitness(). + * time.c (printtv_bitness, sprinttv): New functions. + (printtv, printtv32): Remove. + [ALPHA] (sys_osf_settimeofday, sys_osf_settimeofday): + Use printtv_bitness(). + Fixes RH#171626, RH#173050. + + Add biarch support for "struct iovec". + * defs.h (personality_wordsize): Add. + * io.c [HAVE_SYS_UIO_H] (tprint_iov): [LINUX && + SUPPORTED_PERSONALITIES > 1] Handle 32-bit personality. + * util.c [HAVE_SYS_UIO_H] (dumpiov): [LINUX && + SUPPORTED_PERSONALITIES > 1] Likewise. + Patch from Jakub Jelinek. + Fixes RH#218433. + + * time.c (sys_timer_create): Check umove() return code. + + Make several global variables static. + #ifdef definitions of rarely unused functions. + * defs.h (rflag, tflag, outfname): Remove. + * strace.c (iflag, interactive, pflag_seen, rflag, tflag, + outfname, username): Make static. + * desc.c (sys_getdtablesize): Define only for + ALPHA || FREEBSD || SUNOS4. + * file.c (sys_fchroot): Define only for SUNOS4 || SVR4. + (sys_mkfifo): Define only for FREEBSD. + * mem.c (sys_sbrk): Define only for FREEBSD || SUNOS4. + (sys_getpagesize): Define only for + ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4. + * net.c (sys_so_socket): Define only for SVR4. + * process.c (sys_gethostid): Define only for + FREEBSD || SUNOS4 || SVR4. + (sys_gethostname): Define only for + ALPHA || FREEBSD || SUNOS4 || SVR4. + (sys_setpgrp): Define only for ALPHA || SUNOS4 || SVR4. + (sys_execv): Define only for SPARC || SPARC64 || SUNOS4. + * signal.c (sys_sigblock): Define only for FREEBSD || SUNOS4. + (sys_sighold, sys_sigwait): Define only for SVR4. + (sys_killpg): Define only for FREEBSD || SUNOS4. + * stream.c (sys_getmsg): Define only for + SPARC || SPARC64 || SUNOS4 || SVR4. + * syscall.c (sys_indir): Define only for SUNOS4. + +2006-11-27 Dmitry V. Levin + + * system.c [LINUX]: Define CTL_PROC, since Linux 2.6.18+ headers + removed CTL_PROC enum. Patch from Jakub Jelinek. + [LINUX] (sysctl_root): Add CTL_BUS, CTL_ABI and CTL_CPU. + +2006-11-20 Jakub Jelinek + + * linux/ia64/syscallent.h: Add #if check to make sure that + SYS_socket_subcall adjustment isn't forgotten again. + +2006-10-16 Dmitry V. Levin + + Implement comprehensive quotactl(2) parser for Linux. + * Makefile.am (strace_SOURCES): Add quota.c. + * quota.c: New file. + * resource.c: Remove old quotactl(2) parser. + Fixes RH#118696. + +2006-10-14 Dmitry V. Levin + + * configure.ac (AC_CHECK_HEADERS): Add inttypes.h. + * file.c [_LFS64_LARGEFILE && (LINUX || SVR4)]: + Include . + (sys_getdents64): Use PRIu64/PRId64 to avoid gcc warnings on + 64-bit platforms. + + * strace.c (main): Check getcwd() return code. + +2006-10-13 Ulrich Drepper + Bernhard Kaindl + Dmitry V. Levin + Michael Holzheu + + Add hooks for new syscalls. Add decoders for *at, inotify*, + pselect6, ppoll and unshare syscalls. + + * defs.h: Declare print_sigset. + * desc.c (sys_pselect6): New function. + * file.c (decode_open, decode_access, decode_mkdir, + decode_readlink, decode_chmod, decode_utimes, decode_mknod): + New functions. + (sys_open, sys_access, sys_mkdir, sys_readlink, sys_chmod, + sys_utimes, sys_mknod): Use them. + [LINUX] (fstatatflags, unlinkatflags, inotify_modes): New + variables. + [LINUX] (print_dirfd, sys_openat, sys_faccessat, + sys_newfstatat, sys_mkdirat, sys_linkat, sys_unlinkat, + sys_symlinkat, sys_readlinkat, sys_renameat, sys_fchownat, + sys_fchmodat, sys_futimesat, sys_mknodat, sys_inotify_add_watch, + sys_inotify_rm_watch): New functions. + * process.c [LINUX] (sys_unshare): New function. + * signal.c (print_sigset): New function. + (sys_sigprocmask): Use it. + * stream.c (decode_poll): New function. + (sys_poll): Use it. + [LINUX] (sys_ppoll): New function. + * linux/syscall.h: Delcare new syscall handlers. + * linux/syscallent.h: Hook up new syscalls. + * linux/alpha/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + Fixes RH#178633. + +2006-10-06 Dmitry V. Levin + + * strace.c [!USE_PROCFS] (trace): Presence of PT_GETSIGINFO + macro does not mean that PT_CR_IPSR and PT_CR_IIP macros are + also defined, so check them along with PT_GETSIGINFO. + Fixes RH#209856. + +2006-09-01 Dmitry V. Levin + + * file.c (print_xattr_val): Fix memory corruption bug reported + by James Antill. + Fixes RH#200621. + +2006-04-21 Dmitry V. Levin + + * defs.h [LINUX && X86_64 && !__NR_exit_group]: Define + __NR_exit_group. + +2006-03-29 Dmitry V. Levin + + Fix race conditions in tcb allocation. + * process.c (fork_tcb): Return error code as documented. Do not + print "tcb table full" error message. + [USE_PROCFS] (internal_fork): Do not print "tcb table full" + error message. + [SYS_clone || SYS_clone2] (internal_clone, internal_fork): Call + fork_tcb() before alloctcb(). Do not print "tcb table full" + error message. + * strace.c (main): Do not print "tcb table full" error message. + (expand_tcbtab): Print error message in case of memory allocation + failure. + (alloctcb): Print error message when tcb table is full. + (trace): Expand tcb table if necessary prior to allocating + entry there. Do not print "tcb table full" error message. + Fixes RH#180293. + +2006-08-22 Roland McGrath + + * ipc.c (sys_msgget, sys_semget, sys_shmget): Show key values in hex. + Fixes RH#198179. + +2006-08-21 Roland McGrath + + * linux/syscall.h (SYS_socket_subcall): Bump to 400. + * linux/syscallent.h: Update table. + * linux/arm/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + Fixes RH#201462. + +2006-04-25 Roland McGrath + + * strace.c (main): Fail when -c is given with -ff. + * strace.1: Note their incompatibility. + Fixes RH#187847. + + * strace.c (main): Fail when nonoption args follow -p switches. + Fixes Debian#361302. + + * Makefile.am (EXTRA_DIST): Add xlate.el. + + * linux/mips/Makefile.in: File removed, unused cruft. + * linux/sparc/Makefile.in: Likewise. + + * strace.spec (Source0): Use http://dl.sourceforge.net URL. + + * ipc.c (sys_semtimedop): Fixed inverted indirect_ipccall test. + * linux/hppa/syscallent.h: Fixed semtimedop entry. + From Mike Stroyan . + Fixes Debian#340239. + +2006-03-30 Daniel Jacobowitz + + * linux/arm/syscallent.h: Correct the name of exit. Remove + M68K conditionals and sys_security. Correct syscalls 243-282. + Fixes Debian#360154. + + * process.c (change_syscall): Add ARM support. + * syscall.c (get_scno): Handle ARM EABI. + Fixes Debian#360152. + +2006-01-16 Roland McGrath + + * configure.ac, NEWS: Version 4.5.14. + * debian/changelog, strace.spec: 4.5.14-1. + +2006-01-13 Roland McGrath + + * debian/control (Build-Depends): Add debhelper. + +2006-01-12 Roland McGrath + + * signal.c [LINUX] (sys_restart_syscall): New function. + * linux/syscall.h: Declare sys_restart_syscall. + * linux/sparc/syscall.h: Likewise. + * linux/syscallent.h: Call 0 is restart_syscall. + * linux/arm/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Use sys_restart_syscall. + * linux/ia64/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + Fixes RH#165469, Debian#350641. + +2005-08-08 Dmitry V. Levin + + * system.c [LINUX] (MS_MGC_VAL): New macro. + [LINUX] (mount_flags): Add it. + [LINUX] (sys_mount): If neither MS_BIND nor MS_MOVE bits are + set in the flags argument, try to fetch data string. + Fixes RH#165377. + +2006-01-12 Roland McGrath + + * system.c (sys_sysctl): Don't read off end of NAME when max_strlen + exceeds INFO.nlen. + From Timo Lindfors . + Fixes Debian#339117. + + * debian/rules (binary-arch): Don't pass -s to install. Use dh_strip. + Fixes Debian#325132. + + * debian/control (Standards-Version): Update to 3.6.2. + + * defs.h [LINUXSPARC] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE): + New macros. + [SPARC64] (PERSONALITY2_WORDSIZE): New macro. + [X86_64] (PERSONALITY0_WORDSIZE, PERSONALITY1_WORDSIZE): New macros. + * syscall.c (PERSONALITY0_WORDSIZE): New macro if undefined. + (personality_wordsize): New variable. + (decode_subcall): Use it for size of argument words. + Fixes RH#174354. + +2005-11-17 Dmitry V. Levin + + Implement qual_flags support for each personality. + * strace.c (main): Move qualify calls after set_personality call. + * syscall.c (qual_flags0): New variable.. + [SUPPORTED_PERSONALITIES >= 2] (qual_flags1): New variable. + [SUPPORTED_PERSONALITIES >= 3] (qual_flags2): New variable. + (qual_flags): Change variable definition from array to pointer. + (set_personality): Initialize qual_flags variable. + (qualify_one): Add "pers" argument to specify personality. + [SUPPORTED_PERSONALITIES >= 2]: Set qual_flags1 if requested. + [SUPPORTED_PERSONALITIES >= 3]: Set qual_flags2 if requested. + (qual_syscall): Pass personality to qualify_one. + [SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1 + table. + [SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2 + table. + (qual_signal): Pass personality to qualify_one. + (qual_desc): Likewise. + (qualify): Use qualify_one instead of manual qual_flags + manipulations. + [SUPPORTED_PERSONALITIES >= 2]: Look for syscall also in sysent1 + table. + [SUPPORTED_PERSONALITIES >= 3]: Look for syscall also in sysent2 + table. + * defs.h: Update qual_flags declaration. + Fixes RH#173986. + +2005-11-14 Dmitry V. Levin + + * syscall.c (qual_syscall): Handle numeric syscall specification. + Fixes RH#174798. + + * syscall.c (qual_signal, qual_options): Remove redundant argument + check. + +2005-12-01 Roland McGrath + + * ipc.c (indirect_ipccall) [MIPS || HPPA]: Return false. + Fixes Debian#340239. + + * Makefile.am (EXTRA_DIST): Add linux/arm/syscallent.h + and linux/m68k/syscallent.h. + Fixes Debian#336197. + + * debian/control (Architecture): Add armeb. + Fixes Debian#335681. + +2005-11-02 Michal Marek + + * strace-graph (handle_trace): follow clone() and vfork() calls. + +2005-10-25 Heiko Carstens + + * linux/s390/syscallent.h: Added ioprio_set, ioprio_get, + inotify_init, inotify_add_watch, inotify_rm_watch. + Corrected number of arguments for request_key. + * linux/s390x/syscallent.h: Likewise. + +2005-12-01 Roland McGrath + + * ipc.c (indirect_ipccall) [IA64]: Return false unless the syscall + number is in the low range of IA32 syscalls. + +2005-10-07 Andreas Schwab + + * linux/ia64/syscallent.h: Syscall 1105 is gettid, not ioperm. + +2005-12-01 Roland McGrath + + * resource.c (resources): Add RLIMIT_NICE, RLIMIT_RTPRIO. + Reported by Scott Tsai . + + * ipc.c (indirect_ipccall): New function. + (sys_msgctl, sys_msgsnd, sys_msgrcv, sys_semop): Use that predicate + instead of #ifdef LINUX test. + [LINUX] (sys_semtimedop): Likewise. + (sys_shmctl, sys_shmat, sys_shmdt): Likewise. + Fixes RH#164755. + +2005-07-31 Ulrich Drepper + + * linux/x86_64/syscallent.h: Fix syscall parameter count for msgrcv and + msgctl. + + * ipc.c (sys_msgrcv): Add entering handling and print first parameter + there. + Fixes RH#164757. + +2005-08-08 Dmitry V. Levin + + * strace.1: Update "SEE ALSO" links to reference to valid + manpages. + Patch from Michail Litvak . + Fixes RH#165375. + +2005-10-21 Roland McGrath + + * util.c (printpathn): Cap N at sizeof path - 1. + +2005-08-03 Roland McGrath + + * configure.ac, NEWS: Version 4.5.13. + * debian/changelog, strace.spec: 4.5.13-1. + + * configure.ac: Check for struct dqblk.dqb_curblocks field. + * resource.c [LINUX] (OLD_CMD): New macro. + (quotacmds): Use it to hard-wire old O_* values, don't use macros. + (sys_quotactl): If dqb_curblocks is not there, it's called + dqb_curspace instead. Print dqb_* fields as unsigned long long. + +2005-07-19 Michael Schmitz + + Long overdue m68k cleanup. + * linux/syscallent.h: remove m68k declarations. + * linux/m68k/syscallent.h: new file, fixed up declarations + to match kernel version 2.6.11. Newer syscalls are sufficiently + different from i386 to merit a separate file. + +2005-08-03 Roland McGrath + + * linux/x86_64/syscallent.h: Update init_module argument count. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent2.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + +2005-07-22 James Lentini + + * bjm.c (sys_init_module): Display all three arguments. + * linux/syscallent.h: Update argument count. + +2005-08-03 Roland McGrath + + * process.c (internal_wait): Don't suspend when known child is known + to be exiting already. + + * strace.c (detach): If detaching the last live thread in a group with + a zombie leader, then detach the leader too. + (handle_group_exit): Use detach, not droptcb, for predeceased thread. + Mark process about to take a signal with TCB_GROUP_EXITING flag. + Fixes RH#161919. + +2005-07-19 Roland McGrath + + * defs.h [LINUX] [M68K] (__NR_exit_group): Define it if missing. + Fixes Debian#315500. + +2005-07-14 Heiko Carstens + + * linux/s390/syscallent.h (sys_tgkill, vserver, fadvise64_64) + (statfs64, fstatfs64, remap_file_pages, mbind, get_mempolicy) + (set_mempolicy, mq_open, mq_unlink, mq_timedsend, mq_timedreceive) + (mq_notify, mq_getsetattr, sys_kexec_load, add_key, request_key) + (keyctl, waitid): Added. + * linux/s390x/syscallent.h: Likewise and added missing _llseek. + * linux/s390/errnoent.h (ECANCELED, ENOKEY, EKEYEXPIRED) + (EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE): Added. + * linux/s390x/errnoent.h: Likewise. + +2005-07-05 Roland McGrath + + * mem.c [LINUX] (sys_old_mmap) [X86_64]: Extract 32-bit values if + child is 32-bit. + Fixes RH#162467. + +2005-06-08 Dmitry V. Levin + + Introduce "-e trace=desc". + * defs.h (TRACE_DESC): New flag. + * syscall.c: Define TD macro before include of syscallent files + and undefine it afterwards. + (lookup_class): Recognize "desc" keyword. + * strace.1: Document "-e trace=desc". + * freebsd/i386/syscallent.h: Mark those syscalls which take a + file descriptor as an argument or return a file descriptor with + TD flag. + * linux/alpha/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/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/sparc64/syscallent2.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * sunos4/syscallent.h: Likewise. + * svr4/syscallent.h: Likewise. + Fixes RH#159400. + + Remove TF flag from those syscalls which have no filename argument. + * freebsd/i386/syscallent.h: Remove TF flag from fstat, pread, + pwrite, fstat, sendfile. + * linux/alpha/syscallent.h: Remove TF flag from read, write, + pread, pwrite, sendfile. + * linux/hppa/syscallent.h: Remove TF flag from read, write, + pread, pwrite, fstat64, sendfile, ftruncate64. + * linux/ia64/syscallent.h: Remove TF flag from read, write, + sendfile, fstat, fadvise64. + * linux/mips/syscallent.h: Remove TF flag from read, write, + fstatfs, fstat, pread, pwrite, sendfile, ftruncate64, fstat64, + sendfile64, fadvise64, fstatfs64. + * linux/powerpc/syscallent.h: Remove TF flag from read, write, + fstat, pread, pwrite, sendfile, ftruncate64, fstat64, sendfile64, + fadvise64, fstatfs64, fadvise64_64. + * linux/s390/syscallent.h: Remove TF flag from pread, pwrite, + sendfile, ftruncate64, fstat64, sendfile64. + * linux/s390x/syscallent.h: Remove TF flag from pread, pwrite, + sendfile, sendfile64. + * linux/sh/syscallent.h: Remove TF flag from pread, pwrite, + sendfile, fstat64. + * linux/sh64/syscallent.h: Remove TF flag from pread, pwrite, + sendfile, ftruncate64, fstat64. + * linux/sparc/syscallent.h: Remove TF flag from sendfile, fstat64, + pread, pwrite, sendfile64. + * linux/sparc64/syscallent2.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/syscallent.h: Remove TF flag from pread, pwrite, sendfile, + ftruncate64, fstat64, sendfile64, fadvise64, fadvise64, fstatfs64, + fadvise64_64. + * linux/x86_64/syscallent.h: Remove TF flag from pread, pwrite, + sendfile, fadvise64_64. + * svr4/syscallent.h: Remove TF flag from pread, pwrite, ftruncate, + fstatvfs64, ftruncate64. + Fixes RH#159340. + +2005-07-04 Roland McGrath + + * net.c (sockipv6options): Add IPV6_ADD_MEMBERSHIP, + IPV6_DROP_MEMBERSHIP, IPV6_ROUTER_ALERT. + From Ulrich Drepper . + Fixes RH#162450. + + * net.c (sockipoptions): Fix typos. + From Ulrich Drepper . + Fixes RH#161578. + + * util.c (printnum_int): New function, printnum with s/long/int/. + * defs.h: Declare it. + * net.c (printsockopt): Use it for int-sized option. + Fixes RH#162449. + Reported by Ulrich Drepper . + +2005-06-09 Roland McGrath + + * configure.ac, NEWS: Version 4.5.12. + * debian/changelog, strace.spec: 4.5.12-1. + +2005-06-08 Dmitry V. Levin + + Minor namespace cleanup. + * defs.h (string_quote): Remove declaration. + * file.c (openmodessol) [LINUXSPARC]: Make static. + (fileflags): Likewise. + (aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise. + (direnttypes) [FREEBSD || LINUX]: Likewise. + (xattrflags): Likewise. + * process.c (unalignctl_string): Make static. + (setarg): Disable. + * syscall.c (subcalls_table): Make static. + (socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise. + (sparc_socket_decode): Make static, define for [SPARC || SPARC64] only. + (decode_subcall): Make static. + (syscall_fixup): Likewise. + (get_error): Likewise. + (syscall_enter): Likewise. + * util.c (tv_tv): Disable. + (getpc): Likewise. + (string_quote): Make static. + Fixes RH#159688. + +2005-05-12 Philippe De Muyter + + * util.c (getpc, printcall): Check #if defined(M68K), not M68k. + Enables `-i' on m68k machines. + +2005-06-06 Roland McGrath + + * process.c (struct_user_offsets) [X86_64]: Reorder elements so + matching works right. + Fixes RH#159787. + + * linux/syscall.h (SYS_socket, SYS_bind, SYS_connect, SYS_listen) + (SYS_accept, SYS_getsockname, SYS_getpeername, SYS_socketpair) + (SYS_send, SYS_recv, SYS_sendto, SYS_recvfrom, SYS_shutdown) + (SYS_setsockopt, SYS_getsockopt, SYS_sendmsg, SYS_recvmsg) + (SYS_getsockname, SYS_semop, SYS_semgsub_et, SYS_semget, SYS_semctl) + (SYS_semtimedop, SYS_msgsnd, SYS_msgrcv, SYS_msgget) + (SYS_msgctl, SYS_shmat, SYS_shmdt, SYS_shmget) + (SYS_shmctl): Macros renamed to SYS_sub_*. + * syscall.c (dumpio): Match SYS_sub_* if defined instead of SYS_*. + + * linux/syscall.h (SYS_waitid): Define if not defined. + + * linux/syscallent.h: Fix pread/pwrite names to pread64/pwrite64. + + * defs.h (struct sysent): New member `native_scno'. + (known_scno): Declare new function. + * linux/syscallent.h: Add new final field to interesting syscalls. + * syscall.c (known_scno): New function. + (dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it. + * process.c (internal_fork, internal_exit): Likewise. + [IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise. + * strace.c (proc_open): Likewise. + * util.c [LINUX] (setbpt): Likewise. + * linux/syscall.h: Remove [!defined(X86_64)] from conditional + for defining SYS_socket_subcall et al. + * linux/syscallent.h: Likewise for #error check. + * syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases. + Fixes RH#158934. + +2005-06-02 Roland McGrath + + * file.c (printstatfs64): Cast values to unsigned long long and use + %llu formats. + Fixes RH#158243. + +2005-05-31 Dmitry V. Levin + + Deal with memory management issues. + * defs.h (tprint_iov): Update prototype. + * desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate + epoll_event array of arbitrary size on the stack, to avoid + stack overflow. + * file.c (print_xattr_val): Check for integer overflow during + malloc size calculation, to avoid heap corruption. + * io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow + during malloc size calculation, to avoid heap corruption. + Change iovec array handling to avoid heap memory allocation. + * mem.c (get_nodes) [LINUX]: Check for integer overflow during + size calculation and do not allocate array of arbitrary size on + the stack, to avoid stack overflow. + * net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of + arbitrary size on the stack, to avoid stack overflow. Do not + trust cmsg.cmsg_len to avoid read beyond the end of allocated + object. + (printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage. + * process.c (sys_setgroups): Check for integer overflow during + malloc size calculation, to avoid heap corruption. Change gid_t + array handling to avoid heap memory allocation. + (sys_getgroups): Likewise. + (sys_setgroups32) [LINUX]: Likewise. + (sys_getgroups32) [LINUX]: Likewise. + * stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer + overflow during malloc size calculation, to avoid heap corruption. + Change pollfd array handling to avoid heap memory allocation. + * system.c (sys_sysctl) [LINUX]: Check for integer overflow + during malloc size calculation, to avoid heap corruption. + * util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow + during malloc size calculation, to avoid heap corruption. + Fixes RH#159196. + + * util.c (printxval): Change third argument from "char *" to + "const char *". + (printflags): Add third argument, "const char *", with similar + meaning to the third argument of printxval(). + * defs.h (printxval): Change third argument from "char *" to + "const char *". + (printflags): Add third argument. + * bjm.c (sys_query_module) [LINUX]: Pass third argument to + printflags(). + * desc.c (sys_fcntl): Likewise. + (sys_flock) [LOCK_SH]: Likewise. + (print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise. + * file.c (sys_open): Likewise. + (solaris_open) [LINUXSPARC]: Likewise. + (sys_access): Likewise. + (sys_chflags, sys_fchflags) [FREEBSD]: Likewise. + (realprintstat) [HAVE_LONG_LONG_OFF_T && + HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. + (printstat64) [HAVE_STAT64 && + HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. + (sys_setxattr, sys_fsetxattr): Likewise. + * ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget, + sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise. + (sys_mq_open) [LINUX]: Likewise. + (printmqattr) [HAVE_MQUEUE_H]: Likewise. + * mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise. + (sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise. + (sys_mprotect): Likewise. + (sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise. + (sys_msync) [MS_ASYNC]: Likewise. + (sys_mctl) [MC_SYNC]: Likewise. + (sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]: + Likewise. + * net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise. + (sys_send, sys_sendto): Likewise. + (sys_sendmsg) [HAVE_SENDMSG]: Likewise. + (sys_recv, sys_recvfrom): Likewise. + (sys_recvmsg) [HAVE_SENDMSG]: Likewise. + (printicmpfilter) [ICMP_FILTER]: Likewise. + * proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise. + * process.c (sys_clone) [LINUX]: Likewise. + (printwaitn): Likewise. + (sys_waitid) [SVR4 || LINUX]: Likewise. + * signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise. + (sys_sigaction): Likewise. + (printcontext) [SVR4]: Likewise. + (print_stack_t) [LINUX) || FREEBSD]: Likewise. + (sys_rt_sigaction) [LINUX]: Likewise. + * sock.c (sock_ioctl) [LINUX]: Likewise. + * stream.c (sys_putmsg, sys_getmsg): Likewise. + (sys_putpmsg) [SYS_putpmsg]: Likewise. + (sys_getpmsg) [SYS_getpmsg]: Likewise. + (sys_poll): Likewise. + (print_transport_message) [TI_BIND]: Likewise. + (stream_ioctl): Likewise. + * system.c (sys_mount, sys_reboot): Likewise. + (sys_cacheflush) [LINUX && M68K]: Likewise. + (sys_capget, sys_capset) [SYS_capget]: Likewise. + * term.c (term_ioctl) [TIOCMGET]: Likewise. + * time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]: + Likewise. + Fixes RH#159310. + + * bjm.c (sys_query_module) [LINUX]: Unitize "out of memory" + errors reporting style. + * strace.c (rebuild_pollv) [USE_PROCFS]: Likewise. + * system.c (sys_capget, sys_capset) [SYS_capget]: Likewise. + * util.c (printstr): Likewise. + (dumpiov) [HAVE_SYS_UIO_H]: Likewise. + (fixvfork) [SUNOS4]: Likewise. + * desc.c (decode_select): Continue to decode syscall arguments + in case of OOM condition. + * file.c (sys_getdents): Likewise. + (sys_getdents64) [_LFS64_LARGEFILE]: Likewise. + (sys_getdirentries) [FREEBSD]: Likewise. + * mem.c (sys_mincore): Changed type of variables which deal with + malloc size from int to unsigned long. + Fixes RH#159308. + +2005-05-22 Dmitry V. Levin + + * bjm.c [LINUX]: Do not include . It is not + safe to include kernel headers, and this one is not used anyway. + Fixes RH#158488. + +2005-05-26 Roland McGrath + + * system.c (sys_sysctl): Check for errors accessing user pointers. + Use malloc instead of alloca in case size is insane. + +2005-05-09 Roland McGrath + + * configure.ac: Check for libaio.h. + * desc.c (sys_io_setup, sys_io_submit, sys_io_cancel, + sys_io_getevents, sys_io_destroy): New functions. + * linux/syscall.h: Declare them. + * linux/syscallent.h: Use those for io_* syscalls. + * linux/alpha/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + From Zach Brown . + Fixes RH#155065. + + * debian/control (Architecture): Add ppc64. + Fixes Debian bug #301089. + +2005-05-05 Anton Blanchard + + * process.c (ptrace_cmds): Add PTRACE_GETVRREGS and PTRACE_SETVRREGS + if defined. + +2005-05-09 Roland McGrath + + * strace.c (main): Refuse negative -s argument value. + Fixes Debian bug #303256. + +2005-04-25 Anton Blanchard + + * file.c (openmodes): Add O_NOATIME flag if defined. + +2005-04-05 Anton Blanchard + + * linux/powerpc/ioctlent.h: Regenerated. + + * signal.c (signame): Don't try and dereference negative index. + + * linux/powerpc/syscallent.h: Add debug_setcontext, vserver, + mbind, *_mempolicy, mq_*, sys_kexec_load, add_key, request_key, + keyctl, waitid, sys_semtimedop. Fix various other syscalls. + + * ipc.c (shm_resource_flags): New variable, table has SHM_HUGETLB + but not IPC_NOWAIT, which have the same value. + (sys_shmget): Use that instead of resource_flags. + +2005-03-22 Roland McGrath + + * desc.c (decode_select): Increase local buffer size. + Fixes RH#151570. + + * configure.ac, NEWS: Version 4.5.11. + * debian/changelog, strace.spec: 4.5.11-1. + + * linux/arm/syscallent.h: Fix 113 entry (syscall, not vm86old). + +2005-03-14 Roland McGrath + + * configure.ac, NEWS: Version 4.5.10. + * debian/changelog, strace.spec: 4.5.10-1. + +2005-02-26 GOTO Masanori + + * linux/alpha/syscallent.h: Fix the reversed order of lstat64 and + fstat64. Clean up osf_nrecvmsg and osf_ngetsockname. + +2005-02-28 Andreas Schwab + + * syscall.c (getrval2): Move #ifdef IA64 inside #ifdef LINUX. + +2005-03-14 Roland McGrath + + * linux/mips/syscallent.h: Update various calls. + From Thiemo Seufer . + Fixes Debian bug #256684. + + * debian/control (Architecture): Add s390. + Fixes Debian bug #294172. + +2005-03-06 Roland McGrath + + * strace.c (trace) [PTRACE_GETSIGINFO]: Fetch siginfo_t for SIGSEGV + and SIGBUS signals, use si_addr in output. + +2005-03-01 Roland McGrath + + * file.c (print_xattr_val): Add a cast. + +2005-02-05 Roland McGrath + + * desc.c (decode_select): Calculate size of passed fd_set vectors and + copy in the user's size rather than the standard sizeof(fd_set). + Fixes Debian bug #65654, #284290. + + * util.c (printpath, printpathn): Print NULL and don't try any fetch + when ADDR is zero. + Fixes Debian bug #63093. + + * debian/control (Build-Depends): Fix for s390 and sparc. + From Bastian Blank . + Fixes Debian bug #293564. + +2004-12-19 Dmitry V. Levin + + * strace.c (main) [!USE_PROCFS]: In child process, raise SIGSTOP + right before execv() call. Remove fake_execve() call. + * defs.h (fake_execve): Remove unused declaration. + * process.c (fake_execve): Remove unused function. + Fixes RH#143365. + +2005-02-04 Roland McGrath + + * configure.ac, NEWS: Version 4.5.9. + * debian/changelog, strace.spec: 4.5.9-2. + + * file.c (O_LARGEFILE): Omit when #undef'd because it was zero. + +2005-02-02 Roland McGrath + + * debian/control: Add strace-udeb package for installer debugging. + * debian/rules (binary-arch): Build it. + From Joshua Kwan . + Fixes Debian bug #268294. + + * file.c (openmodes) [O_LARGEFILE] [O_LARGEFILE == 0]: Redefine to + known values for Linux. + + * util.c (printcall): Print 16 ?s when long is 8 bytes. + Fixes RH#146932. + + * linux/sparc/syscall.h: Declare sys_epoll_create, sys_epoll_ctl, + sys_epoll_wait. + * linux/sparc64/syscall.h: Just #include "../sparc/syscall.h" here. + * ioctl.c (nioctlents2): Add const to type. + Fixes Debian bug #278449. + + * sock.c (iffflags): New variable, table of IFF_* values. + (print_addr): New function. + (sock_ioctl): Handle SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, + SIOCGIFNETMASK, SIOCGIFFLAGS, SIOCGIFMETRIC, SIOCGIFMTU, SIOCGIFSLAVE, + SIOCGIFHWADDR. Use print_addr for SIOCGIFCONF, SIOCGIFNAME, and + SIOCGIFINDEX, and fix their output. + From Ulrich Drepper . + Fixes RH#138223. + Fixes Debian bug #192164. + +2004-12-20 Dmitry V. Levin + + * configure.ac: Use AC_GNU_SOURCE macro instead of changing CFLAGS. + * defs.h [HAVE_CONFIG_H]: Include config.h first. + * strace.c: Include "defs.h" first. + Fixes RH#143370. + + * syscall.c (call_summary): Fix potential NULL dereference. + Fixes RH#143369. + +2004-12-19 Dmitry V. Levin + + * syscall.c (qual_signal): Check bounds for numeric signal names. + Fix parser of symbolic signal names. + Fix return code, as required by qualify() function. + * syscall.c (qual_desc): Check bounds for descriptor number. + * syscall.c (qual_syscall): Correct return code, to be consistent + with qualify() and other qual_* functions. + Fixes RH#143362. + +2005-02-01 Roland McGrath + + * system.c [LINUX] (MS_MANDLOCK, MS_NOATIME, MS_NODIRATIME, MS_BIND, + MS_MOVE, MS_REC, MS_VERBOSE, MS_POSIXACL, MS_ACTIVE, MS_NOUSER): + New macros. + [LINUX] (mount_flags): Add them. + [LINUX] (sys_mount): If any of (MS_BIND|MS_MOVE|MS_REMOUNT) bits are + set in the flags argument, don't try to fetch the filesystem string. + Fixes RH#141932. + + * config.guess: Update from canonical version, timestamp 2004-11-12. + * config.sub: Likewise, timestamp 2004-11-30. + + * process.c [LINUX] [X86_64] (sys_arch_prctl): New function. + * linux/syscall.h: Declare it. + * linux/x86_64/syscallent.h: Use it. + Part of RH#142667. + + * process.c (sys_sched_setscheduler): Use %#lx format for bad pointer. + (sys_sched_getparam, sys_sched_setparam): Likewise. + Part of RH#142667. + + * signal.c [HAVE_SIGACTION] [LINUX && X86_64] (SA_RESTORER): Define + here too. + Part of RH#142667. + + * linux/syscallent.h: Use sys_mincore instead of printargs. + * linux/x86_64/syscallent.h: Likewise. Also use sys_getrlimit, + sys_semtimedop, sys_umount2. + Part of RH#142667. + + * syscall.c (qual_signal): Fix inverted return value and bogus + argument to qualify_one in the named case. + + * file.c (print_xattr_val): Don't use auto array sized by syscall + argument. Use malloc instead, so it can fail for insane values. + Fixes Debian bug #283704. + + * net.c (sys_getsockopt): Fix a format %ld -> %d. + + * linux/syscall.h [IA64] (SYS_semtimedop): #undef it. + + * syscall.c (syscall_enter) [X86_64]: Fix 32-bit argument register map + not to double the middle entry! + Fixes RH#146093. + + * linux/x86_64/syscallent.h: Fix exit_group entry. + + * util.c (getpc) [S390 || S390X]: Implement it. + Patch by David Wilder . + + * linux/ia64/syscallent.h: Add fadvise64, fstatfs64, statfs64, mbind, + [gs]et_mempolicy, mq_*, sys_kexec_load, vserver, and waitid. + Fixes RH#146245. + +2005-01-22 Andreas Schwab + + * net.c (sys_getsockopt): Change type of len to int. + +2004-10-19 Roland McGrath + + * configure.ac, NEWS: Version 4.5.8. + * debian/changelog, strace.spec: 4.5.8-1. + + * file.c (sys_fadvise64): Conditionalize just on [LINUX]. + + * configure.ac: Check for sys/epoll.h. + * desc.c: Protect #include with [HAVE_SYS_EPOLL_H]. + (epollctls, epollevents): Protect each entry with #ifdef on its macro. + + * strace.c (handle_group_exit): Don't detach leader that wasn't + TCB_ATTACHED. Instead mark it with TCB_GROUP_EXITING. + Remove droptcb loop at end, no longer required since 2.6 reports each + thread death. + Fixes RH#135254. + + * strace.c (trace): Use handle_group_exit for non-TCB_ATTACHED child + taking signal when it has nclone_threads > 0. + + * strace.c (handle_group_exit, trace): Mark leader with + TCB_GROUP_EXITING and don't be surprised at child deaths when their + leader has it set. + Fixes RH#132150. + + * process.c (WCOREFLAG): Define if not defined. + (W_STOPCODE, W_EXITCODE): Likewise. + Reported by Marty Leisner . + + * sock.c [! LINUX]: Include before . + Reported by Marty Leisner . + + * debian/rules: Make strace64.1.gz symlink to strace.1.gz instead of + strace64.1 to strace.1, which doesn't exist. + Fixes Debian bug #269220. + +2004-09-05 Phil Blundell + + * linux/arm/syscallent.h: New file. + +2004-10-19 Roland McGrath + + * debian/rules (DEB_BUILD_GNU_TYPE, CONFIG_OPTS): New variables. + [$(DEB_HOST_GNU_TYPE) == s390-linux] (build64, HOST64, CC64): Set them. + (build/Makefile): Use $(CONFIG_OPTS). + (build64/Makefile): Pass --host as well as --build. + From Bastian Blank . + Fixes Debian bug #271500. + + * linux/hppa/syscallent.h: Update for 2.6.9 syscalls. + From Randolph Chung + Fixes Debian bug #273887. + + * file.c (sys_llseek): Revert last change. + +2004-09-14 Richard Henderson + + * linux/alpha/syscallent.h: Add tgkill, *stat64, vserver, mbind, + [gs]et_mempolicy, mq_*, waitid. + +2004-10-07 Roland McGrath + + * file.c (sys_llssek, sys_readahead, sys_fadvise64, sys_fadvise64_64): + Use LONG_LONG macro. + * io.c (sys_pread, sys_pwrite, sys_sendfile): Likewise. + + * linux/x86_64/syscallent.h: Fix botched table entries. + From Ulrich Drepper . + + * mem.c [LINUX] (sys_mbind, sys_set_mempolicy, sys_get_mempolicy): + New functions. + * linux/syscall.h: Declare them. + * linux/x86_64/syscallent.h: Likewise. + From Ulrich Drepper . + + * linux/syscallent.h: Handle mbind, set_mempolicy, get_mempolicy. + From Ulrich Drepper . + + * file.c [LINUX && (I386 || X86_64)] (sys_fadvise64, sys_fadvise64_64): + New functions. + * linux/syscall.h: Declare them. + * linux/syscallent.h: Handle fadvise64 and fadvise64_64 using those. + * linux/x86_64/syscallent.h: Likewise. + From Ulrich Drepper . + +2004-09-13 Dmitry V. Levin + + * linux/ioctlsort.c (main): Omit duplicate lines + (with same name and code) from output. + * linux/ioctlent.sh: Build the list of ioctls defined in + scsi/sg.h (0x22..), scsi/scsi.h and scsi/scsi_ioctl.h (0x53..), + as suggested by Peter Jones + * linux/ioctlent.h: Regenerated. + Fixes RH#129808. + +2004-09-13 Ulrich Drepper + Dmitry V. Levin + + * time.c [LINUX] (print_rtc): New function, for printing rtc_time + structure. + [LINUX] (rtc_ioctl): New function, for parsing RTC_* ioctls. + * ioctl.c [LINUX] (ioctl_decode): Call rtc_ioctl. + * defs.h [LINUX]: Declare rtc_ioctl. + Fixes RH#58606. + +2004-10-06 Roland McGrath + + * desc.c [LINUX] (sys_epoll_create, sys_epoll_ctl, sys_epoll_wait): + New functions. + * linux/syscall.h: Declare them. + * linux/syscallent.h: Use those for epoll_* syscalls. + * linux/alpha/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/sparc64/syscallent2.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + From Ulrich Drepper . + Fixes RH#134463. + + * resource.c (resources): Add RLIMIT_LOCKS, RLIMIT_SIGPENDING, + and RLIMIT_MSGQUEUE, if defined. + From Ulrich Drepper . + Fixes RH#133594. + + * net.c [HAVE_SENDMSG] (printcmsghdr): New function. + (printmsghdr): Use it. + From Ulrich Drepper . + Fixes RH#131689. + + * file.c (sprintmode): Add const to return type. + (sprintfstype): Likewise. + * signal.c (printsiginfo): Add a const. + +2004-09-15 Roland McGrath + + * linux/x86_64/syscallent.h: Use sys_waitid. + + * linux/syscallent.h: waitid takes 5 arguments, and is in TP category. + * process.c (sys_waitid): Handle fifth argument (struct rusage *). + +2004-09-11 Roland McGrath + + * time.c (sys_clock_nanosleep): Print zero flags arg correctly. + (sys_timer_settime): Likewise. + (printsigevent): Print signals by name for SIGEV_SIGNAL. + (sys_timer_create): Print clock ID symbolically. + From Ulrich Drepper . + Fixes RH#131420. + +2004-09-07 Michal Ludvig + + * defs.h (nioctlents1, nsignals2): Fix typos in decls. + +2004-09-03 Roland McGrath + + * syscall.c (qual_options): Add const to defn. + Update all uses. + (call_count, error_count, tv_count): Variables removed. + (struct call_counts, counts): New type and variable. + Update all users of the old three to use the new array of structs. + (trace_syscall): Allocate counts on first use. + (sorted_count): Variable removed. + (call_summary): Allocate locally. + + * syscall.c (sysent0, sysent1, sysent2, sysent): Add const to defn. + (nsyscalls0, nsyscalls1, nsyscalls2): Likewise. + (errnoent0, errnoent1, errnoent2, errnoent): Likewise. + (nerrnos0, nerrnos1, nerrnos2): Likewise. + * signal.c (signalent0, signalent1, signalent2): Likewise. + (nsignals0, nsignals1, nsignals2): Likewise. + (signame): LIkewise. + * ioctl.c (ioctlent0, ioctlent1, ioctlent2): Likewise. + (nioctlents0, nioctlents1, nioctlents2): Likewise. + (ioctl_lookup, ioctl_next_match): Likewise. + * defs.h: Update decls. + * io.c (sys_ioctl): Update users. + + * util.c (xlookup, printxval, addflags, printflags): Use const for + struct xlat * argument. + * defs.h (xlookup, printxval, addflags, printflags): Update decls. + * bjm.c: Add const to all struct xlat defns. + * desc.c: Likewise. + * file.c: Likewise. + * ipc.c: Likewise. + * mem.c: Likewise. + * net.c: Likewise. + * proc.c: Likewise. + * process.c: Likewise. + * resource.c: Likewise. + * signal.c: Likewise. + * sock.c: Likewise. + * stream.c: Likewise. + * system.c: Likewise. + * term.c: Likewise. + * time.c: Likewise. + * util.c: Likewise. + +2004-09-01 Roland McGrath + + * linux/x86_64/syscallent.h: Add new entries for timer_*, clock_*, and + mq_* syscalls, and names only for new calls up to 252. + * linux/syscallent.h: Add waitid. + * linux/x86_64/syscallent.h: Likewise. + * linux/syscall.h: Declare sys_waitid. + + * process.c (internal_wait): Take second arg giving index of flags + argument. + * defs.h: Update prototype. + * syscall.c (internal_syscall): Update caller. + Also use internal_wait for SYS_waitid. + * process.c (sys_waitid): Define for [LINUX] as well. + Don't tweak TCB_SUSPENDED--internal_wait does that. + (waitid_types): Conditionalize use of nonstandard P_* macros. + +2004-08-31 Roland McGrath + + * configure.ac, NEWS: Version 4.5.7. + * debian/changelog: 4.5.7-1. + * strace.spec: 4.5.7-2. + + * debian/rules: Rewrite sparc64 change of 2004-07-12. + Always do each build in a separate build directory. + Fixes Debian bug #254728. + + * time.c (clocknames): Use #ifdef around CLOCK_* uses. + + * strace.1: Say that -c shows system CPU time, not real time. + Fixes Debian bug #254438. + + * syscall.c (dumpio): Match pread and pwrite system calls too. + Fixes Debian bug #239947. + + * net.c (sockoptions): Add all SO_* macros known in Linux 2.6.9. + Fixes Debian bug #171653. + +2004-07-12 Dmitry V. Levin + + * signal.c [LINUX] (parse_sigset_t): Fix hex strings parser. + Fixes RH#128091. + +2004-08-30 Roland McGrath + + * strace.c (main): Don't call fake_execve under -c. + From Ulrich Drepper . + Fixes RH#129166. + + * net.c (sockipoptions): Add some options. + [SOL_IPV6] (sockipv6options): New variable. + (sys_getsockopt, printsockopt): Use it for SOL_IPV6 level. + From Ulrich Drepper . + Fixes RH#128391. + + * time.c (clocknames): New variable, symbolic names for clock_t. + (sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep): Use it. + From Ulrich Drepper . + Fixes RH#129378. + + * system.c (personality_options): Hard-code values here. + Don't #include at all. + Fixes RH#130965 and Debian bug #40588. + + * file.c (print_xattr_val): New function to show attribute values. + (sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Use it. + From Ulrich Drepper . + Fixes RH#131177. + +2004-07-12 Roland McGrath + + * configure.ac, NEWS: Version 4.5.6. + * strace.spec, debian/changelog: 4.5.6-1. + + * Makefile.am (EXTRA_DIST): Add linux/sparc64 files. + + * debian/rules: On sparc-linux, build strace64 as well. + From Ben Collins . + Fixes Debian bug #254728. + +2004-07-07 David S. Miller + + * linux/sparc/syscallent.h: Sync with reality. + * linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid, + sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr, + sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, + sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr, + sys_removexattr, sys_lremovexattr, sys_fremovexattr, + sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64, + sys_fstatfs64, sys_clock_settime, sys_clock_gettime, + sys_clock_getres, sys_clock_nanosleep, sys_timer_create, + sys_timer_settime, sys_timer_gettime): New declarations. + * linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h, + linux/sparc64/syscall.h, linux/sparc64/errnoent.h, + linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h, + linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h, + linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h, + linux/sparc64/signalent.h, linux/sparc64/signalent.h, + linux/sparc64/signalent1.h, linux/sparc64/signalent2.h, + linux/sparc64/syscall1.h, linux/sparc64/syscallent.h, + linux/sparc64/syscallent1.h: New files. + * defs.h (LINUXSPARC): Define also when SPARC64. + (LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3. + Ignore SIGTRAP after execve by defining TCB_WAITEXECVE. + Define possibly missing __NR_exit_group. Declare getrval2. + * configure.ac (sparc64): New architecture case. + * file.c (stat_sparc64): New structure. + (printstat_sparc64): New output routine for that. + (printstat): Call it, if personality is 2. + (printstat64): Likewise. + * util.c: Conditionalize ptrace defines on LINUXSPARC + not LINUX && SPARC. + (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS + to PTRACE_FOOREGS64 so that more sparc code can be shared + between 64-bit and 32-bit. + (_hack_syscall5): Correct trap number when SPARC64. + (PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard. + (getpc): Handle SPARC64 && LINUX. + (printcall): Likewise. + (arg fetching/setting): Use same code for SPARC64 LINUX + as for SPARC. + (setbpt): Handle SPARC64 && LINUX. + (clearbpt): Likewise. + * signal.c: Conditionalize ptrace defines on SPARC and + SPARC64. + (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS + to PTRACE_FOOREGS64 so that more sparc code can be shared + between 64-bit and 32-bit. + (m_siginfo): Use same definition on SPARC64 as SPARC. + (sys_sigreturn): Handle LINUX && SPARC64. + * syscall.c: Conditionalize ptrace defines on SPARC and + SPARC64. + (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS + to PTRACE_FOOREGS64 so that more sparc code can be shared + between 64-bit and 32-bit. + (getscno): Use same static state on SPARC64 as SPARC, + and add SPARC64 handling. + (get_error): Handle LINUX && SPARC64. + (force_result): Likewise. + (syscall_enter): Likewise. + (trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64 + just like SPARC. + (getrval2): Handle LINUX && SPARC64. + * process.c: Conditionalize ptrace defines on SPARC and + SPARC64. + (SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS + to PTRACE_FOOREGS64 so that more sparc code can be shared + between 64-bit and 32-bit. + (change_syscall): Handle LINUX && SPARC64. + (struct_user_offsets): Ifdef out those which do not exist + on SPARC64. + * net.c (sys_pipe): Handle LINUX && SPARC64. + * ioctl.c: Fix initializer typo for nioctlents2, was + nioctlents1 by accident. + +2004-06-28 Andreas Schwab + + * process.c (internal_exec): Move TCB_WAITEXECVE handling here. + (sys_execve): Remove it here. + +2004-07-12 Roland McGrath + + * Makefile.am (EXTRA_DIST): Add linux/sh64/syscallent.h. + + * debian/control (Section): Move to utils, matching Debian override. + + * net.c (addrfams): Make variable global. + * sock.c (sock_ioctl): Decode the arguments for SIOCGIFNAME, + SIOCGIFINDEX, and SIOCGIFCONF. + From Ulrich Drepper . + Fixes RH#126917. + + * linux/ioctlsort.c: Add some #includes. + [POWERPC]: Kludge out high bits. + * linux/ia64/ioctlent.h: Regenerated using RHEL3 headers. + * linux/powerpc/ioctlent.h: Likewise. + +2004-07-11 Roland McGrath + + * linux/ioctlent.sh: Replace asm with $asm in all places. + + * configure.ac: Add I386 as AM_CONDITIONAL. + * Makefile.am [LINUX]: Add maintainer-mode rules to regenerate + the ioctlent.h file. + +2004-07-08 Roland McGrath + + * resource.c (sys_quotactl): Truncate first argument to 32 bits, since + that's what the kernel will do. + +2004-07-07 Roland McGrath + + * linux/ioctlent.sh: Take optional second argument to use as directory + name in place of `asm'. + +2004-06-27 Roland McGrath + + * configure.ac, NEWS: Version 4.5.5. + * strace.spec, debian/changelog: 4.5.5-1. + +2004-06-22 Roland McGrath + + * syscall.c (syscall_fixup) [LINUX && X86_64]: For 32-bit process, + sign extend the low 32 bits of RAX to 64 bits. + Fixes RH#126547. + + * syscall.c (force_result): [LINUX && X86_64]: Fix RAX*4 -> RAX*8. + +2004-06-03 Roland McGrath + + * configure.ac, NEWS: Version 4.5.4. + * strace.spec, debian/changelog: 4.5.4-1. + + * net.c (domains): Add many PF_* values #ifdef PF_*. + (addrfams): Add many AF_* values #ifdef AF_*. + Fixes Debian bug #250506. + +2004-05-02 Dmitry V. Levin + + * linux/ioctlsort.c (compare): When ioctl codes equal, compare + names. + (main): Print a note that program output is generated by + ioctlsort. + * linux/ioctlent.sh: Build the list of ioctls defined in + linux/fb.h (0x46..), linux/kd.h (0x4B..), linux/cdrom.h (0x53..), + asm/ioctls.h (0x54..), linux/vt.h (0x56..), linux/videotext.h + (0x71..), linux/videotext.h (0x72..), asm/sockios.h (0x89..), + linux/sockios.h (0x89..), linux/wireless.h (0x8B..). + * linux/ioctlent.h: Regenerated from linux-2.6.5. + Fixes RH#122257. + +2004-06-03 Roland McGrath + + * debian/control (Architecture): Add amd64. + Fixes Debian bug #246568. + + * strace.c (main) [LINUX]: Expand TCBTAB as necessary for threads + attached. Attach threads only under -f. Set TCB_FOLLOWFORK in them. + (expand_tcbtab): New function, broken out of ... + * process.c (fork_tcb): ... here, call that. + * defs.h: Declare expand_tcbtab. + +2004-04-19 Roland McGrath + + * process.c (printstatus): Add a space before | in output. + +2004-04-16 Roland McGrath + + * configure.ac: Version 4.5.3. + * strace.spec, debian/changelog: 4.5.3-1. + +2004-03-18 Dmitry V. Levin + + * resource.c (sys_quotactl) [LINUX]: Cast arithmetic shift operand + from long to unsigned long, to fix output of the quotactl command + parser. + Fixes RH#118694. + +2004-04-16 Roland McGrath + + * linux/s390/ioctlent.h, linux/s390x/ioctlent.h: Update DASD ioctls. + From Maxim Shchetynin . + + * configure.ac: Check for . + * ipc.c (sys_mq_open, printmqattr) [! HAVE_MQUEUE_H]: Don't try to + decode struct mq_attr. + * NEWS: Mention mq support. + + * linux/syscall.h: Support new mq_* syscalls on Linux. + * linux/syscallent.h: Likewise. + * linux/dummy.h: Likewise. + * ipc.c: Likewise. + * time.c (printsigevent): Handle SIGEV_THREAD. + From Ulrich Drepper . + Fixes RH#120701. + +2004-04-13 Roland McGrath + + * net.c (msg_flags): Grok MSG_FIX, MSG_SYN, MSG_RST, MSG_NOSIGNAL, + MSG_MORE. + From Ulrich Drepper . + Fixes RH#120541. + + * process.c (printstatus): Mask out bits presented symbolically, and + print "| 0xnnn" if the remaining bits are not all zero. + Fixes Debian bug #240062. + + * process.c (print_affinitylist): Rewritten to handle indirect values. + (sys_sched_setaffinity, sys_sched_getaffinity): Update callers. + From Ulrich Drepper . + Fixes RH#118685. + + * acinclude.m4: Quote first argument to AC_DEFUN in all cases. + +2004-04-08 Roland McGrath + + * strace.c (main) [LINUX]: When attaching for -p, look in + /proc/PID/task for all threads and attach them as presumed + CLONE_THREAD children. + * NEWS: Mention the feature. + Fixes RH#120462. + +2004-03-02 Roland McGrath + + * util.c (setbpt): Fix one missed spot to use new arg0_index macro. + From Michael Holzheu . + + * debian/control (Standards-Version): Update to 3.6.1. + +2004-03-01 Roland McGrath + + * configure.ac, NEWS: Version 4.5.2. + * strace.spec, debian/changelog: 4.5.2-1. + + * strace.c (main): Avoid potential buffer overruns from ludicrous + arguments or PATH values. + * syscall.c (qual_signal): Bail out for too-long string. + + * mem.c [LINUX]: -> + Fixes Debian bug #223207. + + * linux/sparc/syscall.h: Copy linux/syscall.h decls of sys_sched_*. + + * configure.ac: Check for `struct user_desc' in . + * process.c [HAVE_STRUCT_USER_DESC]: Use struct user_desc in place of + struct modify_ldt_ldt_s. + * mem.c [HAVE_STRUCT_USER_DESC]: Likewise. + + * system.c (sysctl_vm): Conditionalize VM_* macro uses, add some more. + From Tim Yamin . + + * process.c (sys_execve): Clear instead of set TCB_WAITEXECVE on + erring syscall. + + * configure.ac: Check for `struct pt_all_user_regs' + and `struct ia64_fpreg' in . + * util.c, process.c, syscall.c, signal.c: Work around conflicts between + and for defining those types. + + * process.c (struct_user_offsets) [LINUX && IA64]: Conditionalize + PT_AR_CSD and PT_AR_SSD uses in case of older kernel headers. + + * util.c [LINUX] (arg0_index, arg1_index): New macros. + [S390 || S390X]: Define them with inverted values. + (setbpt): Use them for u_arg indices. + +2004-02-26 Andreas Schwab + + * defs.h [LINUX && IA64]: Declare getrval2 also on IA64. + * net.c (sys_pipe) [LINUX && IA64]: For IA64 use the two return values. + * syscall.c (getrval2) [LINUX && IA64]: Implement for IA64. + +2004-03-01 Roland McGrath + + * linux/dummy.h (sys_sched_getscheduler, sys_sched_setparam, + sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler, + sys_sched_get_priority_max, sys_sched_get_priority_min): Remove macros. + * process.c [LINUX] (sys_sched_getscheduler, sys_sched_setparam, + sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler, + sys_sched_get_priority_min): New functions. + From Ulrich Drepper . + Fixes RH#116990. + +2004-02-20 Roland McGrath + + * linux/hppa/syscallent.h: Update some syscalls. + From Randolph Chung . + Fixes Debian bug #231632. + +2003-12-31 David Mosberger + + * process.c (internal_exit): For ia64, also recognize IA-32 252 + as exit_group(). + (change_syscall): For IA64, also support changing IA-32 syscalls. + * syscall.c (internal_syscall): For IA64, also recognize IA-32 + syscall 252 (exit_group) as an internal_exit() syscall. + * util.c (SYS_fork): For IA64, define them to the IA-32 syscall + number. + (SYS_vfork): Likewise. + (arg_setup): For IA64 version, also support IA-32 syscalls. + (get_arg0): Likewise. + (get_arg1): Likewise. + (set_arg0): Likewise. + (set_arg1): Likewise. + +2004-02-15 Anton Blanchard + + * linux/powerpc/syscallent.h: Add rtas call. + Shift multiplexed syscalls to start at 300, we are already about + to hit 256 real syscalls. + * linux/syscall.h: SYS_socket_subcall is now 300 for [POWERPC]. + +2004-02-19 Roland McGrath + + * strace.c (main): Use TCP->pid, not PID, in -p message. + Fixes Debian bug #229802. + +2004-01-13 Roland McGrath + + * syscall.c (force_result) [LINUX] [S390 || S390X]: Remove bogus upeek + call. + + * stream.c (internal_stream_ioctl): Fix typo strict -> struct. + Reported by Petter Reinholdtsen . + +2003-12-31 David Mosberger + + * process.c (struct_user_offsets) [IA64]: Fix up register name list. + +2003-12-14 Anton Blanchard + + * file.c (sys_getdents64): Don't cast d_ino and d_off to unsigned long. + Use %llu formats for them. + + * file.c [LINUX] (fsmagic): Add SYSFS_MAGIC. + + * linux/powerpc/syscallent.h: Update to include recently added + syscalls. + + * syscall.c (get_error) [POWERPC]: Cast result to unsigned long for + ppc64, we were misreporting syscalls that really succeeded as having + failed. + +2004-01-13 Roland McGrath + + * strace.1: Remove comment about vfork on Linux. + Fixes Debian bug #223390. + + * file.c (direnttypes): Define under [LINUX] as well. Add DT_UNKNOWN. + (sys_getdents64) [LINUX]: Print d_type field. + +2003-12-15 Dmitry V. Levin + + * strace.c (trace) [WCOREDUMP]: Show coredump status of the + killed process if available. Fixes RH#112117. + +2003-11-13 Roland McGrath + + * configure.ac, NEWS: Version 4.5.1. + * strace.spec, debian/changelog: 4.5.1-1. + +2003-09-06 Dmitry V. Levin + + * defs.h (ioctl_lookup): Prototype change. + * ioctl.c (ioctl_next_match): New function. + * defs.h: Declare it. + * io.c (sys_ioctl): Use it, to display all possible ioctl names + when there's more than one match. + * ioctl.c (ioctl_lookup): Likewise. + * stream.c (internal_stream_ioctl): Likewise. + Patch from Solar Designer . + +2003-11-13 Roland McGrath + + * linux/sh/syscallent.h: Use sys_setgroups32, sys_getgroups32. + * linux/sh64/syscallent.h: Likewise. + +2003-09-06 Dmitry V. Levin + + Fixes for RH#105359. + * util.c (printuid): New function. + * defs.h: Declare it. + * file.c (sys_chown): Use it. + * file.c (sys_fchown): Likewise. + * process.c (sys_setreuid, sys_setregid, sys_setresuid, + sys_setresgid): Likewise. + * linux/syscallent.h: Better handle getgid32, geteuid32, getegid32, + setreuid32, setregid32, getgroups32, setgroups32, fchown32, + setresuid32, getresuid32, setresgid32, getresgid32, chown32, + setuid32, setgid32, setfsuid32, setfsgid32. + * process.c [LINUX]: Define GETGROUPS32_T. + * process.c [LINUX] (sys_setgroups32, sys_getgroups32): + New functions. + * linux/syscall.h (sys_setgroups32, sys_getgroups32): + Declare them. + +2003-11-11 Roland McGrath + + * strace.c (main): Bail with usage error for missing command before we + open the -o file or fiddle uids. + +2003-11-06 Roland McGrath + + * strace.c (main): Treat piped output more like file output. + Disallow -ff with piped output. Fixes RH#105366. + Reported by Dmitry V. Levin + + * strace.c (tprintf): Check result of vfprintf and use perror when it + fails while not writing to stderr itself. Fixes Debian bug #218762. + + * net.c (printsock): Fix typo in #ifdef AF_NETLINK. + From Ulrich Drepper . + +2003-11-01 Roland McGrath + + * syscall.c (trace_syscall) [LINUX]: Calculate ONE_TICK once using + setitimer rather than hard-coding a value based on HZ. + Fixes RH#108012, reported by Florian La Roche . + +2003-10-21 Roland McGrath + + * strace.1: Fixed a few spelling errors. + Fixes Debian bug #217008. + + * syscall.c: Revert last change, was broken. + +2003-10-01 Roland McGrath + + * process.c (internal_clone): Don't suspend parent when call requested + a specific PID that is not a traced child. + + * signal.c [LINUX] (parse_sigset_t): Rewrite to process hex strings + from right to left so we don't have to presume the size. + Reported by David Woodhouse . + +2003-09-25 Roland McGrath + + * mem.c (mmap_prot) [PROT_SEM, PROT_GROWSDOWN, PROT_GROWSUP]: Include + these in the table if they are defined. + +2003-09-24 Roland McGrath + + * configure.ac, NEWS: Version 4.5. + * strace.spec, debian/changelog: 4.5-1. + + * syscall.c (get_scno) [LINUX] [S390 || S390X]: Bail out of + instruction decoding branch if TCB_INSYSCALL is clear. + Reported by . + + * linux/ioctlent.h: Swap order of overloaded TC* and SNDCTL_* values. + +2003-09-23 Roland McGrath + + * strace.spec: On ppc64 (maybe others later), create an strace64 + package as well containing just /usr/bin/strace64. + + * signal.c (sprintsigmask): Print RT_%u for __SIGRTMIN..__SIGRTMAX. + Fixes RH#104365. + +2003-08-21 Roland McGrath + + * linux/syscallent.h: Fix mlock argument count. Fixes RH#101499. + * linux/x86_64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + +2003-07-28 Daniel Jacobowitz + + * defs.h (ALIGN64): Define for MIPS. + * io.c (PREAD_OFFSET_ARG): Define. + (sys_pread, sys_pwrite): Use it. + * process.c (struct_user_offsets) [SH]: Check whether REG_XDREG0 + is defined. + * linux/sh/syscallent.h (pread, pwrite): Take six arguments. + (truncate64, ftruncate64): Pretty-print. + * linux/mips/syscallent.h (pread, pwrite): Take six arguments. + (truncate64, ftruncate64): Take four arguments. + +2003-07-17 Roland McGrath + + * configure.ac, NEWS: Version 4.4.99. + * strace.spec, debian/changelog: 4.4.99-1. + +2003-07-15 Anton Blanchard + + * ipc.c: Add SHM_HUGETLB field. + Mask out permission bits in msgget, semget and shmget before + printing resource_flags. + Mask execute permission bits (even though we dont currently + use them). + +2003-07-17 Roland McGrath + + * linux/powerpc/syscallent.h (tgkill): New at 250. + + * linux/syscallent.h: truncate64/ftruncate64 need 3 args. + From Ulrich Drepper . + + * linux/syscallent.h: Handle statfs64, fstatfs64, utimes. + * file.c (printstatfs): Print f_fsid and f_frsize. + [LINUX] (printstatfs64, sys_statfs64, sys_fstatfs64): New functions. + * linux/syscall.h: Add decls. + From Ulrich Drepper . + +2003-07-09 Roland McGrath + + * linux/ia64/syscallent.h (tgkill): New at 1235. + +2003-07-05 Richard Henderson + + * process.c (sys_clone): Order arguments for alpha the same as x86_64. + * syscall.c (ERESTART_RESTARTBLOCK): New. + (trace_syscall): Print it. + * linux/alpha/syscallent.h (osf_syscall): Name properly. + (osf_set_program_attributes): Fix typo. + (osf_nfssvc): Likewise. + (osf_sigsendset): Likewise. + (getdents64, gettid, readahead, tkill, setxattr, lsetxattr, fsetxattr, + getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr, + removexattr, lremovexattr, fremovexattr, futex, sched_setaffinity, + sched_getaffinity, tuxcall, io_setup, io_destroy, io_getevents, + io_submit, io_cancel, exit_group, lookup_dcookie, epoll_create, + epoll_ctl, epoll_wait, remap_file_pages, set_tid_address, + restart_syscall, fadvise, timer_create, timer_settime, timer_gettime, + timer_getoverrun, timer_delete, clock_settime, clock_gettime, + clock_getres, clock_nanosleep, semtimedop): New. + +2003-07-08 Roland McGrath + + * signal.c (sys_tgkill): New function. + * linux/syscall.h: Declare it. + * linux/syscallent.h: Add tgkill. + +2003-06-27 Roland McGrath + + * configure.ac: Check for type `struct __old_kernel_stat'. + * file.c (convertoldstat, printoldstat): Define under + [LINUX && HAVE_STRUCT___OLD_KERNEL_STAT] rather than a list of archs. + (sys_oldstat, sys_oldfstat, sys_oldlstat): Likewise. + * linux/dummy.h [! HAVE_STRUCT___OLD_KERNEL_STAT] + (sys_oldstat, sys_oldfstat, sys_oldlstat): #define to printargs. + +2003-06-26 Roland McGrath + + * configure.ac: SHMEDIA -> SH64 + * defs.h: Likewise. + * mem.c: Likewise. + * process.c: Likewise. + * sock.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + * linux/shmedia/syscallent.h: Moved to ... + * linux/sh64/syscallent.h: ... here. + + * config.guess: Update from canonical version, timestamp 2003-06-17. + * config.sub: Likewise. + + * syscall.c (force_result) [LINUX] [ARM]: Fix variable usage. + From: Joshua Neal . + + * process.c [LINUX] (sys_futex): Grok FUTEX_REQUEUE and print 5th arg. + * linux/syscallent.h: sys_futex argument count is now 5, not 4. + * linux/ia64/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + From Jakub Jelinek . + + * syscall.c (get_scno) [S390 || S390X]: Fix old vs new mode detection. + From Michael Holzheu . + +2003-06-23 Roland McGrath + + * net.c (sys_socket): Decode protocol for PF_INET6 same as PF_INET. + From Ulrich Drepper . + +2003-06-10 Roland McGrath + + * configure.ac, NEWS: Version 4.4.98. + * strace.spec, debian/changelog: 4.4.98-1. + +2003-06-09 Roland McGrath + + * linux/s390x/syscallent.h: Update many syscalls. + * linux/syscall.h (SYS_socket_subcall): Update [S390X] value. + + * linux/s390/syscallent.h: Update many syscalls. + * linux/syscall.h (SYS_socket_subcall): Update [S390] value. + + * linux/shmedia/syscallent.h: New file. + From Stephen Thomas . + + * strace.c (trace): Print a message and newline for a WIFEXITED report + from the process we just printed an unterminated syscall line for. + +2003-06-03 Roland McGrath + + * util.c (printcall) [LINUX]: Fix typo [IA62] -> [IA64]. + + Linux/ARM improvements from Russell King : + * defs.h [LINUX] (TCB_WAITEXECVE): Define for [ARM] too. + * process.c (struct_user_offsets) [LINUX] [ARM]: Add ARM registers. + * signal.c [LINUX] (sys_sigreturn) [ARM]: New case. + * syscall.c (get_scno, syscall_fixup) [LINUX] [ARM]: Case rewritten. + (get_error) [LINUX] [ARM]: Update. + (syscall_enter) [LINUX] [ARM]: New case. + * util.c (printcall) [LINUX] [ARM]: New case. + + * debian/control (Standards-Version): Update to 3.5.10. + + * strace.c (main): In PATH search, accept only a regular file with + execute bits set. Fixes Debian bug #137103. + +2003-06-02 Roland McGrath + + * strace.c (main): Set -q when given -o and not -p, and not when not + given -o, to match what the man page always said. + Fixes Debian bug #47113, #153678. + + * configure.ac, NEWS: Version 4.4.97. + * strace.spec, debian/changelog: 4.4.97-1. + + * configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c: + Merged in SHmedia port from Stephen Thomas . + + * config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/, + timestamp 2003-05-22. + * config.sub: Likewise, timestamp 2003-05-24. + +2003-05-22 Roland McGrath + + * defs.h (struct tcb): New member `nzombies'. + * strace.c (alloctcb): Initialize it. + (droptcb): Increment our parent's zombie count. + * process.c (internal_wait): Don't go into TCB_SUSPENDED if the + process has zombies it can reap. On the way out, if we reaped + an untraced process, decrement the zombie count. + + * process.c (sys_clone): Mask CSIGNAL out of flags and print that + separately using signame. + + * process.c (internal_clone) [TCB_CLONE_THREAD]: Use ARG_FLAGS instead + of literal 0 for index. Consult the right flags without clobbering + anything when we reparent the new child to the caller's parent thread. + + * linux/s390/syscallent.h: Fix sys_clone argument count. + * linux/s390x/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + + * process.c [LINUX] [S390 || S390X] (ARG_CTID, ARG_TLS): Fix swapped + indices. Reported by Jakub Jelinek . + + * signal.c [LINUX] (SI_SIGIO, SI_TKILL): New macros. + [LINUX || SVR4] (siginfo_codes): Add strings for them. + + * process.c (print_affinitylist): Fix loop condition. + Reported by Ian Wienand . + +2003-04-10 Roland McGrath + + * syscall.c (qual_desc): Return zero after parsing number. + From Rob Leslie , fixes Debian bug #188379. + +2003-04-07 Roland McGrath + + * linux/syscallent.h: Handle semtimedop subcall of ipc syscall. + * linux/syscall.h: Likewise. + * ipc.c [LINUX] (sys_semtimedop): New function. + From Ulrich Drepper . + + * ipc.c (sys_semget): Mask off permission bits for resource_flags. + From Ulrich Drepper . + +2003-04-01 Philippe De Muyter + + * sock.c, stream.c: Check #ifdef LINUX, not linux. + * file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE. + +2003-03-30 Roland McGrath + + * configure.ac, NEWS: Version 4.4.96. + * strace.spec, debian/changelog: 4.4.96-1. + +2003-02-26 Stuart Menefy + + Various fixes for SuperH [SH]: + * mem.c (sys_old_mmap): mmap() parameters passed in registers + * net.c (sys_pipe), syscall.c (getrval2): pipe() results returned + in registers + * process.c (change_syscall): Fixed register which holds system + call number + * util.c (arg0_offset, arg1_offset): provide definition + * Makefile.am: Added new files in linux/sh + * linux/sh/syscallent.h: New file. + * linux/sh/errnoent.h: New file. + * linux/sh/ioctlent.h: New file. + * linux/sh/signalent.h: New file. + + * linux/ioctlent.sh: Take an arg for location of header files + * syscallent.sh: Replaced lost $ + +2003-03-30 Roland McGrath + + * time.c [LINUX]: Handle new Linux 2.5 clock/timer syscalls. + * linux/syscall.h, linux/syscallent.h, linux/dummy.h: Likewise. + From Ulrich Drepper . + + * linux/syscallent.h: Use sys_getrlimit for 191. + Use name "old_getrlimit" for 76. + Reported by Ulrich Drepper . + +2003-03-18 Roland McGrath + + * process.c [LINUX] (sys_clone): Don't dereference parent_tid argument. + +2003-03-17 Roland McGrath + + * linux/x86_64/syscallent.h: clone takes 5 args. + * process.c [LINUX] (sys_clone) [X86_64]: Fix argument order. + +2003-03-15 Roland McGrath + + * linux/x86_64/syscallent.h: Add exit_group syscall at 231. + +2003-03-14 Roland McGrath + + * linux/x86_64/syscallent.h: Update and add many 2.5 syscalls. + + * linux/ia64/syscallent.h: clone takes 5 arguments. + * process.c [LINUX && IA64] (ARG_*): Update for 2.5 clone calls. + +2003-03-12 Roland McGrath + + * linux/ia64/syscallent.h: Fix arg counts for clone and clone2. + Use sys_clone for clone2. + * linux/syscall.h: Don't declare sys_clone2. + * process.c (sys_clone): Rewritten to handle both flavors, + print all extra args depending on flag bits. + (sys_clone2): Function removed. + + * linux/ia64/syscallent.h: Add a bunch of 2.5 syscalls. + +2003-03-04 Roland McGrath + + * syscall.c (get_scno) [IA64]: Do TCB_WAITEXECVE check only when + TCB_INSYSCALL is clear, like other platforms do. + +2003-03-04 Ulrich Drepper + + * mem.c [LINUX] (sys_remap_file_pages): New function. + * linux/syscall.h: Declare it. + * linux/syscallent.h: Use it. + * linux/powerpc/syscallent.h: Likewise. + + * process.c [LINUX] (sys_futex): Omit final if op is not FUTEX_WAIT. + +2003-02-26 Roland McGrath + + * configure.ac: Fix typo in netinet/in.h check. + Also include and before . + Reported by Alex Semenyaka . + +2003-02-24 Roland McGrath + + * configure.ac, NEWS: Version 4.4.95. + * strace.spec, debian/changelog: 4.4.95-1. + + * process.c (sys_getresgid): Fix typos in argument access. + +2003-02-23 Roland McGrath + + * process.c (sys_getresuid): Fix typos in argument access. + Reported by Anton Blanchard . + +2003-02-19 Roland McGrath + + * configure.ac, NEWS: Version 4.4.94. + * strace.spec, debian/changelog: 4.4.94-1. + + * version.c: Removed. + * Makefile.am (strace_SOURCES): Remove it. + * strace.c: Use PACKAGE_NAME and VERSION macros instead of version var. + + FreeBSD rfork support changes from Russ Cox : + * syscall.c (internal_syscall): Handle SYS_rfork with internal_fork. + * process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set. + +2003-01-23 Roland McGrath + + * signal.c: Reorder #ifdefs so HAVE_ASM_SIGCONTEXT_H doesn't matter on + SPARC, which doesn't use the header regardless. + + * util.c [LINUX && SPARC]: Do renaming kludges around + like signal.c does. + + * linux/sparc/syscall.h: Declare sys_getdents64, sys_llseek. + + * linux/dummy.h [! SYS_getpmsg] (sys_getpmsg): #define to printargs. + [! SYS_putpmsg] (sys_putpmsg): Likewise. + + * process.c: Reorder includes to put sys/reg.h before linux/ptrace.h, + since they can conflict. + +2003-01-21 Roland McGrath + + * strace.c (usage): Omit -z, since it has never worked properly. + * NEWS: Likewise. + + * strace.c (main): Grok new option `-E var=val' or `-E var' to put + var=val in environ or to remove var, respectively. + (usage): Mention it. + * strace.1, NEWS: Document it. + + * configure.ac, NEWS: Version 4.4.93. + * strace.spec, debian/changelog: 4.4.93-1. + * strace.spec (Source0): Use strace-VERSION.tar.bz2 now. + +2003-01-20 Roland McGrath + + * defs.h [LINUX] [S390 || S390X] (TCB_WAITEXECVE): Define it. + * syscall.c (get_scno, syscall_fixup) [LINUX] [S390 || S390X]: Handle + TCB_WAITEXECVE state with special kludges. + + * process.c [LINUX] (sys_clone) [S390 || S390X]: Argument order is + reversed from other architectures. + + * process.c (sys_execve) [LINUX]: Make setting TCB_WAITEXECVE flag + conditional on [TCB_WAITEXECVE] instead of list of processors. + + * util.c (restore_arg0): Evaluate args in no-op defns. + + * util.c [S390 || S390X] (arg0_offset, arg1_offset): Fix definitions + for clone call on S390. From Michael Holzheu . + +2003-01-17 Anton Blanchard + + * util.c [LINUX] (setbpt): Handle SYS_vfork like SYS_fork. + + * linux/syscall.h (SYS_socket_subcall): 256 also for POWERPC. + +2003-01-14 Roland McGrath + + * linux/powerpc/errnoent.h: Add missing errnos. + * linux/powerpc/ioctlent.h: Update ioctl values. + From Anton Blanchard . + + * io.c [LINUX] (sys_pread, sys_pwrite): Fix last change. + From Anton Blanchard . + + * linux/hppa/syscallent.h: Use sys_getdents64, sys_truncate64, + sys_ftruncate64, instead of printargs, for those syscalls. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + + * linux/syscall.h (SYS_socket_subcall): Only 256 for S390, S390X. + All others at the moment use linux/syscallent.h, where it's 300. + + * strace.1: Update bug reporting info. + + * resource.c [LINUX] (quotacmds): Grok new command encodings. + From Nathan Scott . + + * configure.ac, NEWS: Version 4.4.92. + * strace.spec, debian/changelog: 4.4.92-1. + + * configure.ac: Match powerpc* (includes powerpc64), and don't match + ppc (never comes out of config.sub). + + * process.c (sys_ptrace): Use #lx format for address argument. + [POWERPC]: Use sizeof(unsigned long) in place of 4 for multipliers. + * process.c [POWERPC]: Likewise. + * signal.c (sys_sigreturn) [POWERPC]: Likewise. + * syscall.c (get_scno) [POWERPC]: Likewise. + * util.c [POWERPC]: Likewise. + (printnum): Use long for NUM. + From Anton Blanchard . + + * defs.h (ALIGN64): Fix defn for PPC, same as FreeBSD one. + + * util.c [LINUX] (restore_arg0, restore_arg1): New macros, defined + appropriately via set_arg0 or no-ops for each architecture. + (clearbpt): Use those instead of set_arg0 and set_arg1. + + * defs.h [_LARGEFILE64_SOURCE] (_LFS64_LARGEFILE): Define it. + * linux/syscallent.h: Use sys_getdents64, sys_truncate64, + sys_ftruncate64, instead of printargs, for those syscalls. + + * process.c: Use regardless of . + (sys_ptrace): Use printxval. + (ptrace_cmds): Make PTRACE_GETREGS et al conditional on #ifdef PTRACE_* + instead of only #ifdef SUNOS4. Add PTRACE_[GS]ETFPXREGS. + + * ipc.c (PRINTCTL): New macro. #ifdef IPC_64, factor out the flag and + print it before using printxval. + (sys_msgctl, sys_semctl, sys_shmctl): Use it. + +2003-01-13 Roland McGrath + + * config.guess: Update from ftp://ftp.gnu.org/pub/gnu/config/, + timestamp 2003-01-10. + * config.sub: Likewise, timestamp 2003-01-03. + * install-sh: Update from Automake 1.7.2. + + * linux/powerpc/signalent.h: Add SIGRTMIN. + From Anton Blanchard . + + * linux/powerpc/syscallent.h: Add missing system calls. + Decode more system calls, we were just printargs for many things. + Remove some x86-specific system calls. + Remove two syscalls between the socket and ipc syscalls, + it was resulting in all IPC syscalls being off by two. + + * ioctl.c (ioctl_decode) [POWERPC]: Decode term ioctls like Alpha. + From Anton Blanchard . + + * defs.h [POWERPC] (UESP, EIP, EAX, ORIG_EAX): Remove this cruft. + [LINUX && POWERPC && !__powerpc64__] (ALIGN64): New macro. + * io.c (sys_pread, sys_pwrite): Use ALIGN64. + From Anton Blanchard . + + * term.c [LINUX]: Get kernel definition of struct termios. + From Anton Blanchard . + + * linux/ioctlent.sh: Look in sound/ directory too. + From Anton Blanchard . + + * desc.c (printflock64): Fix ADDR argument type. + From Anton Blanchard . + + * strace.c [! HAVE_STRSIGNAL]: Clean up #ifdefs on decls for + sys_siglist and _sys_siglist. + Reported by John Hughes . + + * net.c: HAVE_OPTHDR -> HAVE_STRUCT_OPTHDR + Reported by John Hughes . + + * linux/syscall.h [ARM] (SYS_socket_subcall): Set to 300. + +2003-01-10 Roland McGrath + + * configure.ac, NEWS: Version 4.4.91. + * strace.spec, debian/changelog: 4.4.91-1 + + * util.c [LINUX && X86_64] (arg0_offset, arg1_offset): Use correct + values for x86-64, conditional on current_personality. + + * strace.c (droptcb): Clear flags word before calling rebuild_pollv. + + * configure.ac: Check struct T_conn_res for QUEUE_ptr or ACCEPTOR_id. + * stream.c (print_transport_message): Use #ifdefs for those members. + + * strace.c (rebuild_pollv): Fix typo: struct poll -> struct pollfd. + + * configure.ac: Fix siginfo_t/sig_atomic_t checks. + Use prerequisite #include for netinet/*.h checks. + + * strace.c (pfd2tcb): Fix for new tcbtab type. + (rebuild_pollv): Likewise. + (detach): Put variables used under [LINUX] inside #ifdef. + + * process.c (change_syscall) [POWERPC]: Add missing return. + * util.c [POWERPC] (arg0_offset): Set to 4*PT_R3, not 4*PT_ORIG_R3. + + * strace.spec: New file. + * debian/changelog: 4.4.90-1 + * debian/rules (binary-arch): Depend on build. + (clean): Don't try to run Makefile.in. + * debian/control (Standards-Version): Now 3.5.8. + + * configure.ac: Diddle CFLAGS after AC_PROG_CC, not before. + +2003-01-09 Roland McGrath + + * syscall.c (force_result) [S390 || S390X]: Fix typo. + + * debian/control: Update Maintainer: field. + +2003-01-08 Roland McGrath + + * NEWS: Update for 4.4.90 test release. + + Support for new Linux 2.5 thread features. + * defs.h [LINUX]: Define __NR_exit_group if not defined. + (struct tcb): New members nclone_threads, nclone_detached, + and nclone_waiting. + (TCB_CLONE_DETACHED, TCB_CLONE_THREAD, TCB_GROUP_EXITING): New macros. + (waiting_parent): Macro removed. + (pid2tcb): Declare it. + * process.c (internal_clone) [TCB_CLONE_THREAD]: Reparent the new + child to our parent if we are a CLONE_THREAD child ourselves. + Maintain TCB_CLONE_THREAD and TCB_CLONE_DETACHED flags and counts. + (internal_wait) [TCB_CLONE_THREAD]: Factor out detached children when + determining if we have any. If TCB_CLONE_THREAD is set, check + parent's children instead of our own, and bump nclone_waiting count. + (internal_exit) [__NR_exit_group]: Set the TCB_GROUP_EXITING flag if + the syscall was exit_group. + * syscall.c (internal_syscall): Use internal_exit for exit_group. + * strace.c (pid2tcb): No longer static. + (alloctcb) [TCB_CLONE_THREAD]: Initialize new fields. + (droptcb) [TCB_CLONE_THREAD]: Maintain new fields. + If we have thread children, set TCB_EXITING and don't clear the TCB. + (resume) [TCB_CLONE_THREAD]: Decrement parent's nclone_waiting. + (detach) [TCB_CLONE_THREAD]: When calling resume, check all thread + children of our parent that might be waiting for us too. + [TCB_GROUP_EXITING] (handle_group_exit): New function. + (trace) [TCB_GROUP_EXITING]: Use that in place of detach or droptcb. + + Revamp -f support for Linux. + * util.c [LINUX] (setbpt, clearbpt): New implementations that tweak + the system call to be clone with CLONE_PTRACE set. Various new static + helper functions. + * process.c (internal_clone): Define also #ifdef SYS_clone2. + Initialize TCPCHILD->parent field. + [CLONE_PTRACE]: Don't do PTRACE_ATTACH here, because it's preattached. + Check in case the new child is in the tcb already. + (internal_fork) [LINUX]: Just call internal_clone. + * strace.c (trace) [LINUX]: Under -f/-F, grok an unknown pid + reporting to wait, put it in the TCB with TCB_ATTACHED|TCB_SUSPENDED. + + * linux/x86_64/syscallent1.h (sys_oldlstat): #define as printargs. + + * file.c [LINUX]: #undef st_[amc]time in case they are macros. + + * Makefile.am (AM_CFLAGS): New variable, define to $(WARNFLAGS). + + * Makefile.am (EXTRA_DIST): Remove debian/postinst and debian/prerm. + +2003-01-09 Wichert Akkerman + + * debian/postinst, debian/prerm: removed, /usr/doc symlink is no + longer used + * debian/rules: no longer install postinst and prerm + * debian/control: do not end summary with full stop (lintian) + +2002-12-30 Roland McGrath + + * Makefile.am (bin_SCRIPTS): New variable, list strace-graph. + (EXTRA_DIST): Add missing files. + + * configure.ac: Fix asm/sigcontext.h check to include prerequisite. + + * syscall.c (qualify_one): New function. + (qual_options): Replace lookup field with qualify, update initializer. + (qualify): Update caller. + (qual_signal, qual_fault, qual_desc): Rewritten from lookup_*. + (qual_syscall): Rewritten lookup_syscall, match name more than once. + Fixes RH#70579, bites IA64 -efoo when foo exists on IA32. + + * version.c (version): Make const, bump to 4.4.90. + * strace.c: Update decl. + + * Makefile.am [LINUX && X86_64]: Remove cruft. + * linux/x86_64/errnoent1.h: New file. + * linux/x86_64/ioctlent1.h: New file. + * linux/x86_64/signalent1.h: New file. + * linux/x86_64/syscallent1.h: New file. + * linux/x86_64/i386-headers.diff: File removed. + * linux/x86_64/makeheaders.sh: File removed. + * linux/x86_64/Makefile.in: File removed. + + * linux/syscallent.h [X86_64]: Disable sanity checks, subcall stuff is + already broken for 32-bit personality on x86-64. + +2002-12-29 Roland McGrath + + * configure.ac, Makefile.am: Punt subdirs, handle everything here. + * linux/Makefile.am: File removed. + * freebsd/Makefile.am: File removed. + * sunos4/Makefile.in: File removed. + * svr4/Makefile.in: File removed. + + * linux/alpha/Makefile.in: File removed. + * linux/hppa/Makefile.in: File removed. + * linux/ia64/Makefile.in: File removed. + * linux/powerpc/Makefile.in: File removed. + * linux/s390/Makefile.in: File removed. + * linux/s390x/Makefile.in: File removed. + +2002-12-26 Roland McGrath + + * syscallent.sh: Grok three flavors of #define line, uniquify. + * linux/hppa/syscallent.sh: File removed. + * linux/powerpc/syscallent.sh: File removed. + + * linux/Makefile.am: New file. + * linux/Makefile.in: File removed. + * freebsd/Makefile.am: New file. + * freebsd/i386/Makefile.am: New file. + * freebsd/i386/Makefile.in: File removed. + +2002-12-22 Roland McGrath + + Update to Autoconf 2.57, and Automakify with version 1.7. + * Makefile.am: New file. + * Makefile.in: File removed. + * configure.in: Moved to ... + * configure.ac: ... here. Update for Autoconf 2.5x and Automake. + * aclocal.m4: Moved to ... + * acinclude.m4: ... here. Update for Autoconf 2.5x. + * acconfig.h: File removed. + * AUTHORS: New file, makes automake happy. + * autogen.sh: File removed. + * README-CVS: Update to recommend autoreconf instead. + * file.c: HAVE_ST_* -> HAVE_STRUCT_STAT_ST_*. + * net.c: HAVE_SIN6_SCOPE_ID -> HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID, + HAVE_MSG_CONTROL -> HAVE_STRUCT_MSGHDR_MSG_CONTROL. + * strace.c: *_DECLARED -> HAVE_DECL_* + * stream.c: HAVE_* -> HAVE_STRUCT_* + + * linux/Makefile.in (ioctldefs.h ioctls.h): Use $(SHELL) instead of + sh, and use $(srcdir) to find the script. + * linux/powerpc/Makefile.in (ioctlent.raw): Find ioctlent.sh in ../. + (ioctlsort.o): Use ../ioctlsort.c, not ../../ioctlsort.c. + * linux/x86_64/Makefile.in (headers): Renamed to all. + * linux/alpha/Makefile.in: Add empty install target. + * linux/x86_64/Makefile.in: Likewise. + * linux/powerpc/Makefile.in: Likewise. + * linux/Makefile.in: Likewise. + +2002-12-26 Roland McGrath + + * defs.h [LINUX && MIPS] (MAX_QUALS): Set to 5000, not 4999. + From Daniel Jacobowitz . + +2002-12-21 Roland McGrath + + * linux/syscallent.h: Add some new 2.5 syscall names. + Now clone takes 5 args. + * process.c [LINUX] (clone_flags): Update with 2.5 flag bits. + [LINUX] (sys_clone): Print new args. + * mem.c (print_ldt_entry): Make global. + + * linux/syscall.h [I386 || IA64] (SYS_socket_subcall): Bump to 300 for + safety, since up to 260 are already used in 2.5 kernels. + * linux/syscallent.h: Update the table. + * linux/ia64/syscallent.h: Likewise. + + * syscall.c (force_result): New function. + * process.c (internal_wait): Handle ECHILD exit from wait call with + WNOHANG flag set; force the return value to 0 in the inferior when it + has live children we are tracing. + * NEWS: Mention the bug fix. + +2002-12-17 Roland McGrath + + * linux/ia64/syscallent.h: Remove placeholders 275-298 to catch up + with linux/syscallent.h additions. + + * strace.c (tcbtab): Make this a pointer to pointers, not an array. + (tcbtabsize): New variable. + (main): Initialize them using dynamic allocation. + (alloctcb, main): Use tcbtabsize in place of MAX_PROCS; indirect. + (pid2tcb, cleanup): Likewise. + [USE_PROCFS] (pollv): Make this a pointer, not an array; make static. + (rebuild_pollv): Dynamically allocate the vector. + * defs.h (tcbtab): Update decls. + (MAX_PROCS): Macro removed, no more static limit on this. + * process.c (fork_tcb): New function. + (internal_clone, internal_fork): Use it instead of checking nprocs. + + * strace.c (detach) [LINUX]: Use __WALL (or a second try with __WCLONE) + in wait after sending SIGSTOP. + +2002-12-16 Roland McGrath + + * signal.c (sprintsigmask): Increase static buffer size to account for + worst possible case. Reported by Daniel Jacobowitz . + + * process.c [LINUX] (wait4_options): Fix __WCLONE value. Add + __WNOTHREAD and __WALL. + + * strace.c (trace) [LINUX]: Only check errno if wait4 actually fails, + so we don't repeat a wait and thus drop a status. Fixes RH#62591. + +2002-12-15 Roland McGrath + + * process.c (setarg) [POWERPC]: Support it. + + * util.c [POWERPC] (LOOP): Fix value, now 0x48000000 (0: b 0b). + Old value was bogus, not even a proper instruction. + From Guy M. Streeter . + + * strace.c (main) [! USE_PROCFS]: Always reset SIGCHLD to SIG_DFL. + + * configure.in: Don't check for putpmsg. + * stream.c (sys_getpmsg, sys_putpmsg): Make these conditional on + #ifdef SYS_*, rather than on HAVE_PUTPMSG. + + * aclocal.m4 (AC_STAT64): Include before + in test. Test our own #ifdef LINUX rather than predefined `linux'. + + * linux/powerpc/syscallent.h: Use sys_llseek for _llseek. + * linux/sparc/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + + * syscall.c (syscall_enter) [LINUX && POWERPC]: Define PT_ORIG_R3 if + not defined, since defines it only #ifdef __KERNEL__. + * process.c: Likewise. + + * desc.c (sys_osf_select): Add missing return type. + + * syscall.c (trace_syscall): Use strerror, not sys_errlist/sys_nerr. + + * linux/ia64/syscallent.h: Remove macros for sys_delete_module, + sys_nanosleep, both already in linux/dummy.h. + + * syscall.c (get_scno): Move static `currpers' inside #ifdef X86_64. + (trace_syscall): Fix return without value. + + * linux/syscallent.h: Update table with names of new syscalls + io_setup, io_destroy, io_getvents, io_submit, io_cancel. + * linux/ia64/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + + * signal.c [LINUX && I386]: Provide SA_RESTORER constant if not + defined. If the bit is set, print the sa_restorer field of sigaction. + + * mem.c: Add sys_{get,set}_thread_area. + * linux/syscall.h: Declare them. + * linux/syscallent.h: Update the table for these. + * linux/dummy.h (sys_modify_ldt): Define only #ifndef I386. + (sys_get_thread_area, sys_set_thread_area): New macros #ifndef I386. + + * configure.in: Check for linux/xattr.h and linux/futex.h headers. + * linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg, + readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int + listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity, + sched_getaffinity, futex. + * linux/syscallent.h: Update the table. + * io.c: Add sys_sendfile64. + * file.c: Add sys_readahead, sys_*xattr. + * process.c: Add sys_futex, sys_*affinity. + + * linux/syscall.h (SYS_socket_subcall): Define to 256 on all machines. + (SYS_ipc_subcall): Always SYS_socket_subcall + SYS_socket_nsubcalls. + * linux/syscallent.h: Update the table for socket and ipc subcalls. + +2002-11-09 Heiko Carstens + + Bugfix for s390/s390x: + * syscall.c: Fixed scno derivation for s390/s390x. + +2002-11-06 Michal Ludvig + + Merged patch from Steven J. Hill + to allow the compilation of a native MIPS strace. + +2002-11-06 Michal Ludvig + + From Marty Leisner , + rewritten by mludvig: + * strace.c (not_failing_only): New. + (usage): Added -z switch description. + (main): Added -z switch parsing to not_failing_only variable. + * syscall.c (trace_syscall): Added not_failing_only handling. + +2002-10-08 Heiko Carstens + + Missing complete changelog for 2002-10-07 commit: + * Makefile.in: Added linux/s390, linux/s390x to ALL_SUBDIRS. + * acconfig.h: New define for s390x. + * config.sub: Added missing define for s390 and new one for s390x. + * configure.in: Added new define for s390x. + * file.c: Added missing #undef dirent64 and new defines for s390x. + * linux/s390: New directory. + * linux/s390/Makefile.in: New file. + * linux/s390/errnoent.h: New file. + * linux/s390/ioctlent.h: New file. + * linux/s390/signalent.h: New file. + * linux/s390/syscallent.h: New file. + * linux/s390x: New directoy. + * linux/s390x/Makefile.in: New file. + * linux/s390x/errnoent.h: New file. + * linux/s390x/ioctlent.h: New file. + * linux/s390x/signalent.h: New file. + * linux/s390x/syscallent.h: New file. + * linux/syscall.h: Added sys_mincore() prototype and added new + s390x defines. + * process.c: Added s390x defines. + (change_syscall): Changed handling for s390. + (setarg): Added missing s390/s390x code in setarg(). + * signal.c: Added s390x define. + (sys_sigreturn): Bugfix in s390/s390x code (wrong number of + arguments to sprintsigmask()). + * stream.c (internal_stream_ioctl): Changed int cast to long cast, + since printstr() expects a long. + * syscall.c (decode_subcall): Changed several variables to be long + instead of int to match 64 bit requirements. Added s390x defines. + (syscall_enter): Changed upeek() call to match s390 and s390x + requirements. + * util.c: Added s390x defines. + +2002-10-07 Michal Ludvig + + Merged s390x port by Heiko Carstens + and bugfixes to s390 by D.J. Barrow. + +2002-09-23 Michal Ludvig + + Merged x86-64 port by Andi Kleen + and Michal Ludvig + * Makefile.in: New target 'headers'. Failure ignored. + * acconfig.h: New defines for x86-64. + * configure.in: Ditto. + * defs.h: Ditto. + * file.c: Ditto. + * signal.c: Ditto. + * process.c: Added support for x86-64. + * util.c: Ditto. + * syscall.c: Ditto + added automatic personality switching. + * linux/syscall.h: Ditto. + * linux/x86_64: New directory. + * linux/x86_64/Makefile.in: New file. + * linux/x86_64/gentab.pl: Ditto. + * linux/x86_64/i386-headers.diff: Ditto. + * linux/x86_64/makeheaders.sh: Ditto. + * linux/x86_64/syscallent.h: Ditto. + * mem.c (print_mmap): Always print arg[4] as int. + +2002-09-23 Michal Ludvig + + * configure.in: Fix regular expressions. + * linux/syscall.h: Added missing braces in prototype of + sys_getdents64(). + * file.c: Use '#ifdef LINUX' instead of '#ifdef linux'. + (struct fileflags): Made extern to inhibit compiation warnings. + (sys_getdents64): Merged LINUX and SVR4 part. + * syscall.c (get_scno): Split multiline string into two distinct + strings. + +2002-05-24 John Hughes + + * stream.h, net.h: Avoid possible infinite loop caused by + unsigned arithmetic in preceeding change. + +2002-05-23 John Hughes + + * acconfig.h: Add HAVE_OPTHDR and HAVE_T_OPTHDR defines. + + * aclocal.m4: Add tests for struct opthdr in sys/socket.h and + struct t_opthdr in sys/tiuser.h, define HAVE_OPTHDR and HAVE_T_OPTHDR + if found. + + * configure.in: use tests for struct opthdr and struct t_opthdr. + + * defs.h: add new function print_sock_optmgmt. + + * io.c: add hack that lets ioctl decode functions set auxilliary + string return. + + * stream.c: better decoding for timod ioctls. + + * net.c: add function print_sock_optmgmt, used by timod ioctl + decoding functions in stream.c. + +2002-05-23 John Hughes + + * acconfig.h: Make autoheader happy about Linux/SuperH + +2002-05-23 John Hughes + + * strace.c: Get rid of warning if not using POLL_HACK + +2002-05-22 John Hughes + + * net.c: Simplify {get,set}sockopt, decode SO_LINGER, cope with + options that are not just ints, cope with systems that don't + #define SOL_TCP and so on. + +2002-05-21 John Hughes + + * strace.c: Fix warning if POLL_HACK is used. + +2002-05-17 John Hughes + + * svr4/ioctlent.sh: Some defines on UW come with too many spaces. + +2002-05-17 John Hughes + + * svr4/ioctlent.sh: Cope with #defines wrapped in #ifdefs. + +2002-05-17 John Hughes + + * stream.c: tidy up output a little. + +2002-05-17 John Hughes + + * process.c, svr4/dummy.h, svr4/syscall.h: decode arguments + to procpriv syscall. + +2002-05-01 Wichert Akkerman + + * configure.in, defs.h, process.c, sock.c, syscall.c, util.c: merge + patch from Greg Banks for Linux/SuperH + support + +2002-04-01 Wichert Akkerman + + * strace.c: close tcp->outf in droptcb() + +2002-04-01 Wichert Akkerman + + * net.c: decode packet options + +2002-03-31 Wichert Akkerman + + * linux/{alpha,hppa,ia64,mips,powerpc,sparc}/syscallent.h: regenerated + +2002-03-31 Wichert Akkerman + + * debian/*: added + * linux/syscallent.h: fix typo and add the reserved stream syscalls + * defs.h, file.c, io.c: fix signed/unsigned issues + * syscall.c: check for negative u_errors + * cvsbuild: renamed to autogen.sh + +2001-12-17 Wichert Akkerman + + * net.c: add new TCP socket options + +2001-10-26 John Hughes + + * svr4/ioctlent.sh: Cope with #define lines containing + comments that terminate on subsequent lines. Used to + comment out subsequent ioctls! + +2001-10-25 Wichert Akkerman + + * linux/ioctlent.h: regenerated using current scripts so + term ioctls are included + +2001-10-19 John Hughes + + * strace.c(proc_open): On SVR4 only trace the syscalls, + signals and faults we care about. + +2001-10-18 John Hughes + + * acconfig.h: Add HAS_SIGINFO_T. + * aclocal.m4: add check for siginfo_t in signal.h. + * configure.in: use check for siginfo_t. + * defs.h: if HAVE_SIGINFO_T the declare printsiginfo. On SVR4 + allow access to siginfo when signal recieved. + * process.c: Remove SVR4 only version of printsiginfo. + * signal.c: merge SVR4 and LINUX versions of printsiginfo. + * strace.c: on SVR4 print siginfo when signal recieved. + +2001-10-18 John Hughes + + * system.c(sys_ssisys): handle return values for ssisys + +2001-10-18 John Hughes + + * signal.c: handle sigwait + * svr4/dummy.c: Move sigwait to done + * svr4/syscall.h: handle sigwait + +2001-10-16 John Hughes + + * system.c(sys_ssisys): decode some args for ssisys. + +2001-10-16 John Hughes + + * mem.c: MS_SYNC is zero, so must be first in xlat list. + + * svr4/dummy.h: memcntl is much like mctl. + +2001-10-16 John Hughes + + * util.c (umovestr): UnixWare (svr4?) returns 0 when trying + to read unmapped page. Make it possible to strace ksh. + +2001-10-03 David Mosberger + + * process.c (internal_clone): Avoid race condition by clearing + breakpoint after attaching to child. + +2001-10-02 David Mosberger + + * linux/ia64/syscallent.h: Define ia32 syscall numbers (originally + by Don Dugger, with my refinements). + + * linux/ia64/ioctlent.h: Regenerate and manually merge conflicting + ioctls (TCGETS & SNDCTL_TMR_TIMEBASE, etc.). + + * linux/ia64/Makefile.in (ioctldefs.h ioctls.h): Update for + new ioctlent.h generation scheme. + + * linux/syscall.h (sys_clone2): Declare. + [IA64] Define ia32 socket, ipc, and extra syscall numbers. + + * linux/ioctlent.sh (regexp): Also handle so we + don't miss the tty ioctls (unfortunately, some of the sound timer + ioctls are in conflict with them!). + + * util.c (setbpt) [IA64]: Add ia32 support (by Don Dugger). + (clrbpt) [IA64]: Ditto. + + * syscall.c (internal_syscall): Handle SYS_clone2, SYS32_wait4, + and SYS32_exit. + (get_scno): Get ia32 syscall number from r1 (orig eax) instead of + r8 (eax). Handle TCB_WAITEXECVE. + (syscall_fixup): Handle ia64. + (syscall_enter): Fix argument fetching for ia64. + + * strace.c [IA64 && LINUX]: Include . + (trace) [PT_GETSIGINFO]: Print signal address and pc if possible. + + * process.c (tcp): New function. + (change_syscall): Add support for ia64 linux. + (sys_execve): Turn on TCB_WAITEXECVE for ia64 linux. + + * desc.c (getlk): Cast l_len to "long long" to avoid warnings when + type is narrower. + * resource.c (sprintrlim64): Ditto. + + * defs.h (TCB_WAITEXECVE) [IA64]: Define. + [IA64]: Declare "ia32" variable. + + * bjm.c: Do not include . It's not safe to include + kernel headers. Declare the necessary constants and structures + directly instead. + +2001-10-01 David Mosberger + + * signal.c (parse_sigset_t): New function. + (sigishandled): Fix off-by-one bug by using parse_sigset_t() and + avoiding relying on internal layout of sigset_t datastructure. + +2001-04-26 David Mosberger + + * linux/ia64/syscallent.h: Add getunwind(). + +2001-04-11 David Mosberger + + * syscall.c (syscall_enter): Use PT_RBS_END instead of deprecated + PT_AR_BSP. Pick up arguments starting with out0, which is not + always the same as r32 (e.g., consider inlined syscalls). + +2001-09-28 John Hughes + + * process.c: FreeBSD-CURRENT no longer has PT_READ_U, and anyway we + were showing it as PT_WRITE_U! Fix from Maxime Henrion. + +2001-09-18 John Hughes + + * net.c: fix display of sockaddr structures, sometimes too many "}", + sometimes too few. Fix suggested by Richard Kettlewell. + +2001-08-19 Wichert Akkerman + + * signal.c: do not include asm/sigcontext.h on IA64 since it gets + the struct from bits/sigcontext.h already which signal.h includes. + +2001-08-03 Wichert Akkerman + + * linux/ioctlent.sh: change regexps so we catch sound ioctls as well in + Linux + * linux/Makefile.in: fix a few things so the ioctl list is generated + properly + * ioctl.c: remember to shift ioctl masks as well + +2001-08-03 Wichert Akkerman + + * Linux/**/syscallent.h: synchronize section for fcntl and use sys_fcntl + for sys_fcntl as well + +2001-08-03 Wichert Akkerman + + * linux/hppa/syscallent.h: updated from Matthew Wilcox + +2001-08-03 Wichert Akkerman + + * process.c: seems Linux/IA64 changed register names on us, switch to + using new names. + +2001-08-03 Wichert Akkerman + + * strace.c: set CLOEXEC flag for outputfile + +2001-08-03 Wichert Akkerman + + * linux/sparc/syscall.h, linux/sparc/syscallent.h: add some LFS calls + +2001-07-23 Wichert Akkerman + + * configure.in: Support cross-compiling between architectures + +2001-07-13 Wichert Akkerman + + * configure.in: add S390 to architecture list + +2001-07-10 John Hughes + + * TODO, defs.h, io.h, net.c, strace.c, syscall.c, util.c: Merge fixes + from Richard Kettlewell which add I/O dumping + of args to readv/writev. Also gets rid of redundant printiovec + routine from net.c (duplicate of tprint_iov in util.c). + +2001-07-02 Wichert Akkerman + + * config.{guess,sub}: updated + +2001-05-15 John Hughes + + * signal.c: pass a pointer to sigmask to printsigmask from printcontext, + it was just passing the sigmask (ucp->uc_sigmask). + +2001-05-15 John Hughes + + * util.c: Don't run off the end of valid memory in umovestr when + USE_PROCFS. Important for FREEBSD systems (which seem to have an + unmapped page just after the args/env area). + +2001-04-18 John Hughes + + * configure.in: test for sys/nscsys.h, the non-stop clusters includes. + * process.c: handle rfork{1,all} and rexecve calls on non-stop clusters. + * syscall.c: treat rfork{1,all} and fork{1,all} as fork like calls. + Treat rexecve as an exec. + * system.c: decode arguments to ssisys call on nsc systems. + * svr4/dummy.h, svr4/syscall.h: now we handle rfork{1,all}, ssisys and + rexecve calls. + +2001-04-12 Wichert Akkerman + + * process.c: fix cast for powerpc code + * linux/powerpc/syscallent.h: update syscall list + * README: fix address for the strace mailinglist + * signal.c: switch to using /proc//status on Linux so we can get + the realtime signals as well + +2001-04-10 Wichert Akkerman + + * Merge patches from Maciej W. Rozycki: + + util.c: add code to print PC for MIPS + + linux/mips/syscallent.h: updated + + system.c: formating fixes for sys_sysmips + + configure.in: test for yet more headers + + stream.c: use configure-headertests instead of relying on OS hints + +2001-04-07 Wichert Akkerman + + * NEWS: start 4.3.1 items + * version.c: updated to say 4.3.1 (was still 4.2, oops!) + +2001-04-07 Wichert Akkerman + + * configure.in: test for asm/sysmips.h and linux/utsname.h + * linux/syscall.h: fix a typo for sys_sysmips + * system.c: include asm/sysmips.h and linux/utsname.h if they exist, + fix typo + +2001-03-31 Wichert Akkerman + + * linux/mips/ioctlent.h: updated using new Linux ioctl setup + +2001-03-31 Wichert Akkerman + + * linux/ia64/ioctlent.h: regenerated + +2001-03-31 Wichert Akkerman + + * linux/{alpha,ia64,powerpc}/ioctlent.sh: removed, all archs use the + general Linux ioctlent.sh + +2001-03-31 Wichert Akkerman + + * linux/ioctlent.sh: add dir variable for location of kernel headers + +2001-03-29 Wichert Akkerman + + * linux/ia64/ioctlent.h: updated using new Linux ioctl setup + +2001-03-29 Wichert Akkerman + + * linux/powerpc/ioctlent.h: updated using new Linux ioctl setup + +2001-03-29 Wichert Akkerman + + * linux/hppa/ioctlent.h: updated using new Linux ioctl setup + +2001-03-29 Wichert Akkerman + + * linux/alpha/ioctlent.h: updated using new Linux ioctl setup + +2001-03-28 Wichert Akkerman + + * configure.in: use sparc* so we can compile on sparc64 as well + * process.c, syscall.c: work around double define of fpq, fq and fpu + structs on Linux/sparc, and use regs instead of pt_regs + * don't use asm/sigcontext.h on Linux/sparc + +2001-03-28 Wichert Akkerman + + * linux/sparc/ioctlent.h: updated using new Linux ioctl setup + +2001-03-28 Wichert Akkerman + + * strace.c: use __WALL as wait4 flag if it exists so we can properly + trace threaded programs + +2001-03-27 John Hughes + + * aclocal.m4: add check for endianness of long long. + * acconfig.h: add #define for LITTLE_ENDIAN_LONG_LONG. + * configure.in: check for endianness of long long. + * defs.h: change LONG_LONG macro to work with either endianness of + long long. + +2001-03-27 John Hughes + + * net.c: Make compilable by SCO UDK compiler (doesn't like empty + initialisation list for array). + +2001-03-27 John Hughes + + * svr4/syscallent.h: ntp_adjtime entry was duplicated on Solaris + systems - bad merge of Harald Boehme's patch by me. + +2001-03-27 Wichert Akkerman + + * lots of files: add Linux/hppa support + +2001-03-19 Wichert Akkerman + + * linux/mips/syscallent.h: we can't have -1 nargs, change to 0 + * linux/syscallent.h: not that syscalls 220 and 221 are used now + * config.guess: updated + +2001-03-17 Wichert Akkerman + + * linux/ioclsort.c: new file + * linux/ioctlent.sh: complete rewrite to use a more sane approach to get + the ioctl list that doesn't involve attempting to #include all kernel + headers + * linux/.cvsignore: added ioctdefs.h and ioctls.h which are generated + by the new ioctlent.sh + * ioctl.c: only look at the number and type bits for linux, since + ioctlent.sh no longer supplies the others + +2001-03-08 John Hughes + + * freebsd/syscalls.pl: On FreeBSD we must cope with COMPATibility syscalls, + pretend they have names ending with "?" so that -e trace=stat (for + example) will work. + * freebsd/i386/syscallent.h: add ? to compatability syscalls. + * freebsd/i386/syscall.h: consistency. + +2001-03-08 John Hughes + + * acconfig.h: add new ST_xxx defines. + * aclocal.m4: macros to check for more fields in struct stat. + * configure.in: use new macros to check for fields in struct stat. + * file.c: use new defines to replace #ifdef FREEBSD by #if HAVE_ST_xxx. + +2001-03-08 John Hughes + + * defs.h: rename wimpy get64 as powerful new LONG_LONG + * file.c: use LONG_LONG + * io.c: use LONG_LONG + * mem.c use LONG_LONG + +2001-03-08 John Hughes + + * acconfig.h: new #defines HAVE_LONG_LONG_OFF_T and HAVE_LONG_LONG_RLIM_T. + * aclocal.m4: routines to check for long long off_t and rlim_t. + * configure.in: check for long long off_t and rlim_t. + * desc.c: if HAVE_LONG_LONG_OFF_T treat flock as flock64 + * file.c: if HAVE_LONG_LONG_OFF_T treat stat,lstat,fstat and lseek as 64 + bit versions. + * io.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of pread and pwrite. + * mem.c: if HAVE_LONG_LONG_OFF_T use 64 bit version of mmap + * resource.c: if HAVE_LONG_LONG_OFF_T use 64 bit versions of getrlimit + and setrlimit. + * freebsd/syscalls.print: don't explicitly use 64 bit versions of calls, + now done automaticaly for us. + * freebsd/i386/syscall.h: ditto. + * freebsd/i386/syscallent.h ditto. + +2001-03-07 John Hughes + + * desc.c: On FreeBSD flock structure uses 64 bit offsets. + * file.c: On FreeBSD use stat64 and pals instead of stat. + * freebsd/syscalls.print: use stat64, lstat64 and fstat64. + * freebsd/i386/syscall.h: ditto. + * freebsd/i386/syscallent.h: ditto. + +2001-03-07 John Hughes + + * file.c: merge missing part of Harald Böhme's solaris patches, + was only declaring sys_{stat64,lstat64,fstat64} on linux! + +2001-03-07 John Hughes + + * svr4/dummy.h: fix multiple define warning on non LFS64 systems. + * svr4/syscallent.h: pread/pwrite are TF calls. + +2001-03-07 John Hughes + + * defs.h: add ALIGN64 macro to cope with FreeBSD's strange insistence + on alignment for off_t (64 bit) arguments. Also simplify get64 so + we don't need to know endianness of long long. + * file.c: FreeBSD now uses 64 bit versions of lseek, truncate, + ftruncate, allows reduction in numvber of horrid #if's + * io.c: FreeBSD now uses 64 bit versions of pread, pwrite. + * mem.c: FreeBSD now uses 64 bit version of mmap. + * freebsd/syscalls.print: use 64 bit versions of various syscalls. + * freebsd/i386/syscall.h: use 64 bit versions of various syscalls. + * freebsd/i386/syscallent.h: use 64 bit versions of various syscalls. + +2001-03-06 John Hughes + + * file.c: Implement truncate64 and ftruncate64 + * svr4/dummy.h: add dummies for truncate64 and ftruncate64 for non + LFS64 systems. + * svr4/syscall.h: add declarations for truncate64 and ftruncate64. + +2001-03-06 John Hughes + + * freebsd/syscalls.pl: fix for FreeBSD 4.1 (new optional field in + syscall master file). + +2001-03-06 John Hughes + + * syscall.c: fix for FreeBSD 4.1 (SYS_semconfig has disappeared). Also + zap incorrect syscall subarg range check. + +2001-03-06 John Hughes + + * configure.in, defs.h, desc.c, file.c, io.c, mem.c, net.c, resource.c, + signal.c, syscall.c, svr4/dummy.h, svr4/syscall.h, svr4/syscallent.h: + merge Harald Böhme's solaris patches (_LFS64_LARGEFILE and kernel aio + mostly). + +2001-03-06 John Hughes + + * dummy.h: add unimplemented UW sycalls + * syscall.h: we can do settimeofday for UW, whopee! + * syscallent.h: fix unimplemented UW syscalls + +2001-03-06 John Hughes + + * aclocal.m4: look for pr_syscall in pr_lwp if we HAVE_MP_PROCFS + * defs.h: add PR_SYSCALL to allow use of pr_lwp.pr_syscall if it exists. + * syscall.c: use PR_SYSCALL instead of pr_syscall, fix up UnixWare code + so it doesn't try to use pr_sysarg. + +2001-03-06 John Hughes + + * aclocal.m4: on systems other than linux look for stat64 in sys/stat.h + * file.c: handle xstat version _STAT64_VER, aka stat64. + +2001-03-06 John Hughes + + * net.c: make sure SOL_ options are defined before using. + * signal.c: declare sigset variable, only used on linux, inside #ifdef. + +2001-02-21 Wichert Akkerman + + * net.c: fix format for printing Unix domain sockets + +2001-02-19 Wichert Akkerman + + * linux/mips/syscallent.h: use new sys_sysmips + * system.c: add sys_sysmips decoding + +2001-02-16 Wichert Akkerman + + * CREDITS: add Arkadiusz Miskiewicz who + submitted the IP6 scope ID updates + * acconfig.h: add HAVE_SIN6_SCOPE_ID and HAVE_SIN6_SCOPE_ID_LINUX + * aclocal.m4: add AC_SIN6_SCOPE_ID to check if sin6_scope_id is + available + * configure.in: check for if_indextoname function and sin6_scope_id + * net.c: teach printsock about IP6 scope ids + +2001-02-16 Wichert Akkerman + + * configure.in: test for netinet/tcp.h and netinet/udp.h existance + * net.c: include netinet/tcp.h and netinet/udp.h if they exist + * Makefile.in: use @mandir@ and @bindir@ + +2000-11-26 Wichert Akkerman + + * net.c: fix formating error in sys_setsockopt + * net.c: add list of socketlayers and use that for [gs]etsockopt + +2000-10-12 Wichert Akkerman + + * time.c: use sys/timex.h so things compile with 2.2 kernels + * stream.c: test if MSG_* constants are #defined + +2000-09-03 Wichert Akkerman + + * process.c: perform bpt trick for clone as well so we can get the + pid of the child before it starts doing something + * file.c: rename dirent64 struct to kernel_dirent64 so things compile + again with newer libcs + * test/clone.c: improve our testcase a bit + * Merge another patch from Gäel Roualland with FreeBSD updates + +2000-09-01 Wichert Akkerman + + * lots of files: merge patch from Gaël Roualland to add + support for FreeBSD. + +2000-08-09 Wichert Akkerman + + * file.c: update to reflect that st_ino suddenly became a long long + in the in Linux 2.4.0-test6 + +2000-08-09 Wichert Akkerman + + * test/clone.c: minor fixup + * Another bunch of patches from John Hughes merged: + * signal.c: + + SVR4 printcontext(): sigset_t != sigset_t* + + getcontext returns a value, so print on exit of syscall + + add UC_FP to ucontext_flags for OS writers that can't spell + + sys_signal(): special case SIG_{ERR,DFL,IGN} + + decode_subcall(): only do subcall range checking when needed + * bunch of UnixWare updates + * aclocal.m4, acconfig.h, configure.in: add test for long long type + +2000-07-04 Wichert Akkerman + + * net.c: add SOL_PACKET and SOL_RAW socket options, update + SOL_IP and SOL_TCP + +2000-06-23 Wichert Akkerman + + * strace.c: close outf before we exec a child process + +2000-06-09 Ulrich Drepper + + * configure.in: Don't link against libnsl on Linux, it's unnecessary. + * defs.h (struct tcb): Make auxstr member const. + * file.c (fsmagic): And many more magic numbers. + * util.c: Don't include for glibc 2.1 and up. + +2000-04-26 Wichert Akkerman + + * defs.h: balance #if/#endif again + * system.c: fix return statements in sys_capget() + * Merge updates from Topi Miettinen : + + file.c: add F_[SG]ETSIG to fcntl flags + + strace.c: don't setre[gu]id if not needed + + system.c: handle sys_reboot for Linux + + term.c: add baudrate constants up to B4000000 + + linux/**/syscallent.h: note that munlockall has no arguments + +2000-04-25 David Mosberger + + * CREDITS: fix email address + * process.c: handle PR_[GS]ET_UNALIGN and PR_[GS]ET_KEEPCAPS + * signal.c: honour offset of sigconfig in sigframe structure for + Linux/ia64 + * linux/ia64/syscallent.h: Add perfmonctl, pivotroot, mincore, and + madvise syscalls. + * syscall.c (syscall_enter): With Kevin's latest ptrace patches, + AR_BSP points to the _end_ of the active register frame, so we need + to adjust bsp by moving it back by the size of the active frame + before using it. + +2000-04-24 Wichert Akkerman + + * process.c: add sparc support to change_syscall + +2000-04-22 Wichert Akkerman + + * linux/mips/syscallent.h: fix some typos + +2000-04-14 Wichert Akkerman + + * linux/mips/syscallent.h: added names for SVR4, SYSV, BSD4.3 and POSIX + syscalls + +2000-04-13 Wichert Akkerman + + * defs.h: Linux/MIPS uses syscalls up to >4k, so set MAX_QUALS to + 4999 + +2000-04-09 Wichert Akkerman + + * README-linux: updated to note that strace might not compile + with development kernels + * bjm.c: sys_query_module: check if malloc succeeds + * system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once + * linux/syscallent.h: updated for 2.3.99pre3 + * linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls + even though Linux doesn't implement them + * syscall.c: add global variables for MIPS registers as well + * syscall.c: move global variables to before get_scno since that uses them + * util.c: oops, misspelled defined + * process.c: fix ptrace calls in change_syscall + * mem.c: decode sys_madvise + * Merge patch from Topi Miettinen + + add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct + + small fix for RLIMIT_* and RUSAGE_BOTH + + enhace support for capget and capset + +2000-02-19 Wichert Akkerman + + * test/vfork.c: new file to test vfork traces + * test/.cvsignore: new file + * defs.h: Up maximum number of traced processed to 64 + * strace.c: Disable some debugging code from davidm + * implement setarg for more architectures + * implement change_syscall + +1999-12-27 Morten Welinder + + * syscall.c (lookup_signal, lookup_desc): isdigit requires an + _unsigned_ char parameter. + +2000-02-14 Wichert Akkerman + + * S390 updates + +2000-02-03 Wichert Akkerman + + * Merge Linux/ia64 patches + +2000-01-02 Pavel Machek + + * probe if sys/poll.h exists in configure + minor cleanups + + * syscall.c: split trace_syscall into few pieces to make code readable + +2000-01-21 Wichert Akkerman + + * Release version 4.2 to get the current updates out and so + we can concentrate in finishing the clone support. + +2000-01-11 Wichert Akkerman + + * Add 1900 to tm_year in sprinttime + +1999-12-24 Wichert Akkerman + + * file.c: protect printstat64 with STAT64 instead of linux so we can + compile on Linux architectures that don't have it + * util.c: fix LOOP for ARM + +Fri Dec 24 18:05:00 EST 1999 + +1999-12-23 Ulrich Drepper + + * file.c: Use ugly libc_stat trick also for stat64. + Implement sys_stat64, sys_fstat64, sys_lstat64, and printstat64. + * process.c (internal_clone): Fix a few typos and add definitions to make + it at least compile. + * linux/syscall.h: Declare sys_stat64, sys_lstat64, and sys_fstat64. + * linux/syscallent.h: Define table entries for sys_stat64, sys_lstat64, + and sys_fstat64. + * aclocal.m4: Define AC_STAT64. + * acconfig.h: Define HAVE_STAT64. + * configure.in: Add AC_STAT64. + +Thu Dec 23 15:01:37 CET 1999 Wichert Akkerman + + * Merge patch from ftp://oss.software.ibm.com/linux390/ to add + support for Linux on the IBM S/390 architecture + * process.c: add internal_clone(), currently only shows the options + * syscall.c: use internal_clone to handle SYS_clone + +Mon Dec 20 00:27:50 CET 1999 Wichert Akkerman + + * Rewrite mmap-handling to support mmap2 on Linux + +Tue Dec 14 11:35:16 CET 1999 Wichert Akkerman + + * Note that Linux can handle sys_semop() as well + +Tue Nov 30 11:05:26 CET 1999 Wichert Akkerman + + * Include linux/in6.h for glibc2.0 and older + +Mon Nov 29 16:33:04 CET 1999 Wichert Akkerman + + * Merge patches from John Hughes to make configure support UnixWare + +Sat Nov 27 21:38:17 CET 1999 Wichert Akkerman + + * Enhance sys_query_module + +Fri Nov 26 10:51:55 CET 1999 Wichert Akkerman + + * Patches from John Hughes: + + cosmectic fix in sys_getpmsg + + allow net.c to compile on systems without AF_INET6 + + Only use long_to_sigset on Linux systems + + UnixWare treats sigmask_t and sigmask_t* as the same thing + + Add pollhack + + Parse mount arguments for UnixWare + + ACL fixes for UnixWare + +Fri Nov 26 01:28:09 CET 1999 Wichert Akkerman + + * Release 4.1 to get all the changes made out there + +Thu Nov 18 18:04:04 CET 1999 Wichert Akkerman + + * Merge stracefork from Alexey Kuznetsov + + Socket calls parsed better + + bunch of alpha OSF syscalls added + + Fix alpha 32/64 bit issues + +Mon Nov 1 20:52:08 CET 1999 Wichert Akkerman + + * Move Linux kernelmodule-functions from system.c to bjm.c and + remove duplicate for sys_create_module + * Linux MIPS updates: + + Play with #ifdef's in net.c to get IPv6 right + + Use printargs for vm86-syscall + +Sun Oct 31 22:03:00 CET 1999 Wichert Akkerman + + * Merge Linux mips patch from Florian Lohoff + +Mon Oct 11 00:36:25 CEST 1999 Wichert Akkerman + + * Merge patch from Keith Owens to sys_query_module + and sys_delete_module correctly + +Wed Oct 6 02:00:33 CEST 1999 Wichert Akkerman + + * Update cvsbuild to give a better error if autoconf isn't installed + * Add test for linux/ptrace.h to configure + * Since we define GNU_SOURCE in the Makefile we don't need to define + USE_GNU in file.c anymore + +Fri Sep 10 04:35:16 CEST 1999 Wichert Akkerman + + * #define USE_GNU before including file.c so we get some extra O_* flags + +Tue Aug 31 16:27:21 CEST 1999 Wichert Akkerman + + * Add missing } in IPv6 output + +Tue Aug 31 01:23:08 CEST 1999 Wichert Akkerman + + * Update copyright for strace-graph to BSD to be consistent with + the rest of strace + +Mon Aug 30 00:53:57 CEST 1999 Wichert Akkerman + + * Merge patch from Daniel Jacobowitz: KERN_JAVA_* and KERN_SECURELVL aren't + defined for all kernelversions + * Add strace-graph, written by Richard Braakman + +Thu Aug 19 13:10:15 CEST 1999 Jakub Jelinek + + * linux/sparc/syscall.h: Declare create_module/init_module. + * configure.in: Allow compilation in a different directory + than the source one. + * signal.c: Use asm/reg.h and struct regs instead of pt_regs + so that we don't depend on asm/ptrace.h which clashes with + glibc sys/ptrace.h. + * util.c: Likewise. + * syscall.c: Likewise. + +Wed Aug 4 18:01:50 CEST 1999 Wichert Akkerman + + * Syscall 94 on Linux alpha is sys_poll + +Sun Jul 25 14:38:33 CEST 1999 Wichert Akkerman + + * Merge in UnixWare patches from John Hughes + +Thu Jul 15 23:00:32 CEST 1999 Wichert Akkerman + + * Merge patch from Maciej W. Rozycki : + + Correctly implement fix sys_createmodule (Linux) + + Add limited handlig of sys_initmodule (Linux) + +Tue Jul 13 17:07:50 CEST 1999 Wichert Akkerman + + * Add configure-test for sys/reg.h and use that + * Use sys/reg.h instead of asm/ptrace.h + +Sat Jul 10 01:46:10 CEST 1999 Wichert Akkerman + + * Remove hack in signal.c for arm architecture + * Add hack so we compile correctly on powerpc + +Fri Jul 9 02:28:16 CEST 1999 Wichert Akkerman + + * Add a corrected patch from Daniel Jacobowitz + +Thu Jul 8 16:00:04 CEST 1999 Wichert Akkerman + + * Merge patch from Daniel Jacobowitz to allow us to use the kernel types + for the stat structure + +Thu Jun 24 15:54:18 CEST 1999 Wichert Akkerman + + * Fix test for sys/reg include + +Tue Jun 22 17:26:33 CEST 1999 Wichert Akkerman + + * Fixed some Linux/powerpc sillyness, thanks to Daniel Jacobowitz + * Fixed some SunOS compile problems earlier that I forgot to include + here + +Mon Jun 14 12:44:25 CEST 1999 + + * Avoid leakint fd into child when forking, patch from + John Hughes + +Fri Jun 11 14:54:47 CEST 1999 + + * Applied IRIX64 patch from Thomas E. Dickey + * Applied Solaris and manpage updates from Guy Harris + +Wed Jun 9 14:48:49 CEST 1999 Wichert Akkerman + + * Brought syscall list for alpha up to date + +Wed Jun 2 18:30:12 CEST 1999 Jakub Jelinek + + * system.c: sys_umount2 syscall support. + * linux/sparc/errnoent.h: Update sparc-linux errnos. + * linux/sparc/syscall.h: Update used sparc-linux syscalls. + * linux/sparc/syscallent.h: Match 2.2.9 system calls. + * file.c: sparc-linux asm/stat.h uses dev_t etc. types, + so it needs strace's own copy of the stat structure. + * util.c: Make it compile on sparc-linux. + * strace.c: Fix strace -f and -ff operation on sparc-linux. + * signal.c: rt_sigaction has different arguments on sparc*-linux + and alpha-linux. + * syscall.c: Recognize sparc64-linux binaries. + +Fri May 28 21:09:00 PST Ulrich Drepper + + * configure.in: Fix typo (CFLAG -> CFLAGS). + + * syscall.c: Don't include linux/ptrace.h explicitly for glibc. + +Thu May 27 13:59:27 CEST 1999 Wichert Akkerman + + * Add some sysctl support, patch from Ulrich Drepper + +Wed May 26 01:04:34 CEST 1999 Wichert Akkerman + + * Use kernel dirent structure for Linux + +Sun May 9 02:18:30 CEST 1999 Wichert Akkerman + + * Merge in patches from Andreas Schwab + + some layout and other minor fixes + + add some m68k-specific things to linux/syscallent.h. Note that m68k + is similar enough to i386 to not need it's own subdirectory + + add support for sendfile and mremap syscalls for Linux + * Merge in patches from Sascha Schumann + + ioctls.h vs sys/ioctl.h on Alpha platform + + pointer was casted to an int in stream.c + + strsignal() needs -D_GNU_SOURCE in CFLAGS + + several other casts changed + + correct ARM/POWERPC architecture defines in acconfig.h + * Merge in patches from Morten Welinder + + add some autoconf-tests for includefiles + + handle solaris version of sigcontext struct (actually I hacked this + up again, but the idea is his :) + +Sun Apr 18 22:32:42 CEST 1999 Wichert Akkerman + + * Update syscalls for linux alpha, patch from Bart Warmerdam + + * Update sparc code so it actually compiles + +Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman + + * Add support for old_*stat functions for Linux. Please note you need + to use reasonably recent kernel headers to compile strace now. + * Change references to LINUX into linux in file.c + * Fix include for LDT in mem.c + +Thu Apr 15 22:28:15 CEST 1999 Wichert Akkerman + + * Change in strace maintainership, jrs passed the torch to me. + * Use autoconf 2.13 + * Incorporate all changes already made in the Debian strace package: + + compiles with more Linux kernels + + added support for more Linux architectures + + add support for a lot of extra syscalls + + fix some problems with hanging children + + check stray syscall after execv + + decode capget and capset arguments + + add more constants to net.c + + detect ROSE networking + + add more protocol families to domains + + add IPIP protocol + + 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 + + updated handling of signals + +Sun Oct 27 22:28:00 1996 J. Richard Sladkey + + * util.c (umovestr) [LINUX]: Handle Linux like SunOS4 + instead of SVR4. That is, read a few bytes at a time + to avoid overrunning the end of the stack. + +Fri May 31 01:48:49 1996 J. Richard Sladkey + + * version.c: Version 3.1 is released. + +Thu May 23 01:04:43 1996 J. Richard Sladkey + + * aclocal.m4 (AC_DECL_SYS_ERRLIST): Try looking in stdio.h + as well since that's where glibc declares it. Go figure. + * signal.c (sys_sigreturn) [ALPHA]: Use sigcontext + instead of sigcontext_struct since glibc v5+ apparently + plays games with the native OS namespace. + From David Mosberger-Tang . + +Mon May 20 23:17:14 1996 J. Richard Sladkey + + * version.c: Version 3.0.14 is released. + + * aclocal.m4 (AC_STRUCT_MSG_CONTROL): New macro. + * configure.in: Add call to AC_STRUCT_MSG_CONTROL. + * net.c (printmsghdr): Handle BSD 4.3 and 4.4 msghdr members + differently. + Reported by Henrik Storner . + + * configure.in: (AC_CHECK_{HEADERS,FUNCS}): Add checks for + sys/filio.h and sys/stream.h and remove check for poll. + * desc.c (decode_select, sys_select, sys_oldselect) [LINUX]: + Handle old and new styles of argument passing for select on Linux. + * ioctl.c, stream.c: Conditionalize stream code on presence of + sys/stream.h instead of poll because glibc implements poll but + not the rest of the stream interface. + * signal.c [LINUX]: Standardize on the name sigcontext_struct. + (sys_sigprocmask) [ALPHA]: Handle OSF flavor which is more like + sigsetmask. + * term.c (term_ioctl): Use _VMIN, if present, for TC{G,S}ETA*. + * util.c (umoven, umovestr): Move data in long-sized chunks + at a time, instead of hard coding it to be 4. + From David Mosberger-Tang . + +Mon May 20 01:19:36 1996 J. Richard Sladkey + + * version.c: Version 3.0.13 is released. + + * configure.in (AC_CHECK_HEADERS): Add check for asm/sigcontext.h. + * signal.c [HAVE_ASM_SIGCONTEXT_H]: Conditionally include + asm/sigcontext.h to define sigcontext_struct and don't define it + locally if the header is present. + + * syscall.c (nerrnos{0,2}): Correct size computation. + + * Makefile.in: Remove dependencies and rules relating to files + normally found in the os directory. Because of the new scheme we + don't know precisely where they come from. Sigh. + * signalent.sh: Make it work for sunos4, linux, and svr4. + * {sunos4,linux{,/alpha},svr4}/Makefile.in: Make rules correspond + to traditional make syntax. Add signalent.h to files which can + unconditionally be rebuilt. Prevent signalent.h from being + unconditionally being rebuilt since it's customized. + * {sunos4,linux{,/alpha},svr4}/{ioctlent,errnoent,signalent}.h: + Use versions built by {ioctlent,errnoent,signaltent}.sh. + * sunos4/ioctlent.sh: Work around sprintf troubles with SunOS + 4.1.4 and gcc 2.7.2. + +Sun May 19 17:14:09 1996 J. Richard Sladkey + + * configure.in, Makefile.in: Add OSARCH concept to finish + build support for the alpha. + * Makefile.in, linux/Makefile.in: Rewrite clean, distclean, + and maintainer-clean rules. + * defs.h, ioctlsort.c: Make ioctl code member unsigned. + * ioctl.c, ioctlsort.c (compare): Perform explicit checking + for less, greater, and equal since subtraction on two's + complement numbers isn't an order relation (it isn't transitive)! + * linux/Makefile.in: Add rules for the signalent.h file. + * linux/alpha/Makefile.in: New file. + +Sun May 19 01:12:28 1996 J. Richard Sladkey + + * version.c: Version 3.0.12 is released. + + * linux{,alpha}/ioctlent.sh: Tweak for recent kernels. + From Michael E Chastain . + + * defs.h (SUPPORTED_PERSONALITES, DEFAULT_PERSONALITY): New. + * syscall.c (set_personality): New. + * strace.c (main): Call set_personality. + * defs.h, syscall.c, ioctl.c, signal.c: Make sysent, errnoent, + ioctlent, and signalent indirect pointers and redirect them + based on personality. + * {sunos4,svr4,linux{,/alpha}}/signalent.h: New files. + Suggested by Tom Dyas . + + * util.c (upeek): Handle case where ptrace returns a long + and sizeof(long) != sizeof(int). + From Richard Henderson + +Fri May 17 21:03:36 1996 J. Richard Sladkey + + * version.c: Version 3.0.11 is released. + + * many files: Fix more printf warnings for other platforms. + + * ipc.c (sys_msgrcv) [LINUX]: Conditionalize definition of ipc_wrapper. + + * linux/dummy.h: Handle missing library support for {send,recv}msg. + Reported by Thomas Bogendoerfer . + + * linux/syscall.h (sys_utimes): Fix a typo in the declaration. + From Thomas Bogendoerfer . + +Fri May 17 00:50:06 1996 J. Richard Sladkey + + * version.c: Version 3.0.10 is released. + + * Makfile.in: Add os/arch to includes so that a given arch + (like alpha) can override the native arch (like i386). + * configure.in: Check for sendmsg. + + * net.c: Make sendmsg and recvmsg dependent on an autoconf + test. Reported by Michael E Chastain . + + * acconfig.h, configure.in: Detect the alpha. + * ioctl.c: Handle the alpha. + * defs.h: Make some members long for the alpha. Define + some register nicknames. Add support for WAITEXECVE. + * file.c [ALPHA]: Support the alpha for statfs. Add + osf_statfs and osf_fstatfs for the alpha. Make damn sure + major and minor results are suitable for passing to printf. + * signal.c, syscall.c: Support the alpha. + * process.c: Add alpha user offsets. + * most files: Use %l? for printf arguments since + most are now longs for the alpha. + * linux/alpha/{errnoent.h,ioctlent.{h,sh},syscallent.h}: + New for the alpha. + From Thomas Bogendoerfer . + +Wed May 15 00:29:37 1996 J. Richard Sladkey + + * version.c: Version 3.0.9 is released. + + * config.in, config.sub, install-sh: Upgrade to autoconf 2.10. + + * linux/dummy.h, linux/syscallent.h, linux/syscall.h: Add recent + Linux kernel version system calls. + +Wed Mar 13 01:03:38 1996 J. Richard Sladkey + + * ipc.c [SUNOS4]: Add SunOS support for decoding IPC calls. + * syscall.c [SUNOS4]: Compile decode_subcall on SunOS and + decode IPC calls using it. + * sunos4/dummy.h: Alias sys_semop to printargs. + * sunos4/syscall.h: Add new pseudo syscalls for IPC. + * sunos4/syscallent.h: Include new subcalls for IPC. + From Matthias Pfaller . + +Tue Feb 13 22:08:25 1996 J. Richard Sladkey + + * version.c: Version 3.0.8 is released. + + * time.c [LINUX]: Explicitly include linux/version.h. + + * strace.c (main): Don't let them even *try* to + get strace to attach to itself since some systems + don't handle this case very gracefully. + Reported by David S. Miller . + + * Makefile.in (distclean): Fix it for subdirectories. + + * sunos4/syscallent.h, svr4/syscallent.h: Fill in the new + sys_flags member for each defined system call. + +Fri Dec 8 01:17:28 1995 Rick Sladkey + + * defs.h (TRACE_*): New flags to describe what class + of system call each system call is. + (sysent): Add sys_flags member. + * syscall.c (sysent): Define (and later undef) abbreviations + for the system call class flags. + (lookup_class): New function to translate strings to + system call class flags. + (qualify): Handle new system call class mechanism. + * linux/syscallent.h: Fill in the new sys_flags member + for each defined system call. + + * defs.h (print_sock): Remove redundant and non-K&R C + compatible prototype. From Juergen Weigert + . + +Thu Dec 7 01:17:40 1995 Rick Sladkey + + * linux/ioctlent.sh: Tweak to improve ioctl accuracy. + From Michael E Chastain . + + * system.c (includes) [LINUX]: Add linux/nfs.h for recent + kernels. From Michael E Chastain . + +Wed Dec 6 21:52:28 1995 Rick Sladkey + + * file.c (sprintfstype): Enclose string result in double + quotes. + + * time.c (sys_adjtimex) [LINUX]: Conditionalize + constantly evolving timex structure. + From Aaron Ucko . + + * defs.h, syscall.c, strace.c: Rename syscall to + trace_syscall and change prototype and all callers + because of broken Linux shared libraries. + From Aaron Ucko . + + * Makefile.in (clean): Check for a file with test -f not + test -d. From Aaron Ucko . + +Tue Sep 26 02:32:31 1995 Rick Sladkey + + * version.c: Version 3.0.7 is released. + + * util.c (string_quote): Fix thinko which caused core + dumps for strings with quotes in them. + Reported by Marty Leisner . + + * linux/Makefile.in (errnoent.h rule): Grab all errno.h + files from /usr/include, not just the linux one. + From Michael E Chastain . + + * linux/errnoent.sh: Total rewrite to handle more ioctls with + fewer false positives on more kernel flavors. + From Michael E Chastain . + +Mon Sep 4 01:29:22 1995 Rick Sladkey + + * version.c: Version 3.0.6 is released. + + * linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add + sys_msync. + * mem.c (mctl_funcs, mctl_lockas, sys_mctl): Conditionalize + on MC_SYNC instead of HAVE_MCTL. + (mctl_sync): Conditionalize on MS_ASYNC instead of HAVE_MCTL. + (sys_msync): New function. + +Sat Sep 2 12:06:04 1995 Rick Sladkey + + * linux/dummy.h, linux/syscall.h, linux/syscallent.h: Add + sys_flock and sys_getdents. + * desc.c (flockcmds, sys_flock): Conditionalize on LOCK_SH + not SUNOS4. + * file.c (sys_getdents): Define unconditionally and handle + LINUX case. + * strace.c (main): Disallow username option unless both real + and effective uids are root. + +Wed Aug 30 01:29:58 1995 Rick Sladkey + + * strace.c (main): Ensure that run_uid and run_gid are + always set to something meaningful. + (main, newoutf) [!SVR4]: Swap real and effective uids while + opening any output files. + (main) [!SVR4]: Treat effective uid of root as a request + to handle suid binaries correctly using the real uid of + the invoking user. + +Sat Aug 19 00:06:08 1995 Rick Sladkey + + * Makefile.in: Add `|| true' to clean rule because + although GNU make 3.74 uses `sh -c' to invoke commands + every other make in the world uses `sh -ec'. + + * syscall.c (syscall) [SVR4, MIPS]: The fifth and subsequent + arguments appear to be stored on the stack, not in the + registers following A3 (empirical result). + + * defs.h: Add prototype for printsock. + * svr4/dummy.h: Remove generic handling of sys_mount. + * system.c [SVR4, MIPS]: Include several system headers to cleanly + get access to SGI mount information. + (mount_flags, nfs_flags) [SVR4, MIPS]: New objects. + (sys_mount) [SVR4, MIPS]: New function. + (sys_mount) [SVR4, !MIPS]: New function. + +Tue Jul 4 00:30:34 1995 Rick Sladkey + + * version.c: Version 3.0.5 is released. + + * desc.c, resource.c, strace.c, syscall.c, time.c: Cast tv_sec and + tv_usec members to long when using printf. + + * ipc.c: Omit define of __KERNEL__. + ({MSG,SEM,SHM}_{STAT,INFO}): Explicitly define those things we + want which __KERNEL__ used to provide. + (sys_msgrcv): Change reference to ipc_kludge structure to + look-alike ipc_wrapper to avoid dependence on __KERNEL__. + + mem.c (mmap_flags) [MAP_{GROWSDOWN,DENYWRITE,EXECUTABLE}]: Add + Linux specific options. + + syscall.c: Use SYS_ERRLIST_DECLARED instead of guessing. + [E{RESTART{SYS,NO{INTR,HAND}},NOIOCTLCMD}]: Explicitly define + instead of depending of __KERNEL__. + + term.c: Cast c_{i,o,c,l}flag to long when using printf. + +Tue Jun 6 00:27:48 1995 Rick Sladkey + + * aclocal.m4 (AC_DECL_SYS_ERRLIST, AC_DECL__SYS_SIGLIST): New. + * configure.in: Call AC_DECL_SYS_ERRLIST, AC_DECL_SYS_SIGLIST, + and AC_DECL__SYS_SIGLIST. + * acconfig.h (SYS_ERRLIST_DECLARED): New. + * strace.c (strerror): Use SYS_ERRLIST_DECLARED. + (strsignal): Use SYS_SIGLIST_DECLARED. + + net.c (sys_socket): Omit inadvertent surplus comma when + protocol family isn't PF_INET. + + util.c (dumpstr): Fix incorrect printing of one too many + characters when the length is not an even multiple of 16 bytes. + Reported by Juergen Weigert + . + +Thu May 4 23:37:47 1995 Rick Sladkey + + * ioctl.c (compare): Change prototype to match POSIX qsort. + * signal.c (sigishandled) [SVR4]: Omit everything after return. + * strace.c (trace) [SVR4]: Break out of for loop instead of + returning when finished so final return statement is executed. + * syscall.c (internal_syscall): Add more SYS_wait* variations. + (syscall) [LINUX]: Correct typo which commented out the M68K + argument to ifdef. + * util.c (printstr): Cast unsigned char pointer argument + to char pointer in umovestr call. + (dumpstr): Likewise for umoven. + +Wed May 3 01:10:56 1995 Rick Sladkey + + * version.c: Version 3.0.4 is released. + + * signal.c (sys_sigblock): Move after the definition of + sys_sigsetmask that it calls to avoid an implicit declaration. + * stream.c (transport_user_options, transport_server_options): + Only needed if TI_BIND is defined. + * configure.in: Add -Wno-implicit to WARNFLAGS on SunOS 4.x. + + * process.c (internal_fork) [SVR4]: Fix a typo that omitted + the tcp arguement from the call to exiting. Add getrval2 + check so no fork processing is done in the child. + (printwaitn): Initialize exited so that its value is defined + for all flows of execution. + +Tue May 2 22:39:42 1995 Rick Sladkey + + * linux/dummy.h: Add aliases for sysfs, personality, afs_syscall, + setfsuid, setfsgid, and _llseek syscalls. + * linux/syscall.h: Add prototypes for them. + * linux/syscallent.h: Add them to the syscall entries table. + * system.c (headers) [LINUX]: Include linux/unistd.h to get __NR_* + defines and conditionally include linux/personality.h if + __NR_personality is defined. + (personality_options) [LINUX]: New table. + (sys_personality) [LINUX]: New function. + +Tue May 2 00:20:39 1995 Rick Sladkey + + * strace.c (trace) [!SVR4]: Change forever loop to one predicated + on the number of traced processes so that we can have untraced + children (e.g. via popen). + + * strace (main) [!SVR4]: Call fake_execve to get the actual + exec and its arguments into the trace. + (environ): Declare it. + * process.c (fake_execve): New function. + (headers): Include sys/syscall.h to get SYS_* defines. + + * process.c (sys_execv, sys_execve): Surround argument annotations + with C comment delimiters. + (printargv, printargc): The arg vector is an array of char pointers + not ints. + + * strace.c (printleader): Also check for multiple -p arguments + when deciding whether to print the pid field. + + * strace.c (strerror) [!HAVE_STRERROR]: New function. + * defs.h (strerror, strsignal): Add these prototypes if we provide + the functions. + * configure.in (AC_CHECK_FUNCS): Add strerror. + + * strace.c (main, proc_poller): Add SIGPIPE to the list of caught + and blocked signals. + + * strace.c (main): Add username option. Verify they are root before + letting them use it. Look up the ids in the password file. Set + them just before executing the program. + From Reuben Sumner . + +Sat Apr 29 00:09:56 1995 Rick Sladkey + + * version.c: Version 3.0.3 is released. + + * system.c (mount_flags) [LINUX]: Omit duplicated MS_NOSUID entry. + From Reuben Sumner . + + * strace.c (outfname): Initialize to NULL. + (main): Defer output file processing until after arguments. + Allow either a pipe or a bang for command arguments. + Check if outfname is NULL instead of checking outf for stderr. + Reinitialize each startup TCB's outf to fix -p/-o ordering bug. + (droptcb): Reset close TCB's outf to NULL instead of stderr. + (tprintf): Avoid calling vfprintf if outf is NULL. + + * strace.c (main): Use popen if -o argument begins with a pipe. + From Marty Leisner . + + * process.c (printstatus): Fix a typo where WIFSIGNALED was meant + but WIFSTOPPED was used. + + * Makefile.in: Add an EXTRA_DEFS variable and use it in the .c.o + rule to prevent the comment from being untrue. + +Fri Apr 28 22:01:56 1995 Rick Sladkey + + * strace.c (sys_exit): Move follow fork code to internal_exit. + (sys_fork): Move follow fork code to internal_fork. + (sys_execv, sys_execve): Move follow fork code to internal_exec. + (sys_waitpid, sys_wait4): Move follow fork code to internal_wait. + (vforking): Remove this static variable and check scno in + internal_fork instead. + (internal_exit, internal_fork, internal_exec, internal_wait): New + functions. + * defs.h: Add prototypes for the new internal_* functions. + * syscall.c (syscall): Move syscall entering trace qualifier check + and reprint checking after context decoding and precede them with + a call to internal_syscall. Precede syscall exiting trace + qualifier check with a call to internal_syscall. + (internal_syscall): New function. + + * defs.h (struct tcb): Make scno signed. + * strace.c (syscall) Make u_error signed. + [LINUX, I386]: Avoid unsigned cast in eax check. + * syscall.c (sys_indir): Make i, scno, and nargs signed. + * desc.c (sys_select): Make cumlen unsigned + +Mon Apr 24 23:52:47 1995 Rick Sladkey + + * net.c (socktypes): Add SOCK_PACKET. + +Sun Apr 2 23:50:39 1995 Rick Sladkey + + * Makefile (clean): Check explicitly for a Makefile in subdirs + before running make in them. + +Sun Mar 26 12:37:21 1995 Rick Sladkey + + * strace.c [MIPS] (proc_open): Conditionalize run on MIPS. + [MIPS] (detach): Initialize error for MIPS case. + (trace): Initialize ioctl_result and ioctl_errno for overly helpful + compilers. + * syscall.c (decode_subcall): Move variable i into conditionals + that use use it. + * system.c (syssgi_options): Conditionalize SGI_RECVLMSG and + SGI_SET_FPDEBUG that SGI decided to drop. I don't have the stomach + to change them all. + * term.c (term_ioctl): Force [c_[iocl]flags members to long before + printing since we don't know what the size of their type is. + * util.c [SVR4, MIPS] (umoven): Prevent MIPS from using pread even + if autoconf detects it since it seems to either not work or do + something else entirely on Irix 5.3. + +Sun Mar 26 00:01:11 1995 Rick Sladkey + + * version.c: Version 3.0.2 is released. + * linux/dummy.h: Make sys_fchdir like sys_close instead of printargs + so that the file descriptor arg is decimal. + +Sat Mar 25 22:50:13 1995 Rick Sladkey + + * net.c [LINUX] (protocols): Explicitly define all IPPROTO_* entries + because on Linux they are enumerators. + + * system.c [LINUX] (mount_flags): Handle renaming of MS_SYNC to + MS_SYNCHRONOUS. + + * util.c (printxval): When there is no translation, print the actual + number first and the the default value as a C comment. + + * net.c (sys_send, sys_sendto, sys_sendmsg, sys_getsockopt, + sys_setsockopt): Change first argument from unsigned to signed to + cater to the frequent practice of calling system calls with a file + descriptor of -1. + * mem.c (sys_mmap): Likewise. + +Sun Mar 19 13:53:52 1995 Rick Sladkey + + * signal.c [LINUX] (signalent): Handle old and new values of SIGIO. + +Sun Dec 11 22:51:51 1994 Rick Sladkey + + * version.c: Version 3.0.1 is released. + * Makefile.in, configure.in, aclocal.m4: Changes for autoconf 2.0. + * config.guess, config.guess: Update from the FSF. + * install-sh: New from the FSF. + +Mon Dec 5 20:51:29 1994 Rick Sladkey + + * Makefile.in: Add m68k arch. + * acconfig.h (M68K): Add m68k define. + * configure.in: Add detection of arch m68k. + * process.c [M68K] (struct_user_offsets): Support m68k registers and + offsets. + * signal.c [M68K] (sigcontext_struct): Support m68k sigcontext + structure. + [M68K] (sys_sigreturn): Support m68k sigreturn handling. + * syscall.c [M68K] (syscall): Support m68k syscall number register + and errno in d0 instead of eax. + * util.c [M68K] (getpc, printcall, setbpt, clearbpt): Support m68k + program counter in PT_PC instead of EIP. + [M68K] (LOOP): Support m68k loop instruction. + From Andreas Schwab . + + * mem.c [MAP_ANONYMOUS] (mmap_flags): Correct inadvertent reference + to MAP_FIXED instead of MAP_ANONYMOUS. + From Andreas Schwab . + + * signal.c [LINUX] (signalent): Signal 30 is now SIGPWR. + From Andreas Schwab . + +Mon Dec 5 01:05:46 1994 Rick Sladkey + + * defs.h (tprintf): Fix typo in non-gcc ansi prototype for tprintf. + Reported by Thanh Ma . + + * strace.c (cleanup): Send SIGCONT before SIGTERM because Linux + 1.1.62 doesn't continue a traced child when the parent exits. + Reported by Matt Day . + + * system.c [LINUX]: Include netinet/in.h before arpa/inet.h. + + * util.c (printstr): Fix longstanding bug in notating string + continuation. + + * strace.c [SVR4] (proc_open): Specifically wait for the child the + child to go into the execve syscall to avoid spurious traces. + [LINUX] (detach): Conditionalize the status variable. + +Sun Dec 4 23:21:42 1994 Rick Sladkey + + * Makefile.in: Add mips arch. + * acconfig.h (MIPS): Add mips define. + * configure.in: Add detection of opsys irix5 and arch mips. Check + for prctl function. + Check for sys/sysconfig.h header. + * defs.h (MAX_ARGS): Bump maximum syscall arguments from 8 to 32. + * file.c [SVR4]: Include sys/cred.h. + (access_flags): Update access flags for SGI. + (sprinttime): Change type of sprinttime argument from unsigned + long to time_t. + * process.c [HAVE_PRCTL]: Include sys/prctl.h. + [HAVE_PRCTL] (prctl_options, sys_prctl): New for SGI. + (printsiginfo): Conditionally compile SI_TIMER and SI_MESGQ. + Cast si_band member to long before printing. + * signal.c (sigact_flags): Add _SA_BSDCALL for SGI. + (sigprocmaskcmds): Add SIG_SETMASK32 for SGI. + * strace.c [SVR4] [MIPS]: + (foobar): New dummy signal handler. + (main): Install a dummy signal handler in the child before pausing + to work around an SGI bug in PRSABORT. + (proc_open): Send a interrupt to the child instead of aborting the + syscall which doesn't work on Irix5.2. + * svr4/dummy.h: Add new unfinished SGI syscalls + (e.g. sys_sysmp, sys_sginap, etc.). Handle some SGI syscalls like + existing calls (e.g. sys_ksigaction like sys_sigaction). + Printargs does the print thing for sys_sethostid. + * svr4/syscall.h: Declare all new SGI syscalls. + (SGI_KLUDGE): Define syscall table starting index to be 1 for SGI + and add it to all subcall entry points. + (SYS_pgrpsys_subcall, SYS_sigcall_subcall, SYS_context): Don't + decode as subcalls on MIPS. Instead, use the normal syscalls. + * svr4/syscallent.h [MIPS]: Lead syscall table with a dummy entry + since SGI syscall numbers are off by one. + [MIPS] (sys_pgrpsys): Rename to sys_setpgrp on SGI. + [MIPS] (sys_xenix): Rename to sys_syssgi on SGI. + [MIPS] (sys_sysmachine): Rename to sys_sysmips on SGI. + [MIPS]: Conditionalize SVR4 extension into SGI and Solaris classes. + * syscall.c (dumpio): Validate descriptor against MAX_QUALS. + [HAVE_PR_SYSCALL] (syscall): Conditionalize SYS_vfork. + [MIPS] (syscall): Add SGI section for decoding u_error and u_rval. + Add workaround for broken SGI pr_sysarg on syscall entry. + [SVR4] (syscall): Conditionalize subcall decoding for + SYS_ptrpsys_subcall, SYS_sigcall_subcall and SYS_context_subcall. + [SVR4] [MIPS] (getrval2): Handle SGI. + * syscallent.sh: Dork the sed line to be choosier about SYS_ lines. + * system.c [HAVE_SYSCONFIG_H]: Include sys/sysconfig.h. + [MIPS] (syssgi_options, sys_syssgi): New for SGI. diff --git a/alice-strace/INSTALL b/alice-strace/INSTALL new file mode 100644 index 0000000..8d4e27c --- /dev/null +++ b/alice-strace/INSTALL @@ -0,0 +1,305 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, +Inc. + +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 +warranty of any kind. + +Basic Installation +================== + +Prerequisite: The libunwind libraries. In Ubuntu 14.04, for example, +these can be installed with `apt-get install libunwind8-dev'. + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + +If the package supports it, you can cause programs to be installed with +an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/alice-strace/Makefile.in b/alice-strace/Makefile.in new file mode 100644 index 0000000..a9fcbdc --- /dev/null +++ b/alice-strace/Makefile.in @@ -0,0 +1,1272 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 alice-strace. + + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +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 = alice-strace$(EXEEXT) +@MAINTAINER_MODE_TRUE@am__append_1 = $(ioctlent_h_in) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ + INSTALL NEWS config.guess config.sub depcomp install-sh \ + missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/includedir.m4 \ + $(top_srcdir)/m4/long_long.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/statfs.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 = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am_alice-strace_OBJECTS = bjm.$(OBJEXT) block.$(OBJEXT) count.$(OBJEXT) \ + desc.$(OBJEXT) file.$(OBJEXT) io.$(OBJEXT) ioctl.$(OBJEXT) \ + ipc.$(OBJEXT) loop.$(OBJEXT) mem.$(OBJEXT) mtd.$(OBJEXT) \ + net.$(OBJEXT) pathtrace.$(OBJEXT) process.$(OBJEXT) \ + quota.$(OBJEXT) resource.$(OBJEXT) scsi.$(OBJEXT) \ + signal.$(OBJEXT) sock.$(OBJEXT) alice-strace.$(OBJEXT) \ + stream.$(OBJEXT) syscall.$(OBJEXT) system.$(OBJEXT) \ + term.$(OBJEXT) time.$(OBJEXT) util.$(OBJEXT) \ + vsprintf.$(OBJEXT) +alice-strace_OBJECTS = $(am_alice-strace_OBJECTS) +alice-strace_LDADD = $(LDADD) +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) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +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_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +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_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(alice-strace_SOURCES) +DIST_SOURCES = $(alice-strace_SOURCES) +RECURSIVE_TARGETS = all-recursive check-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 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) +HEADERS = $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +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__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" +GZIP_ENV = --best +DIST_ARCHIVES = $(distdir).tar.xz +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@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +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@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +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@ +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@ +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@ +SUBDIRS = tests +man_MANS = alice-strace.1 +bin_SCRIPTS = alice-strace-graph alice-strace-log-merge alice-strace-retrieve-symbols +OS = linux +# ARCH is `i386', `m68k', `sparc', etc. +ARCH = @arch@ +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(OS) +alice-strace_SOURCES = \ + bjm.c \ + block.c \ + count.c \ + desc.c \ + file.c \ + io.c \ + ioctl.c \ + ipc.c \ + loop.c \ + mem.c \ + mtd.c \ + net.c \ + pathtrace.c \ + process.c \ + quota.c \ + resource.c \ + scsi.c \ + signal.c \ + sock.c \ + alice-strace.c \ + stream.c \ + syscall.c \ + system.c \ + term.c \ + time.c \ + util.c \ + vsprintf.c + +noinst_HEADERS = defs.h +# Enable this to get link map generated +#alice-strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=alice-strace.mapfile +EXTRA_DIST = \ + $(man_MANS) \ + .version \ + COPYING \ + CREDITS \ + ChangeLog \ + ChangeLog-CVS \ + README-linux \ + README-linux-ptrace \ + debian/changelog \ + debian/compat \ + debian/control \ + debian/copyright \ + debian/rules \ + debian/source/format \ + debian/alice-strace-udeb.install \ + debian/alice-strace.docs \ + debian/alice-strace.examples \ + debian/alice-strace.install \ + debian/alice-strace.manpages \ + debian/alice-strace64.install \ + debian/alice-strace64.manpages \ + debian/watch \ + errnoent.sh \ + ioctlsort.c \ + 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/alpha/errnoent.h \ + linux/alpha/ioctlent.h.in \ + linux/alpha/signalent.h \ + linux/alpha/syscallent.h \ + linux/arm/ioctlent.h.in \ + linux/arm/syscallent.h \ + linux/avr32/ioctlent.h.in \ + linux/avr32/syscallent.h \ + linux/bfin/ioctlent.h.in \ + linux/bfin/syscallent.h \ + linux/dummy.h \ + linux/errnoent.h \ + linux/hppa/errnoent.h \ + linux/hppa/ioctlent.h.in \ + linux/hppa/signalent.h \ + linux/hppa/syscallent.h \ + linux/i386/ioctlent.h.in \ + linux/i386/syscallent.h \ + linux/ia64/ioctlent.h.in \ + linux/ia64/signalent.h \ + linux/ia64/syscallent.h \ + linux/ioctlent-filter.awk \ + linux/ioctlent.h.in \ + linux/ioctlent.sh \ + linux/ioctlsort.c \ + linux/m68k/ioctlent.h.in \ + linux/m68k/syscallent.h \ + linux/metag/ioctlent.h.in \ + linux/metag/syscallent.h \ + linux/microblaze/ioctlent.h.in \ + linux/microblaze/syscallent.h \ + linux/mips/errnoent.h \ + linux/mips/ioctlent.h.in \ + linux/mips/ioctlent.sh \ + 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/mtd-abi.h \ + linux/or1k/ioctlent.h.in \ + linux/or1k/syscallent.h \ + linux/powerpc/errnoent1.h \ + linux/powerpc/ioctlent.h.in \ + linux/powerpc/ioctlent1.h \ + linux/powerpc/signalent1.h \ + linux/powerpc/syscallent.h \ + linux/powerpc/syscallent1.h \ + linux/s390/ioctlent.h.in \ + linux/s390/syscallent.h \ + linux/s390x/ioctlent.h.in \ + linux/s390x/syscallent.h \ + linux/sh/ioctlent.h.in \ + linux/sh/syscallent.h \ + linux/sh64/ioctlent.h.in \ + linux/sh64/syscallent.h \ + linux/signalent.h \ + linux/sparc/dummy2.h \ + linux/sparc/errnoent.h \ + linux/sparc/errnoent1.h \ + linux/sparc/gen.pl \ + linux/sparc/ioctlent.h.in \ + linux/sparc/ioctlent1.h \ + linux/sparc/signalent.h \ + linux/sparc/signalent1.h \ + linux/sparc/syscall1.h \ + linux/sparc/syscallent.h \ + linux/sparc/syscallent1.h \ + linux/sparc64/dummy2.h \ + linux/sparc64/errnoent.h \ + linux/sparc64/errnoent1.h \ + linux/sparc64/errnoent2.h \ + linux/sparc64/ioctlent.h.in \ + linux/sparc64/ioctlent1.h \ + linux/sparc64/ioctlent2.h \ + linux/sparc64/signalent.h \ + linux/sparc64/signalent1.h \ + linux/sparc64/signalent2.h \ + linux/sparc64/syscall1.h \ + linux/sparc64/syscallent.h \ + linux/sparc64/syscallent1.h \ + linux/sparc64/syscallent2.h \ + linux/subcall.h \ + linux/syscall.h \ + linux/tile/errnoent1.h \ + linux/tile/ioctlent.h.in \ + linux/tile/ioctlent1.h \ + linux/tile/signalent1.h \ + linux/tile/syscallent.h \ + linux/tile/syscallent1.h \ + linux/ubi-user.h \ + linux/x32/errnoent.h \ + linux/x32/errnoent1.h \ + linux/x32/ioctlent.h.in \ + linux/x32/ioctlent1.h \ + linux/x32/signalent.h \ + linux/x32/signalent1.h \ + linux/x32/syscallent.h \ + linux/x32/syscallent1.h \ + linux/x86_64/errnoent1.h \ + linux/x86_64/errnoent2.h \ + linux/x86_64/gentab.pl \ + linux/x86_64/ioctlent.h.in \ + linux/x86_64/ioctlent1.h \ + linux/x86_64/ioctlent2.h \ + 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/xtensa/ioctlent.h.in \ + linux/xtensa/syscallent.h \ + signalent.sh \ + alice-strace-graph \ + alice-strace-log-merge \ + alice-strace.spec \ + syscallent.sh \ + xlate.el + +BUILT_SOURCES = .version $(am__append_1) $(ioctlent_h) +today = $(shell date +%Y-%m-%d) +version_regexp = $(subst .,\.,$(VERSION)) +news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))' +@MAINTAINER_MODE_TRUE@gen_changelog_start_date = 2009-07-08 20:00 +@MAINTAINER_MODE_TRUE@IOCTLDIR = /usr/include +@MAINTAINER_MODE_TRUE@IOCTLASM = asm +@MAINTAINER_MODE_TRUE@IOCTLSORT_INCLUDEDIR = $(IOCTLDIR) +@MAINTAINER_MODE_TRUE@ioctlent_h_in = linux/ioctlent.h.in +ioctlent_h = $(builddir)/$(OS)/ioctlent.h +CLEANFILES = $(ioctlent_h) +ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in +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 $(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; + +$(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 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +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 +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) +alice-strace$(EXEEXT): $(alice-strace_OBJECTS) $(alice-strace_DEPENDENCIES) $(EXTRA_alice-strace_DEPENDENCIES) + @rm -f alice-strace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alice-strace_OBJECTS) $(alice-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)/bjm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/desc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathtrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quota.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scsi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alice-strace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsprintf.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 $< + +.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 `$(CYGPATH_W) '$<'` +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. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; 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" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + $(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__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__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.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(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 + mkdir $(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 --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(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__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 $(PROGRAMS) $(SCRIPTS) $(MANS) $(HEADERS) 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) + +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) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic 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: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-binPROGRAMS \ + clean-generic ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-lzma 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-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-man uninstall-man1 + + +.PHONY: srpm +srpm: dist-xz + rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz + +$(srcdir)/.version: + $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@ + +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 +@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 + +@MAINTAINER_MODE_TRUE@$(srcdir)/$(ioctlent_h_in): ioctlsort +@MAINTAINER_MODE_TRUE@ $( $@ +@MAINTAINER_MODE_TRUE@ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h +@MAINTAINER_MODE_TRUE@ $(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \ +@MAINTAINER_MODE_TRUE@ $(filter -I%,$(LINK.c)) \ +@MAINTAINER_MODE_TRUE@ -o $@ $< +@MAINTAINER_MODE_TRUE@ioctls.h: $(srcdir)/linux/ioctlent.sh +@MAINTAINER_MODE_TRUE@ $(SHELL) $< $(IOCTLDIR) $(IOCTLASM) +@MAINTAINER_MODE_TRUE@ioctldefs.h: ioctls.h ; +$(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps) + $(MKDIR_P) $(builddir)/$(OS) + cat $(ioctlent_h_deps) | \ + $(COMPILE) -E -P - | \ + LC_ALL=C sort -u -k3,3 -k2,2 | \ + awk -f $(srcdir)/linux/ioctlent-filter.awk > $@ + +# 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/alice-strace/NEWS b/alice-strace/NEWS new file mode 100644 index 0000000..1ec49f7 --- /dev/null +++ b/alice-strace/NEWS @@ -0,0 +1,508 @@ +Noteworthy changes in release 4.8 (2013-06-03) +============================================== + +* Changes in behavior + * In case of normal strace termination, when the trace output is + redirected to a pipe, strace now closes it and waits for the pipe + process termination before exit. + +* Improvements + * Implemented tracing using PTRACE_SEIZE API (when available). + * Implemented more reliable PTRACE_GETREGSET-based process personality + detection on x86-64 and x32 (when available). + * Added -e trace=memory option for tracing memory mapping related syscalls. + * Documented -b option. + * Allowed exit status messages to be suppressed by giving -q option twice. + * Added AArch64 architecture support + (addresses Debian bug #693074 and Fedora bug #969858). + * Added support for OpenRISC 1000, Meta, and Xtensa architectures. + * Added tilegx personality support for Tile. + * Enhanced support of NOMMU architectures. + * Enhanced decoding of getdents, mmap, perf_event_open, ptrace, and + quotactl syscalls. + * Added new syscall entries to match Linux 3.9. + * Regenerated the list of common ioctl names from Linux 3.9. + * Updated the list of errno constants. + * Updated lists of AF_*, MADV_*, MAP_*, MSG_*, MS_*, PF_*, PR_*, + PTRACE_O_*, and TCP_* constants. + * Implemented decoding of UBI ioctls. + * Removed redundant "*32" ioctl names. + +* Bug fixes + * Fixed ERESTARTNOINTR leaking to userspace on ancient kernels + (addresses Fedora bug #659382). + * Fixed kernel release string parsing + (addresses Debian bug #702309). + * Fixed decoding of *xattr syscalls + (addresses Fedora bug #885233). + * Fixed handling of files with 64-bit inode numbers by 32-bit strace + (addresses Fedora bug #912790). + * Fixed tracing forks on SPARC. + * Fixed decoding of fadvise64, fallocate, ftruncate64, io_submit, pread, + preadv, pwrite, pwritev, readahead, sigaltstack, sync_file_range, sysctl, + and truncate64 syscalls. + * Fixed categories of multiple syscalls on most of supported architectures. + * Fixed decoding of non-native 32-bit personality recv[m]msg syscalls. + * Fixed decoding of multiple 32-bit personality syscalls on x32. + * Fixed decoding of long long syscall arguments on ARM, MIPS/o32, PowerPC, + S390x, and Tile architectures. + * Fixed semtimedop decoding on S390x. + * Fixed sram_alloc decoding on Blackfin. + * Fixed build when process_vm_readv is a stab. + * Fixed build with older versions of libaio.h. + +Noteworthy changes in release 4.7 (2012-05-02) +============================================== + +* Changes in behavior + * strace no longer suspends waitpid until there is a child + for waitpid'ing process to collect status from. + * strace no longer detaches from a tracee which is supposed + to be going to die. + * strace now issues a new message: "+++ exited with EXITCODE +++" + which shows exact moment strace got exit notification, + analogous to existing "+++ killed by SIG +++" message. + +* Improvements + * Added x32 personality support (x86_64 architecture). + * Added -y and -P options to print file descriptor paths and + filter by those paths. + * Added -I option to control strace interactivity. + * Allowed -p option to take comma or whitespace-separated list of PIDs. + * Added strace_log_merge script helper to merge timestamped "strace -ff" + log files. + * Implemented decoding of clock_adjtime, get_robust_list, migrate_pages, + preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev, + recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list, + sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls. + * Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit, + listxattr, setrlimit and swapon syscalls. + * Implemented decoding of loop and mtd ioctls. + * Added syscall entries for new linux syscalls. + * Added syscall entries for direct socket system calls on powerpc. + * Updated the list of errno constants. + * Updated lists of MSG_*, STA_*, and TCP_* constants. + * Regenerated the list of ioctl names from Linux 3.3. + * Enhanced switching between processes with different personalities. + * Enhanced signals reporting by using short signal names. + * Made ERESTART* messages more descriptive. + * Made parsing of numbers from strings more robust. + * Added support for compat_statfs64 and statfs64.f_flags. + * Changed read of data blocks to use single process_vm_readv syscall + (when available) instead of several PTRACE_PEEKDATA operations. + * Changed read of registers on x86 and x86-64 to use single PTRACE_GETREGS + operation instead of several PTRACE_PEEKUSER operations. + * Applied various optimizations to make strace work faster. + +* Bug fixes + * Implemented proper handling of real SIGTRAPs on kernels supporting + PTRACE_O_TRACESYSGOOD. + (Addresses Fedora bug #162774). + * Fixed sockaddr_un.sun_path name in decoded output. + (Addresses Debian bug #554946). + * Fixed to avoid potential core file clobbering on exit. + (Addresses Debian bug #656398). + * Fixed a typo in documentation. + (Addresses Debian bug #653309). + * Fixed decoding of timer id returned by timer_create. + * Fixed epoll_create1, epoll_wait and epoll_pwait decoding. + * Fixed *at syscalls flags decoding. + * Fixed ARM EABI 64-bit syscall's arguments decoding. + * Fixed semtimedop decoding on s390. + * Fixed osf_sigprocmask decoding on alpha. + * Fixed ipc and socket subcall decoding on several architectures. + * Corrected syscall entries for epoll_pwait, epoll_create, epoll_ctl, + epoll_wait, mincore, mlockall, prctl, reboot, sendfile, sendfile64, + sendmsg, sgetmask, ssetmask, swapon, tgkill and tkill syscalls. + * Corrected io_* syscall entries on ARM. + * Fixed PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case. + * Fixed logging of unfinished lines in "strace -oLOG -ff" case. + * Fixed build when libaio-devel is not available. + * Fixed configure checks for PTRACE_* constants. + * Fixed compilation warnings remained on several architectures. + +* Portability + * Removed all non-Linux code. After years of neglect, that dead code + just hampered further strace development. + * Linux kernel >= 2.6.18 is recommended. Older versions might still + work but they haven't been thoroughly tested with this release. + +Noteworthy changes in release 4.6 (2011-03-15) +============================================== + +* Changes in behavior + * Print diagnostic information about changes in personality mode to + standard error instead of standard output. + +* Improvements + * Implemented a new method of following clone, fork, and vfork + syscalls using the Linux kernel's explicit facilities for tracing + creation of threads and child processes. + * Implemented CLONE_PARENT and CLONE_UNTRACED flags handling. + * Implemented decoding of TLS syscalls on m68k. + * Implemented biarch support on powerpc64. + * Implemented biarch support for getrlimit() and setrlimit(). + * Implemented decoding of struct ucred in getsockopt SO_PEERCRED. + * Implemented SOL_SCTP socket options decoding. + * Added HDIO_* ioctl names. + (Addresses Debian bug #450953). + * Added LOOP_* ioctl names. + * Updated lists of CLOCK_*, CLONE_*, MS_*, and SOL_* constants + to match Linux 2.6.37. + * Updated the list of IPPROTO_* constants to match netinet/in.h. + * Implemented decoding of HDIO_* and BLK* ioctls. + * Added MicroBlaze architecture support. + * Added new syscall entries to match Linux 2.6.37. + * Regenerated list of ioctl names from Linux 2.6.37. + * Enhanced signal notification decoding. + * Documented -C and -D options. + +* Bug fixes + * Fixed fetching syscall arguments on m68k. + * Fixed an error when judging whether a process has children. + * Fixed get/set_robust_list syscall numbers for powerpc. + * Fixed a corner case in printing clone flags. + * Fixed cross-compiling issues. + * Fixed build issues on powerpc64, SH and SPARC. + * Fixed syscall flags of fstatat*, mmap, mmap2, fadvise64*, swapoff, + fgetxattr, flistxattr, fremovexattr, epoll_create, fallocate, + fanotify_init, and fanotify_mark syscalls. + * Fixed decoding of get[ug]id, gete[ug]id and setfs[ug]id return values. + * Fixed biarch support in IO dumping. + * Fixed raw exit_group decoding. + * Fixed decoding of file descriptors on 64-bit architectures. + * Fixed a corner case in waitpid handling. + (Addresses Red Hat bug #663547). + * Fixed stat64 decoding on mips + (Addresses Debian bug #599028). + * Fixed misleading italics in the manual page. + (Addresses Debian bug #589323). + +Noteworthy changes in release 4.5.20 (2010-04-13) +================================================= + +* Improvements + * Implemented decoding of new linux syscalls: inotify_init1, recvmmsg. + * Implemented basic decoding of new linux syscalls: preadv, pwritev, + rt_tgsigqueueinfo, perf_event_open. + * Enhanced decoding of recently added syscalls on non-x86 architectures + by replacing a bare decoder with elaborate parsers enabled earlier + for x86/x86-64. + * Implemented -C option to combine regular and -c output. + (Addresses Debian bug #466196) + * Enhanced decoding of mbind and mremap syscalls. + * Enhanced SOL_PACKET socket options decoding. + * Regenerated list of ioctl names from linux 2.6.33. + * Added TILE architecture support. + +* Bug fixes + * Fixed build with Linux kernel headers 2.6.32-rc5+. + (Addresses Debian bug #560516 and Fedora bug #539044) + * Fixed build on mips. + * Fixed handling of Linux systems without struct statfs64. + * Fixed reporting signal mask by sigreturn on powerpc. + * Fixed potential stack buffer overflow in select decoder. + (Addresses Fedora bug #556678) + * Corrected msgsnd indirect ipccall decoding. + * Corrected decoding of 64bit syscalls. + (Addresses Debian bug #570603) + * Corrected getsockopt decoding on architectures where + sizeof(long) > sizeof(int). + (Addresses Debian bug #494844) + * Corrected decoding of epoll_pwait. + (Addresses Debian bug #513014) + * Corrected handling of killed threads. + +Noteworthy changes in release 4.5.19 (2009-10-21) +================================================= + +* Changes in behavior + * When command exits, strace now exits with the same exit status. + If command is terminated by a signal, strace terminates itself + with the same signal, so that strace can be used as a wrapper + process transparent to the invoking parent process. + When using -p option, the exit status of strace is zero unless + there was an unexpected error in doing the tracing. + (Addresses Fedora bug #105371 and Debian bug #37665) + +* Improvements + * Implemented decoding of new Linux syscalls: accept4, dup3, + epoll_create1, eventfd2, inotify_init1, pipe2, signalfd4. + * Implemented decoding of socket type flags introduced in Linux 2.6.27. + * Implemented decoding of accept4 socketcall. + * Enhanced prctl decoding. + * Enhanced nanosleep decoding. + * Enhanced ptrace decoding. + * Enhanced futex decoding. + * Enhanced CAP_* decoding. + * Enhanced SIOCS* ioctls decoding. + * Enhanced fcntl F_* flags decoding. + * Enhanced semop/semtimedop decoding. + * Updated ARM architecture support. + * Added Blackfin architecture support. + * Added AVR32 architecture support. + * Added CRIS architecture support. + * Made strace detect when traced process suddenly disappeared. + +* Bug fixes + * Fixed syscall numbers for tee and sync_file_range. + (Addresses Debian bug #503124) + * Fixed several bugs in strings decoder, including potential heap + memory corruption. + (Addresses Fedora bugs #470529, #478324 and #511035) + * Marked sendfile(2) as a network syscall. + (Addresses Debian bug #509499) + * Fixed accept(2) decoding. + (Addresses Debian bug #507573) + * Fixed sigtimedwait(2) decoding. + * Fixed build on ARM EABI. + (Addresses Debian bugs #520084 and #535564, and Fedora bug #507576) + * Fixed display of 32-bit fcntl(F_SETLK) on 64-bit architectures. + (Addresses Red Hat bug #471169) + * Fixed display of 32-bit argv array on 64-bit architectures. + (Addresses Fedora bug #519480) + * Fixed display of 32-bit struct sigaction on 64-bit architectures. + * Fixed HPPA architecture support. + (Addresses Debian bugs #437928 and #546619) + +Changes in 4.5.18 +============== +* Bug fixes. +* 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. + +Changes in 4.5.17 +============== +* Many bug fixes. +* -F is now deprecated, -f has traced vfork too on Linux for a long time now. +* Print O_CLOEXEC, MSG_CMSG_CLOEXEC flag bits. +* Improved output for prctl system call on Linux. +* Improved support for Linux/ARM. +* SA_NOMASK is now spelled SA_NODEFER, and SA_ONESHOT is spelled SA_RESETHAND. + +Changes in 4.5.16 +============== +* Bug fixes. +* Improved output for delete_module, futex, and mbind system calls on Linux. +* Improved output for SG_IO ioctls on Linux. +* Support new Linux system calls move_pages, utimensat, signalfd, timerfd, + eventfd, getcpu, epoll_pwait. + +Changes in 4.5.15 +============== +* Bug fixes. +* Several biarch improvements. +* Improved output for adjtimex, sysctl, quotactl, mount, umount. +* Support new Linux system calls *at, inotify*, pselect6, ppoll and unshare. + +Changes in 4.5.14 +============== +* Bug fixes. +* Accept numeric system calls in -e. + +Changes in 4.5.13 +============== +* Bug fixes. +* Introduce "-e trace=desc". + +Changes in 4.5.12 +============== +* Bug fixes. +* Better x86-64 support for IA32 processes. +* Update PowerPC system calls. +* Better printing for Linux aio system calls. + +Changes in 4.5.11 +============== +* Quick fix release for build issues. +* One fix for Linux/ARM system call table. + +Changes in 4.5.10 +============== +* Bug fixes. +* Print fault address for SIGSEGV/SIGBUS signals when available. + +Changes in 4.5.9 +============== +* Bug fixes. +* Improve socket ioctl printing. +* Update Linux/IA64 syscall list. +* Fix Linux/x86-64 syscall argument extraction for 32-bit processes. +* Improve mount flags printing. +* Support symbolic printing of x86_64 arch_prctl parameters. + +Changes in 4.5.8 +============== +* Bug fixes. +* Update syscall tables for Alpha, ARM, HPPA. +* 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. + +Changes in 4.5.7 +============== +* Bug fixes. +* Print attribute values in *xattr system calls on Linux. +* Include pread and pwrite calls in -e read and -e write tracing. +* Update SO_* and IP_* value lists and add IPV6_* values for socket options. +* Print clock_t values symbolically in Linux clock_* system calls. + +Changes in 4.5.6 +============== +* Bug fixes, Linux ioctl updates. +* David Miller contributed support for Linux/SPARC64. + +Changes in 4.5.5 +============== +* Just bug fixes. + +Changes in 4.5.4 +============== +* Update Linux ioctl lists. +* Update PF_* and AF_* value lists. +* The 4.5.3 -p behavior for NPTL threads applies only under -f, and got fixed. + +Changes in 4.5.3 +============== +* Bug fixes. +* On Linux using NPTL threads, -p will now attach to all threads in a process. +* Handle new mq_* system calls in Linux 2.6.6 and later. + +Changes in 4.5.2 +============== +* Bug fixes. +* Report some new VM_* bit values on Linux. +* Better output for Linux sched_* system calls. + +Changes in 4.5.1 +============== +* Bug fixes. +* Display multiple ioctl name matches on Linux. + +Changes in 4.5 +============== +* New port to AMD's x86-64 architecture. One strace binary can + handle both new x86-64 and old i386 processes. +* Fixed support for LFS64 calls. +* New switch -E to add/remove environment variables for the command. +* Merged s390/s390x port. +* Trace an unbounded number of processes. +* Handle numerous new system calls in Linux 2.5, and new threads semantics. +* Fixed bugs with attach/detach leaving things stopped. +* Fixed traced process seeing ECHILD despite live, traced children + in waitpid calls with WNOHANG. +* Stuart Menefy contributed a port to Linux/SH. +* Stephen Thomas contributed a port to Linux/SH64. +* Many other bug fixes. + +Changes in 4.4 +============== +* Fix Linux/ia64 support, looks like someone renamed a few things on us +* Fix the ioctl setup for Linux, turned out it did not really work. + Improve the ioctl extracter as well so we decode some more ones. + +Changes in 4.3.1 +================ +* compile fixes for Linux/mips + +Changes in 4.3 +============== +* Linux ia64 and hppa ports added +* The usual Linux syscall updates (includes 32bit uid/gid support), +* Linux ioctl list updated +* Support IPv6 scope ids +* FreeBSD/i386 port added +* UnixWare and Solaris updates +* Better support for tracing multithreaded processes in Linux + +Changes in 4.2 +============== +* Compiles on glibc2.0 systems again +* Linux/S390 port added +* The usual Linux syscall updates +* we can follow fork on arm now + +Changes in 4.1 +================ +* Linux/MIPS port added +* Lots of Linux updates again +* Improved IPv6 support +* Add strace-graph + +Changes in 4.0.1 +================ +* Minor bugfixes +* Compiles on glibc2.0 systems again + +Changes in 4.0 +============== +* Get stat structure properly on Linux 64bit archs +* Personalities work again +* Compile correctly on SunOS again +* IRIX64 updates +* Solaris updates + +Changes in 3.99.1 +================= +* Linux (ultra)sparc fixes +* Linux alpha fixes +* Minor cleanups + +Changes in 3.99 +=============== +* New maintainer +* add support for more Linux architectures (powerpc, sparc, arm) +* support lots more Linux syscalls +* fix signal handling +* add IPX and IPIP support +* check stray syscall after execv +* fix hanging children + +Changes in version 3.1 +====================== + +* Irix5 is supported +* Linux 68k is supported +* Linux alpha is supported +* configure is upgraded to autoconf 2.x +* using -f in combination with -e now works correctly +* output can be piped to a program +* tracing setuid programs works better +* it is now reasonable to install strace setuid to root in some circumstances +* new useful tracing names like file and process to trace whole + classes of system calls, e.g. -efile traces all system calls that + take a file name as an argument +* IPC calls on SunOS 4.1.x are decoded +* Linux program memory is reliably dereferenced +* Linux decodes at least the name of all syscalls as of pre2.0.4 +* various cosmetic changes and bug fixes + +Changes from versions 2.x to version 3.0 +======================================== + +* filename arguments are neither abbreviated nor stringified +* string arguments are now true C strings using octal instead of hex by default +* preprocessor constants are never shortened (e.g. was RDONLY => now O_RDONLY) +* by default the output for multiple processes now goes into one file +* all structures, vectors, bitsets, etc. use consistent output formats +* the -c option now means count calls, -i does what the old -c used to do + +New Features in version 3.0 +=========================== + +* non-ascii strings can be optionally printed entirely in hex +* the output format is readable when mutiple processes are generating output +* exit values are printed in an alignment column +* is is possible to suppress messages about attaching and detaching +* various tracing features can be enabled on a per syscall/signal/desc basis +* selective tracing of syscalls +* selective printing of syscall structures +* selective abbreviation of long structures on a per syscall basis +* selective printing of raw syscall arguments and results +* selective tracing of signals +* selective dumping of all I/O read from file descriptors +* selective dumping of all I/O written to file descriptors +* optional counting of time, calls, and errors for each syscall diff --git a/alice-strace/README b/alice-strace/README new file mode 100644 index 0000000..4ef0834 --- /dev/null +++ b/alice-strace/README @@ -0,0 +1,17 @@ +This is strace, a system call tracer for Linux. + +strace is released under a Berkeley-style license at the request +of Paul Kranenburg; see the file COPYING for details. + +See the file CREDITS for a list of authors and other contributors. + +See the file INSTALL for compilation and installation instructions. + +See the file NEWS for information on what has changed in recent +versions. + +You can get the latest version of strace from its homepage at +http://sourceforge.net/projects/strace/ . + +Please send bug reports and enhancements to the strace +mailinglist at strace-devel@lists.sourceforge.net. diff --git a/alice-strace/README-alc-alice-strace b/alice-strace/README-alc-alice-strace new file mode 100644 index 0000000..82814b3 --- /dev/null +++ b/alice-strace/README-alc-alice-strace @@ -0,0 +1,8 @@ +The current version differs from normal strace by the following: + +1. With writev and pwritev system calls, the strace shows an additional parameter for the calls (as the last parameter). This parameter describes the total size (in bytes) of the iov buffers involved in the call. + +2. In addition to the usual output files, this version of strace creates "dump output files". If no '-ff' is given, the dump file is "/tmp/strace_dump". Otherwise, it is .byte_dump.. + +3. For the write and pwrite calls, whenever the calls happen, the actual data contained in the *buf parameter of the calls is written to the dump file. The size of the data written is that of the parameter in the write() or pwrite() calls (specifically, it is NOT the return value of the calls). For writev and pwritev calls, the data contained in each iov is written to the dump file (in order). + diff --git a/alice-strace/README-linux b/alice-strace/README-linux new file mode 100644 index 0000000..62df258 --- /dev/null +++ b/alice-strace/README-linux @@ -0,0 +1,31 @@ + +Strace has been ported by Branko Lankester +to run on Linux systems. Since then it has been greatly modified +by various other people. + +If you want to compile strace on a Linux system please make sure that +you use recent kernel headers. Strace needs those to get the proper data +structures and constatns used by the kernel, since these can be +different from the structures that the C library uses. Currently you +will need at least a 2.2.7 or newer kernel. + +To complicate things a bit further strace might not compile if you are +using development kernels. These tend to have headers that conflict with +the headers from libc which makes it impossible to use them. + +There are three ways to compile strace with other kernel headers: +* Specify the location in CFLAGS when running configure + + CFLAGS=-I/usr/src/linux/include ./configure + +* you can tell make where your kernel sources are. For example if you + have your kernelsource in /usr/src/linux, you can invoke make like + this: + + make CFLAGS="\$CFLAGS -I/usr/src/linux/include" + + (the extra \$CFLAGS is there to make sure we don't override any CFLAGS + settings that configure has found). + +* you can link /usr/include/linux and /usr/include/asm to the + corresponding directories in your kernel source-tree. diff --git a/alice-strace/README-linux-ptrace b/alice-strace/README-linux-ptrace new file mode 100644 index 0000000..97e2c01 --- /dev/null +++ b/alice-strace/README-linux-ptrace @@ -0,0 +1,542 @@ +This document describes Linux ptrace implementation in Linux kernels +version 3.0.0. (Update this notice if you update the document +to reflect newer kernels). + + + Ptrace userspace API. + +Ptrace API (ab)uses standard Unix parent/child signaling over waitpid. +An unfortunate effect of it is that resulting API is complex and has +subtle quirks. This document aims to describe these quirks. + +Debugged processes (tracees) first need to be attached to the debugging +process (tracer). Attachment and subsequent commands are per-thread: in +multi-threaded process, every thread can be individually attached to a +(potentially different) tracer, or left not attached and thus not +debugged. Therefore, "tracee" always means "(one) thread", never "a +(possibly multi-threaded) process". Ptrace commands are always sent to +a specific tracee using ptrace(PTRACE_foo, pid, ...), where pid is a +TID of the corresponding Linux thread. + +After attachment, each tracee can be in two states: running or stopped. + +There are many kinds of states when tracee is stopped, and in ptrace +discussions they are often conflated. Therefore, it is important to use +precise terms. + +In this document, any stopped state in which tracee is ready to accept +ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can +be further subdivided into signal-delivery-stop, group-stop, +syscall-stop and so on. They are described in detail later. + + + 1.x Death under ptrace. + +When a (possibly multi-threaded) process receives a killing signal (a +signal set to SIG_DFL and whose default action is to kill the process), +all threads exit. Tracees report their death to the tracer(s). This is +not a ptrace-stop (because tracer can't query tracee status such as +register contents, cannot restart tracee etc) but the notification +about this event is delivered through waitpid API similarly to +ptrace-stop. + +Note that killing signal will first cause signal-delivery-stop (on one +tracee only), and only after it is injected by tracer (or after it was +dispatched to a thread which isn't traced), death from signal will +happen on ALL tracees within multi-threaded process. + +SIGKILL operates similarly, with exceptions. No signal-delivery-stop is +generated for SIGKILL and therefore tracer can't suppress it. SIGKILL +kills even within syscalls (syscall-exit-stop is not generated prior to +death by SIGKILL). The net effect is that SIGKILL always kills the +process (all its threads), even if some threads of the process are +ptraced. + +Tracer can kill a tracee with ptrace(PTRACE_KILL, pid, 0, 0). This +operation is deprecated, use kill/tgkill(SIGKILL) instead. + +^^^ Oleg prefers to deprecate it instead of describing (and needing to +support) PTRACE_KILL's quirks. + +When tracee executes exit syscall, it reports its death to its tracer. +Other threads are not affected. + +When any thread executes exit_group syscall, every tracee in its thread +group reports its death to its tracer. + +If PTRACE_O_TRACEEXIT option is on, PTRACE_EVENT_EXIT will happen +before actual death. This applies to exits on exit syscall, group_exit +syscall, signal deaths (except SIGKILL), and when threads are torn down +on execve in multi-threaded process. + +Tracer cannot assume that ptrace-stopped tracee exists. There are many +scenarios when tracee may die while stopped (such as SIGKILL). +Therefore, tracer must always be prepared to handle ESRCH error on any +ptrace operation. Unfortunately, the same error is returned if tracee +exists but is not ptrace-stopped (for commands which require stopped +tracee), or if it is not traced by process which issued ptrace call. +Tracer needs to keep track of stopped/running state, and interpret +ESRCH as "tracee died unexpectedly" only if it knows that tracee has +been observed to enter ptrace-stop. Note that there is no guarantee +that waitpid(WNOHANG) will reliably report tracee's death status if +ptrace operation returned ESRCH. waitpid(WNOHANG) may return 0 instead. +IOW: tracee may be "not yet fully dead" but already refusing ptrace ops. + +Tracer can not assume that tracee ALWAYS ends its life by reporting +WIFEXITED(status) or WIFSIGNALED(status). + +??? or can it? Do we include such a promise into ptrace API? + + + 1.x Stopped states. + +When running tracee enters ptrace-stop, it notifies its tracer using +waitpid API. Tracer should use waitpid family of syscalls to wait for +tracee to stop. Most of this document assumes that tracer waits with: + + pid = waitpid(pid_or_minus_1, &status, __WALL); + +Ptrace-stopped tracees are reported as returns with pid > 0 and +WIFSTOPPED(status) == true. + +??? Do we require __WALL usage, or will just using 0 be ok? Are the +rules different if user wants to use waitid? Will waitid require +WEXITED? + +__WALL value does not include WSTOPPED and WEXITED bits, but implies +their functionality. + +Setting of WCONTINUED bit in waitpid flags is not recommended: the +continued state is per-process and consuming it can confuse real parent +of the tracee. + +Use of WNOHANG bit in waitpid flags may cause waitpid return 0 ("no +wait results available yet") even if tracer knows there should be a +notification. Example: kill(tracee, SIGKILL); waitpid(tracee, &status, +__WALL | WNOHANG); + +??? waitid usage? WNOWAIT? + +??? describe how wait notifications queue (or not queue) + +The following kinds of ptrace-stops exist: signal-delivery-stops, +group-stop, PTRACE_EVENT stops, syscall-stops [, SINGLESTEP, SYSEMU, +SYSEMU_SINGLESTEP]. They all are reported as waitpid result with +WIFSTOPPED(status) == true. They may be differentiated by checking +(status >> 8) value, and if looking at (status >> 8) value doesn't +resolve ambiguity, by querying PTRACE_GETSIGINFO. (Note: +WSTOPSIG(status) macro returns ((status >> 8) & 0xff) value). + + + 1.x.x Signal-delivery-stop + +When (possibly multi-threaded) process receives any signal except +SIGKILL, kernel selects a thread which handles the signal (if signal is +generated with t[g]kill, thread selection is done by user). If selected +thread is traced, it enters signal-delivery-stop. By this point, signal +is not yet delivered to the process, and can be suppressed by tracer. +If tracer doesn't suppress the signal, it passes signal to tracee in +the next ptrace request. This second step of signal delivery is called +"signal injection" in this document. Note that if signal is blocked, +signal-delivery-stop doesn't happen until signal is unblocked, with the +usual exception that SIGSTOP can't be blocked. + +Signal-delivery-stop is observed by tracer as waitpid returning with +WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. If +WSTOPSIG(status) == SIGTRAP, this may be a different kind of +ptrace-stop - see "Syscall-stops" and "execve" sections below for +details. If WSTOPSIG(status) == stopping signal, this may be a +group-stop - see below. + + + 1.x.x Signal injection and suppression. + +After signal-delivery-stop is observed by tracer, tracer should restart +tracee with + + ptrace(PTRACE_rest, pid, 0, sig) + +call, where PTRACE_rest is one of the restarting ptrace ops. If sig is +0, then signal is not delivered. Otherwise, signal sig is delivered. +This operation is called "signal injection" in this document, to +distinguish it from signal-delivery-stop. + +Note that sig value may be different from WSTOPSIG(status) value - +tracer can cause a different signal to be injected. + +Note that suppressed signal still causes syscalls to return +prematurely. Kernel should always restart the syscall in this case: +tracer would observe a new syscall-enter-stop for the same syscall, +or, in case of syscalls returning ERESTART_RESTARTBLOCK, +tracer would observe a syscall-enter-stop for restart_syscall(2) +syscall. There may still be bugs in this area which cause some syscalls +to instead return with -EINTR even though no observable signal +was injected to the tracee. + +This is a cause of confusion among ptrace users. One typical scenario +is that tracer observes group-stop, mistakes it for +signal-delivery-stop, restarts tracee with ptrace(PTRACE_rest, pid, 0, +stopsig) with the intention of injecting stopsig, but stopsig gets +ignored and tracee continues to run. + +SIGCONT signal has a side effect of waking up (all threads of) +group-stopped process. This side effect happens before +signal-delivery-stop. Tracer can't suppress this side-effect (it can +only suppress signal injection, which only causes SIGCONT handler to +not be executed in the tracee, if such handler is installed). In fact, +waking up from group-stop may be followed by signal-delivery-stop for +signal(s) *other than* SIGCONT, if they were pending when SIGCONT was +delivered. IOW: SIGCONT may be not the first signal observed by the +tracee after it was sent. + +Stopping signals cause (all threads of) process to enter group-stop. +This side effect happens after signal injection, and therefore can be +suppressed by tracer. + +PTRACE_GETSIGINFO can be used to retrieve siginfo_t structure which +corresponds to delivered signal. PTRACE_SETSIGINFO may be used to +modify it. If PTRACE_SETSIGINFO has been used to alter siginfo_t, +si_signo field and sig parameter in restarting command must match, +otherwise the result is undefined. + + + 1.x.x Group-stop + +When a (possibly multi-threaded) process receives a stopping signal, +all threads stop. If some threads are traced, they enter a group-stop. +Note that stopping signal will first cause signal-delivery-stop (on one +tracee only), and only after it is injected by tracer (or after it was +dispatched to a thread which isn't traced), group-stop will be +initiated on ALL tracees within multi-threaded process. As usual, every +tracee reports its group-stop separately to corresponding tracer. + +Group-stop is observed by tracer as waitpid returning with +WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. The same result +is returned by some other classes of ptrace-stops, therefore the +recommended practice is to perform + + ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo) + +call. The call can be avoided if signal number is not SIGSTOP, SIGTSTP, +SIGTTIN or SIGTTOU - only these four signals are stopping signals. If +tracer sees something else, it can't be group-stop. Otherwise, tracer +needs to call PTRACE_GETSIGINFO. If PTRACE_GETSIGINFO fails with +EINVAL, then it is definitely a group-stop. (Other failure codes are +possible, such as ESRCH "no such process" if SIGKILL killed the tracee). + +As of kernel 2.6.38, after tracer sees tracee ptrace-stop and until it +restarts or kills it, tracee will not run, and will not send +notifications (except SIGKILL death) to tracer, even if tracer enters +into another waitpid call. + +Currently, it causes a problem with transparent handling of stopping +signals: if tracer restarts tracee after group-stop, SIGSTOP is +effectively ignored: tracee doesn't remain stopped, it runs. If tracer +doesn't restart tracee before entering into next waitpid, future +SIGCONT will not be reported to the tracer. Which would make SIGCONT to +have no effect. + + + 1.x.x PTRACE_EVENT stops + +If tracer sets TRACE_O_TRACEfoo options, tracee will enter ptrace-stops +called PTRACE_EVENT stops. + +PTRACE_EVENT stops are observed by tracer as waitpid returning with +WIFSTOPPED(status) == true, WSTOPSIG(status) == SIGTRAP. Additional bit +is set in a higher byte of status word: value ((status >> 8) & 0xffff) +will be (SIGTRAP | PTRACE_EVENT_foo << 8). The following events exist: + +PTRACE_EVENT_VFORK - stop before return from vfork/clone+CLONE_VFORK. +When tracee is continued after this, it will wait for child to +exit/exec before continuing its execution (IOW: usual behavior on +vfork). + +PTRACE_EVENT_FORK - stop before return from fork/clone+SIGCHLD + +PTRACE_EVENT_CLONE - stop before return from clone + +PTRACE_EVENT_VFORK_DONE - stop before return from +vfork/clone+CLONE_VFORK, but after vfork child unblocked this tracee by +exiting or exec'ing. + +For all four stops described above: stop occurs in parent, not in newly +created thread. PTRACE_GETEVENTMSG can be used to retrieve new thread's +tid. + +PTRACE_EVENT_EXEC - stop before return from exec. + +PTRACE_EVENT_EXIT - stop before exit (including death from exit_group), +signal death, or exit caused by execve in multi-threaded process. +PTRACE_GETEVENTMSG returns exit status. Registers can be examined +(unlike when "real" exit happens). The tracee is still alive, it needs +to be PTRACE_CONTed or PTRACE_DETACHed to finish exit. + +PTRACE_GETSIGINFO on PTRACE_EVENT stops returns si_signo = SIGTRAP, +si_code = (event << 8) | SIGTRAP. + + + 1.x.x Syscall-stops + +If tracee was restarted by PTRACE_SYSCALL, tracee enters +syscall-enter-stop just prior to entering any syscall. If tracer +restarts it with PTRACE_SYSCALL, tracee enters syscall-exit-stop when +syscall is finished, or if it is interrupted by a signal. (That is, +signal-delivery-stop never happens between syscall-enter-stop and +syscall-exit-stop, it happens *after* syscall-exit-stop). + +Other possibilities are that tracee may stop in a PTRACE_EVENT stop, +exit (if it entered exit or exit_group syscall), be killed by SIGKILL, +or die silently (if execve syscall happened in another thread). + +Syscall-enter-stop and syscall-exit-stop are observed by tracer as +waitpid returning with WIFSTOPPED(status) == true, WSTOPSIG(status) == +SIGTRAP. If PTRACE_O_TRACESYSGOOD option was set by tracer, then +WSTOPSIG(status) == (SIGTRAP | 0x80). + +Syscall-stops can be distinguished from signal-delivery-stop with +SIGTRAP by querying PTRACE_GETSIGINFO: si_code <= 0 if sent by usual +suspects like [tg]kill/sigqueue/etc; or = SI_KERNEL (0x80) if sent by +kernel, whereas syscall-stops have si_code = SIGTRAP or (SIGTRAP | +0x80). However, syscall-stops happen very often (twice per syscall), +and performing PTRACE_GETSIGINFO for every syscall-stop may be somewhat +expensive. + +Some architectures allow to distinguish them by examining registers. +For example, on x86 rax = -ENOSYS in syscall-enter-stop. Since SIGTRAP +(like any other signal) always happens *after* syscall-exit-stop, and +at this point rax almost never contains -ENOSYS, SIGTRAP looks like +"syscall-stop which is not syscall-enter-stop", IOW: it looks like a +"stray syscall-exit-stop" and can be detected this way. But such +detection is fragile and is best avoided. + +Using PTRACE_O_TRACESYSGOOD option is a recommended method, since it is +reliable and does not incur performance penalty. + +Syscall-enter-stop and syscall-exit-stop are indistinguishable from +each other by tracer. Tracer needs to keep track of the sequence of +ptrace-stops in order to not misinterpret syscall-enter-stop as +syscall-exit-stop or vice versa. The rule is that syscall-enter-stop is +always followed by syscall-exit-stop, PTRACE_EVENT stop or tracee's +death - no other kinds of ptrace-stop can occur in between. + +If after syscall-enter-stop tracer uses restarting command other than +PTRACE_SYSCALL, syscall-exit-stop is not generated. + +PTRACE_GETSIGINFO on syscall-stops returns si_signo = SIGTRAP, si_code += SIGTRAP or (SIGTRAP | 0x80). + + + 1.x.x SINGLESTEP, SYSEMU, SYSEMU_SINGLESTEP + +??? document PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP + + + 1.x Informational and restarting ptrace commands. + +Most ptrace commands (all except ATTACH, TRACEME, KILL) require tracee +to be in ptrace-stop, otherwise they fail with ESRCH. + +When tracee is in ptrace-stop, tracer can read and write data to tracee +using informational commands. They leave tracee in ptrace-stopped state: + +longv = ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0); + ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val); + ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct); + ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct); + ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo); + ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo); + ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var); + ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags); + +Note that some errors are not reported. For example, setting siginfo +may have no effect in some ptrace-stops, yet the call may succeed +(return 0 and don't set errno). + +ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags) affects one tracee. +Current flags are replaced. Flags are inherited by new tracees created +and "auto-attached" via active PTRACE_O_TRACE[V]FORK or +PTRACE_O_TRACECLONE options. + +Another group of commands makes ptrace-stopped tracee run. They have +the form: + + ptrace(PTRACE_cmd, pid, 0, sig); + +where cmd is CONT, DETACH, SYSCALL, SINGLESTEP, SYSEMU, or +SYSEMU_SINGLESTEP. If tracee is in signal-delivery-stop, sig is the +signal to be injected. Otherwise, sig may be ignored. + + + 1.x Attaching and detaching + +A thread can be attached to tracer using ptrace(PTRACE_ATTACH, pid, 0, +0) call. This also sends SIGSTOP to this thread. If tracer wants this +SIGSTOP to have no effect, it needs to suppress it. Note that if other +signals are concurrently sent to this thread during attach, tracer may +see tracee enter signal-delivery-stop with other signal(s) first! The +usual practice is to reinject these signals until SIGSTOP is seen, then +suppress SIGSTOP injection. The design bug here is that attach and +concurrent SIGSTOP are racing and SIGSTOP may be lost. + +??? Describe how to attach to a thread which is already group-stopped. + +Since attaching sends SIGSTOP and tracer usually suppresses it, this +may cause stray EINTR return from the currently executing syscall in +the tracee, as described in "signal injection and suppression" section. + +ptrace(PTRACE_TRACEME, 0, 0, 0) request turns current thread into a +tracee. It continues to run (doesn't enter ptrace-stop). A common +practice is to follow ptrace(PTRACE_TRACEME) with raise(SIGSTOP) and +allow parent (which is our tracer now) to observe our +signal-delivery-stop. + +If PTRACE_O_TRACE[V]FORK or PTRACE_O_TRACECLONE options are in effect, +then children created by (vfork or clone(CLONE_VFORK)), (fork or +clone(SIGCHLD)) and (other kinds of clone) respectively are +automatically attached to the same tracer which traced their parent. +SIGSTOP is delivered to them, causing them to enter +signal-delivery-stop after they exit syscall which created them. + +Detaching of tracee is performed by ptrace(PTRACE_DETACH, pid, 0, sig). +PTRACE_DETACH is a restarting operation, therefore it requires tracee +to be in ptrace-stop. If tracee is in signal-delivery-stop, signal can +be injected. Othervice, sig parameter may be silently ignored. + +If tracee is running when tracer wants to detach it, the usual solution +is to send SIGSTOP (using tgkill, to make sure it goes to the correct +thread), wait for tracee to stop in signal-delivery-stop for SIGSTOP +and then detach it (suppressing SIGSTOP injection). Design bug is that +this can race with concurrent SIGSTOPs. Another complication is that +tracee may enter other ptrace-stops and needs to be restarted and +waited for again, until SIGSTOP is seen. Yet another complication is to +be sure that tracee is not already ptrace-stopped, because no signal +delivery happens while it is - not even SIGSTOP. + +??? Describe how to detach from a group-stopped tracee so that it + doesn't run, but continues to wait for SIGCONT. + +If tracer dies, all tracees are automatically detached and restarted, +unless they were in group-stop. Handling of restart from group-stop is +currently buggy, but "as planned" behavior is to leave tracee stopped +and waiting for SIGCONT. If tracee is restarted from +signal-delivery-stop, pending signal is injected. + + + 1.x execve under ptrace. + +During execve, kernel destroys all other threads in the process, and +resets execve'ing thread tid to tgid (process id). This looks very +confusing to tracers: + +All other threads stop in PTRACE_EXIT stop, if requested by active +ptrace option. Then all other threads except thread group leader report +death as if they exited via exit syscall with exit code 0. Then +PTRACE_EVENT_EXEC stop happens, if requested by active ptrace option +(on which tracee - leader? execve-ing one?). + +The execve-ing tracee changes its pid while it is in execve syscall. +(Remember, under ptrace 'pid' returned from waitpid, or fed into ptrace +calls, is tracee's tid). That is, pid is reset to process id, which +coincides with thread group leader tid. + +If thread group leader has reported its death by this time, for tracer +this looks like dead thread leader "reappears from nowhere". If thread +group leader was still alive, for tracer this may look as if thread +group leader returns from a different syscall than it entered, or even +"returned from syscall even though it was not in any syscall". If +thread group leader was not traced (or was traced by a different +tracer), during execve it will appear as if it has become a tracee of +the tracer of execve'ing tracee. All these effects are the artifacts of +pid change. + +PTRACE_O_TRACEEXEC option is the recommended tool for dealing with this +case. It enables PTRACE_EVENT_EXEC stop which occurs before execve +syscall return. + +Pid change happens before PTRACE_EVENT_EXEC stop, not after. + +When tracer receives PTRACE_EVENT_EXEC stop notification, it is +guaranteed that except this tracee and thread group leader, no other +threads from the process are alive. + +On receiving this notification, tracer should clean up all its internal +data structures about all threads of this process, and retain only one +data structure, one which describes single still running tracee, with +pid = tgid = process id. + +Currently, there is no way to retrieve former pid of execve-ing tracee. +If tracer doesn't keep track of its tracees' thread group relations, it +may be unable to know which tracee execve-ed and therefore no longer +exists under old pid due to pid change. + +Example: two threads execve at the same time: + + ** we get syscall-entry-stop in thread 1: ** + PID1 execve("/bin/foo", "foo" + ** we issue PTRACE_SYSCALL for thread 1 ** + ** we get syscall-entry-stop in thread 2: ** + PID2 execve("/bin/bar", "bar" + ** we issue PTRACE_SYSCALL for thread 2 ** + ** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL ** + ** we get syscall-exit-stop for PID0: ** + PID0 <... execve resumed> ) = 0 + +In this situation there is no way to know which execve succeeded. + +If PTRACE_O_TRACEEXEC option is NOT in effect for the execve'ing +tracee, kernel delivers an extra SIGTRAP to tracee after execve syscall +returns. This is an ordinary signal (similar to one which can be +generated by "kill -TRAP"), not a special kind of ptrace-stop. +GETSIGINFO on it has si_code = 0 (SI_USER). It can be blocked by signal +mask, and thus can happen (much) later. + +Usually, tracer (for example, strace) would not want to show this extra +post-execve SIGTRAP signal to the user, and would suppress its delivery +to the tracee (if SIGTRAP is set to SIG_DFL, it is a killing signal). +However, determining *which* SIGTRAP to suppress is not easy. Setting +PTRACE_O_TRACEEXEC option and thus suppressing this extra SIGTRAP is +the recommended approach. + + + 1.x Real parent + +Ptrace API (ab)uses standard Unix parent/child signaling over waitpid. +This used to cause real parent of the process to stop receiving several +kinds of waitpid notifications when child process is traced by some +other process. + +Many of these bugs have been fixed, but as of 2.6.38 several still +exist. + +As of 2.6.38, the following is believed to work correctly: + +- exit/death by signal is reported first to tracer, then, when tracer +consumes waitpid result, to real parent (to real parent only when the +whole multi-threaded process exits). If they are the same process, the +report is sent only once. + + + 1.x Known bugs + +Following bugs still exist: + +Group-stop notifications are sent to tracer, but not to real parent. +Last confirmed on 2.6.38.6. + +If thread group leader is traced and exits by calling exit syscall, +PTRACE_EVENT_EXIT stop will happen for it (if requested), but subsequent +WIFEXITED notification will not be delivered until all other threads +exit. As explained above, if one of other threads execve's, thread +group leader death will *never* be reported. If execve-ed thread is not +traced by this tracer, tracer will never know that execve happened. + +??? need to test this scenario + +One possible workaround is to detach thread group leader instead of +restarting it in this case. Last confirmed on 2.6.38.6. + +SIGKILL signal may still cause PTRACE_EVENT_EXIT stop before actual +signal death. This may be changed in the future - SIGKILL is meant to +always immediately kill tasks even under ptrace. Last confirmed on +2.6.38.6. diff --git a/alice-strace/aclocal.m4 b/alice-strace/aclocal.m4 new file mode 100644 index 0000000..69994ae --- /dev/null +++ b/alice-strace/aclocal.m4 @@ -0,0 +1,1073 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +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, 2003, 2005, 2006, 2007, 2008, 2011 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. + +# serial 1 + +# 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.11' +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.11.6], [], + [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.11.6])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, 2003, 2005, 2011 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. + +# serial 1 + +# 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, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# 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. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 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. + +# serial 12 + +# 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", "GCJ", or "OBJC". +# 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 + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" 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 8's {/usr,}/bin/sh. + touch 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, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +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, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# 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. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 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"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 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. + +# serial 16 + +# 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. + +# 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.62])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], +[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], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [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([AM_PROG_MKDIR_P])dnl +# 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)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl 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 +]) + +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, 2003, 2005, 2008, 2011 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. + +# serial 1 + +# 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, 2005 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. + +# serial 2 + +# 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, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 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. + +# serial 5 + +# 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], +[ --][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 +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 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. + +# serial 4 + +# 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, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# 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. + +# serial 6 + +# 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 supports --run. +# If it does, 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 --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 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. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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. + +# serial 5 + +# _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])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# 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. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 ( + 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 + rm -f conftest.file + 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 + + 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)]) + +# Copyright (C) 2009, 2011 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. + +# serial 2 + +# 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], +[ --enable-silent-rules less verbose build output (undo: `make V=1') + --disable-silent-rules verbose build output (undo: `make V=0')]) +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, 2003, 2005, 2011 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. + +# serial 1 + +# 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, 2008, 2010 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. + +# serial 3 + +# _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, 2005, 2012 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. + +# serial 2 + +# _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}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +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/includedir.m4]) +m4_include([m4/long_long.m4]) +m4_include([m4/stat.m4]) +m4_include([m4/statfs.m4]) +m4_include([m4/warnings.m4]) diff --git a/alice-strace/alice-strace-graph b/alice-strace/alice-strace-graph new file mode 100755 index 0000000..d57e768 --- /dev/null +++ b/alice-strace/alice-strace-graph @@ -0,0 +1,336 @@ +#!/usr/bin/perl + +# This script processes strace -f output. It displays a graph of invoked +# subprocesses, and is useful for finding out what complex commands do. + +# You will probably want to invoke strace with -q as well, and with +# -s 100 to get complete filenames. + +# The script can also handle the output with strace -t, -tt, or -ttt. +# It will add elapsed time for each process in that case. + +# This script is Copyright (C) 1998 by Richard Braakman . + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +my %unfinished; + +# Scales for strace slowdown. Make configurable! +my $scale_factor = 3.5; + +while (<>) { + my ($pid, $call, $args, $result, $time); + chop; + + s/^(\d+)\s+//; + $pid = $1; + + if (s/^(\d\d):(\d\d):(\d\d)(?:\.(\d\d\d\d\d\d))? //) { + $time = $1 * 3600 + $2 * 60 + $3; + if (defined $4) { + $time = $time + $4 / 1000000; + $floatform = 1; + } + } elsif (s/^(\d+)\.(\d\d\d\d\d\d) //) { + $time = $1 + ($2 / 1000000); + $floatform = 1; + } + + if (s/ $//) { + $unfinished{$pid} = $_; + next; + } + + if (s/^<... \S+ resumed> //) { + unless (exists $unfinished{$pid}) { + print STDERR "$0: $ARGV: cannot find start of resumed call on line $."; + next; + } + $_ = $unfinished{$pid} . $_; + delete $unfinished{$pid}; + } + + if (/^--- SIG(\S+) \(.*\) ---$/) { + # $pid received signal $1 + # currently we don't do anything with this + next; + } + + if (/^\+\+\+ killed by SIG(\S+) \+\+\+$/) { + # $pid received signal $1 + handle_killed($pid, $time); + next; + } + + ($call, $args, $result) = /(\S+)\((.*)\)\s+= (.*)$/; + unless (defined $result) { + print STDERR "$0: $ARGV: $.: cannot parse line.\n"; + next; + } + + handle_trace($pid, $call, $args, $result, $time); +} + +display_trace(); + +exit 0; + +sub parse_str { + my ($in) = @_; + my $result = ""; + + while (1) { + if ($in =~ s/^\\(.)//) { + $result .= $1; + } elsif ($in =~ s/^\"//) { + if ($in =~ s/^\.\.\.//) { + return ("$result...", $in); + } + return ($result, $in); + } elsif ($in =~ s/([^\\\"]*)//) { + $result .= $1; + } else { + return (undef, $in); + } + } +} + +sub parse_one { + my ($in) = @_; + + if ($in =~ s/^\"//) { + ($tmp, $in) = parse_str($in); + if (not defined $tmp) { + print STDERR "$0: $ARGV: $.: cannot parse string.\n"; + return (undef, $in); + } + return ($tmp, $in); + } elsif ($in =~ s/^0x(\x+)//) { + return (hex $1, $in); + } elsif ($in =~ s/^(\d+)//) { + return (int $1, $in); + } else { + print STDERR "$0: $ARGV: $.: unrecognized element.\n"; + return (undef, $in); + } +} + +sub parseargs { + my ($in) = @_; + my @args = (); + my $tmp; + + while (length $in) { + if ($in =~ s/^\[//) { + my @subarr = (); + if ($in =~ s,^/\* (\d+) vars \*/\],,) { + push @args, $1; + } else { + while ($in !~ s/^\]//) { + ($tmp, $in) = parse_one($in); + defined $tmp or return undef; + push @subarr, $tmp; + unless ($in =~ /^\]/ or $in =~ s/^, //) { + print STDERR "$0: $ARGV: $.: missing comma in array.\n"; + return undef; + } + if ($in =~ s/^\.\.\.//) { + push @subarr, "..."; + } + } + push @args, \@subarr; + } + } elsif ($in =~ s/^\{//) { + my %subhash = (); + while ($in !~ s/^\}//) { + my $key; + unless ($in =~ s/^(\w+)=//) { + print STDERR "$0: $ARGV: $.: struct field expected.\n"; + return undef; + } + $key = $1; + ($tmp, $in) = parse_one($in); + defined $tmp or return undef; + $subhash{$key} = $tmp; + unless ($in =~ s/, //) { + print STDERR "$0: $ARGV: $.: missing comma in struct.\n"; + return undef; + } + } + push @args, \%subhash; + } else { + ($tmp, $in) = parse_one($in); + defined $tmp or return undef; + push @args, $tmp; + } + unless (length($in) == 0 or $in =~ s/^, //) { + print STDERR "$0: $ARGV: $.: missing comma.\n"; + return undef; + } + } + return @args; +} + + +my $depth = ""; + +# process info, indexed by pid. +# fields: +# parent pid number +# seq forks and execs for this pid, in sequence (array) + +# filename and argv (from latest exec) +# basename (derived from filename) +# argv[0] is modified to add the basename if it differs from the 0th argument. + +my %pr; + +sub handle_trace { + my ($pid, $call, $args, $result, $time) = @_; + my $p; + + if (defined $time and not defined $pr{$pid}{start}) { + $pr{$pid}{start} = $time; + } + + if ($call eq 'execve') { + return if $result != 0; + + my ($filename, $argv) = parseargs($args); + ($basename) = $filename =~ m/([^\/]*)$/; + if ($basename ne $$argv[0]) { + $$argv[0] = "$basename($$argv[0])"; + } + my $seq = $pr{$pid}{seq}; + $seq = [] if not defined $seq; + + push @$seq, ['EXEC', $filename, $argv]; + + $pr{$pid}{seq} = $seq; + } elsif ($call eq 'fork' || $call eq 'clone' || $call eq 'vfork') { + return if $result == 0; + + my $seq = $pr{$pid}{seq}; + $seq = [] if not defined $seq; + push @$seq, ['FORK', $result]; + $pr{$pid}{seq} = $seq; + $pr{$result}{parent} = $pid; + } elsif ($call eq '_exit') { + $pr{$pid}{end} = $time if defined $time; + } +} + +sub handle_killed { + my ($pid, $time) = @_; + $pr{$pid}{end} = $time if defined $time; +} + +sub straight_seq { + my ($pid) = @_; + my $seq = $pr{$pid}{seq}; + + for $elem (@$seq) { + if ($$elem[0] eq 'EXEC') { + my $argv = $$elem[2]; + print "$$elem[0] $$elem[1] @$argv\n"; + } elsif ($$elem[0] eq 'FORK') { + print "$$elem[0] $$elem[1]\n"; + } else { + print "$$elem[0]\n"; + } + } +} + +sub first_exec { + my ($pid) = @_; + my $seq = $pr{$pid}{seq}; + + for $elem (@$seq) { + if ($$elem[0] eq 'EXEC') { + return $elem; + } + } + return undef; +} + +sub display_pid_trace { + my ($pid, $lead) = @_; + my $i = 0; + my @seq = @{$pr{$pid}{seq}}; + my $elapsed; + + if (not defined first_exec($pid)) { + unshift @seq, ['EXEC', '', ['(anon)'] ]; + } + + if (defined $pr{$pid}{start} and defined $pr{$pid}{end}) { + $elapsed = $pr{$pid}{end} - $pr{$pid}{start}; + $elapsed /= $scale_factor; + if ($floatform) { + $elapsed = sprintf("%0.02f", $elapsed); + } else { + $elapsed = int $elapsed; + } + } + + for $elem (@seq) { + $i++; + if ($$elem[0] eq 'EXEC') { + my $argv = $$elem[2]; + if (defined $elapsed) { + print "$lead [$elapsed] @$argv\n"; + undef $elapsed; + } else { + print "$lead @$argv\n"; + } + } elsif ($$elem[0] eq 'FORK') { + if ($i == 1) { + if ($lead =~ /-$/) { + display_pid_trace($$elem[1], "$lead--+--"); + } else { + display_pid_trace($$elem[1], "$lead +--"); + } + } elsif ($i == @seq) { + display_pid_trace($$elem[1], "$lead `--"); + } else { + display_pid_trace($$elem[1], "$lead +--"); + } + } + if ($i == 1) { + $lead =~ s/\`--/ /g; + $lead =~ s/-/ /g; + $lead =~ s/\+/|/g; + } + } +} + +sub display_trace { + my ($startpid) = @_; + + $startpid = (keys %pr)[0]; + while ($pr{$startpid}{parent}) { + $startpid = $pr{$startpid}{parent}; + } + + display_pid_trace($startpid, ""); +} diff --git a/alice-strace/alice-strace-log-merge b/alice-strace/alice-strace-log-merge new file mode 100755 index 0000000..8ab2409 --- /dev/null +++ b/alice-strace/alice-strace-log-merge @@ -0,0 +1,43 @@ +#!/bin/sh + +show_usage() +{ + cat <<__EOF__ +Usage: ${0##*/} STRACE_LOG + +Finds all STRACE_LOG.PID files, adds PID prefix to every line, +then combines and sorts them, and prints result to standard output. + +It is assumed that STRACE_LOGs were produced by strace with -tt[t] +option which prints timestamps (otherwise sorting won't do any good). +__EOF__ +} + +if [ $# -ne 1 ]; then + show_usage >&2 + exit 1 +elif [ "$1" = '--help' ]; then + show_usage + exit 0 +fi + +logfile=$1 + +for file in "$logfile".*; do + [ -f "$file" ] || continue + suffix=${file#"$logfile".} + [ "$suffix" -gt 0 ] 2> /dev/null || + continue + pid=$(printf "%-5s" $suffix) + # Some strace logs have last line which is not '\n' terminated, + # so add extra newline to every file. + # grep -v '^$' removes empty lines which may result. + sed "s/^/$pid /" < "$file" + echo +done \ +| sort -s -k2,2 | grep -v '^$' + +rc=$? +[ $rc -eq 1 ] && + echo >&2 "${0##*/}: $logfile: strace output not found" +exit $rc diff --git a/alice-strace/alice-strace-retrieve-symbols b/alice-strace/alice-strace-retrieve-symbols new file mode 100755 index 0000000..5ee8af2 --- /dev/null +++ b/alice-strace/alice-strace-retrieve-symbols @@ -0,0 +1,200 @@ +#!/usr/bin/env python + +# Pretty-print the output of strace++, using gdb to print out the +# function/file/line info for stack traces +# +# argv[1] - output from strace++ (use -o option to create the trace file) +# +# (also requires the 'file' program to be installed in addition to 'gdb') +# +# by Philip Guo + +import os, sys, re, subprocess, cPickle +from collections import defaultdict, namedtuple +import commands + +# Return a symbol table, which is a dict where: +# +# Key: Filename +# Value: Dict where ... +# Key: hex address (string) +# Value: (function name, instruction offset, filename, line number) +# Any of those fields might be null when there isn't adequate debug info +# +# containing all the debug info needed to pretty-print the entries +# +# Input: fn is the filename of the strace++ output trace file +def create_symtab(fn_list): + # each element is a string representing a return address, e.g.,: + # '/lib32/libc-2.11.1.so:0x6990d:0xf769390d' + # it's a colon-separated triple containing: + # 1.) absolute path to the binary + # 2.) our best guess at the offset within that binary + # 3.) the original return address (in case the calculated offset is bogus) + return_addrs_set = set() + + for fn in fn_list: + # do a first pass to find ALL return addresses, so that we can call gdb to do a lookup + for line in open(fn): + # look for a raw stack trace of addrs like: + # [ /lib32/libc-2.11.1.so:0x67aef:0xf75ccaef /lib32/libc-2.11.1.so:0x67e06:0xf75cce06 ] + if line.strip() == '[]': + continue + if line[0] == '[': + first_rb = line.find(']') + stack_addrs = line[1:first_rb].strip() + if stack_addrs: + stack_addrs = stack_addrs.split() + for addr in stack_addrs: + return_addrs_set.add(addr) + + + # Key: filename + # Value: set of (addr_offset, original_addr) + d = defaultdict(set) + + for e in return_addrs_set: + try: + filename, addr_offset, original_addr = e.split(':') + except: + print e + assert False + d[filename].add((addr_offset, original_addr)) + + + # Key: filename + # Value: list of addresses to query (strings representing hex numbers) + filenames_to_addrs = defaultdict(list) + + + for filename, addrs_set in d.iteritems(): + # use the following heuristic to determine which address to use: + # - if the file is an 'executable', then use original_addr + # - otherwise if the file is a 'shared object', then use addr_offset + # + # shared objects are usually mmapped into "high" addresses and thus need an + # addr_offset, while exectuables usually do NOT need an offset and can instead + # use their original_addr to do symbol lookups + (file_out, _) = subprocess.Popen(['file', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + if 'shared object' in file_out: + for (addr_offset, _) in addrs_set: + filenames_to_addrs[filename].append(addr_offset) + elif 'executable' in file_out: + for (_, original_addr) in addrs_set: + filenames_to_addrs[filename].append(original_addr) + else: + print >> sys.stderr, "Warning:", filename, "doesn't appear to be an executable or shared library" + + + return get_symbol_table_using_gdb(filenames_to_addrs) + + +# some fields might be null if there isn't adequate debug info +SymbolTableEntry = namedtuple('SymbolTableEntry', + ['func_name', 'instr_offset', 'src_filename', 'src_line_num']) + +# Use gdb to probe the debug info of binaries in order to return a symbol +# table, which is structured as a dict where: +# +# Key: Filename +# Value: Dict where ... +# Key: hex address (string) +# Value: a SymbolTableEntry object +# +# The advantage of using gdb is that you can usually get file/line info, and gdb +# supports "splitdebug" binaries where the debug info is stored in a separate +# binary linked with .gnu_debuglink +# (See: http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html) +# +# The disadvantage is that gdb is quite heavyweight. Also, when you can't get +# .gnu_debuglink to work with custom paths (e.g., on Chrome OS), then gdb +# won't print out the proper debug info. TODO: try to look into improving this! +# +# Input: filenames_to_addrs is a dict mapping each binary filename to a list of +# addresses (strings representing hex numbers) on which to query for debug info +def get_symbol_table_using_gdb(filenames_to_addrs): + ret = defaultdict(dict) + + lineRE = re.compile('Line (\d+) of "(.*)" starts at address 0x\S+ <(.*?)> and ends at 0x\S+') + # even if there's no line number info, it might give you the function name + # e.g., in "No line number information available for address 0x857 <_dl_start_user>" + # at least you can find out that the function name is _dl_start_user + noLineInfoRE = re.compile('No line number information available for address 0x\S+ <(.*?)>') + + # for each file, create a gdb script to introspect all elements of addr_list + for filename, addrs_lst in filenames_to_addrs.iteritems(): + # now create a gdb script with some filler and the critical line that makes + # the query for debug info: 'info line *' + tmp_gdb_script = open('temp.gdb', 'w') + for addr in sorted(addrs_lst): + print >> tmp_gdb_script, 'echo ===\\n' + print >> tmp_gdb_script, 'echo ' + addr + '\\n' + print >> tmp_gdb_script, 'info line *' + addr + tmp_gdb_script.close() # force write to disk, or else temp.gdb will be empty! + + # now run: + # gdb -batch -x temp.gdb + # and harvest its stdout + # ( -batch mode allows gdb to produce 'clean' output and be run as a subprocess + # see: http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_8.html ) + (gdb_stdout, gdb_stderr) = subprocess.Popen(['gdb', filename, '-batch', '-x', 'temp.gdb'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + if gdb_stderr: + print >> sys.stderr, "GDB warnings while processing %s:" % (filename,), gdb_stderr, + + # parse the output of gdb, where each record is: + # === + # + # one or more lines containing the output of gdb (which should be appended together later) + tokens = gdb_stdout.split('===') + for t in tokens: + if not t: + continue + # collapse all space-like characters into a single space to simplify parsing later + t = re.sub('\s+', ' ', t).strip() + hex_addr = t.split()[0].strip() + # gdb output is the REST of the line + gdb_out = t[len(hex_addr):].strip() + #print hex_addr, gdb_out + + assert hex_addr.startswith('0x') + + m = lineRE.match(gdb_out) + if m: + (linenum, src_filename, funcname) = m.groups() + # split up "funcname+offset", e.g., 'main+21' + s = funcname.split('+') + # don't just assume that funcname splits into either 1 or 2 components. Sometimes + # there are weird function names like "STRING::operator+=(char const*)+91" + # containing a '+' in the function name!!! + if len(s) > 1: + offset = int(s[-1]) # the FINAL component should be the offset number + funcname = '+'.join(s[:-1]) # join the REST of the components into funcname + else: + offset = 0 + funcname = s[0] + + ret[filename][hex_addr] = tuple(SymbolTableEntry(funcname, offset, src_filename, int(linenum))) + else: + m = noLineInfoRE.match(gdb_out) + if m: + funcname = m.group(1) + + s = funcname.split('+') + assert len(s) <= 2 + offset = 0 + if len(s) == 2: + offset = int(s[1]) + funcname = s[0] + ret[filename][hex_addr] = tuple(SymbolTableEntry(funcname, offset, None, None)) + + return ret + + +strace_file_prefix = sys.argv[1] +output_file = strace_file_prefix + '.symtab' +stack_files = commands.getoutput("ls " + strace_file_prefix + "*stackinfo*").split() + +symtab = create_symtab(stack_files) + +cPickle.dump(symtab, open(output_file, "wb")) diff --git a/alice-strace/alice-strace.1 b/alice-strace/alice-strace.1 new file mode 100644 index 0000000..d1197d1 --- /dev/null +++ b/alice-strace/alice-strace.1 @@ -0,0 +1,29 @@ +.\" Copyright (c) 1991, 1992 Paul Kranenburg +.\" Copyright (c) 1993 Branko Lankester +.\" 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. +.TH "ALICE-STRACE" "1" "2010-03-30" "" "" +.SH "NAME" +alice\-strace \- customization of the strace utility (with some extensions of the strace+ utility) to help the alice tool diff --git a/alice-strace/alice-strace.c b/alice-strace/alice-strace.c new file mode 100644 index 0000000..8e4d1f3 --- /dev/null +++ b/alice-strace/alice-strace.c @@ -0,0 +1,2423 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_PRCTL +# include +#endif +#if defined(IA64) +# include +#endif +/* In some libc, these aren't declared. Do it ourself: */ +extern char **environ; +extern int optind; +extern char *optarg; + + +#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 + +/* Glue for systems without a MMU that cannot provide fork() */ +#if !defined(HAVE_FORK) +# undef NOMMU_SYSTEM +# define NOMMU_SYSTEM 1 +#endif +#if NOMMU_SYSTEM +# define fork() vfork() +#endif + +#ifdef LIBUNWIND +// integrate libunwind into strace ... from libunwind-1.0/tests/test-ptrace.c +unw_addr_space_t libunwind_as; +#endif + + +cflag_t cflag = CFLAG_NONE; +unsigned int followfork = 0; +unsigned int ptrace_setoptions = 0; +unsigned int xflag = 0; +bool need_fork_exec_workarounds = 0; +bool debug_flag = 0; +bool Tflag = 0; +unsigned int qflag = 0; +/* Which WSTOPSIG(status) value marks syscall traps? */ +static unsigned int syscall_trap_sig = SIGTRAP; +static unsigned int tflag = 0; +static bool iflag = 0; +static bool rflag = 0; +static bool print_pid_pfx = 0; + +/* -I n */ +enum { + INTR_NOT_SET = 0, + INTR_ANYWHERE = 1, /* don't block/ignore any signals */ + INTR_WHILE_WAIT = 2, /* block fatal signals while decoding syscall. default */ + INTR_NEVER = 3, /* block fatal signals. default if '-o FILE PROG' */ + INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */ + NUM_INTR_OPTS +}; +static int opt_intr; +/* We play with signal mask only if this mode is active: */ +#define interactive (opt_intr == INTR_WHILE_WAIT) + +/* + * daemonized_tracer supports -D option. + * With this option, strace forks twice. + * Unlike normal case, with -D *grandparent* process exec's, + * becoming a traced process. Child exits (this prevents traced process + * from having children it doesn't expect to have), and grandchild + * attaches to grandparent similarly to strace -p PID. + * This allows for more transparent interaction in cases + * when process and its parent are communicating via signals, + * wait() etc. Without -D, strace process gets lodged in between, + * disrupting parent<->child link. + */ +static bool daemonized_tracer = 0; + +#if USE_SEIZE +static int post_attach_sigstop = TCB_IGNORE_ONE_SIGSTOP; +# define use_seize (post_attach_sigstop == 0) +#else +# define post_attach_sigstop TCB_IGNORE_ONE_SIGSTOP +# define use_seize 0 +#endif + +/* Sometimes we want to print only succeeding syscalls. */ +bool not_failing_only = 0; + +/* Show path associated with fd arguments */ +bool 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 = 0; +static int strace_child = 0; +static int strace_tracer_pid = 0; + +static char *username = NULL; +static uid_t run_uid; +static gid_t run_gid; + +unsigned int max_strlen = DEFAULT_STRLEN; +static int acolumn = DEFAULT_ACOLUMN; +static char *acolumn_spaces; + +static char *outfname = NULL; +/* If -ff, points to stderr. Else, it's our common output log */ +static FILE *shared_log; +static int shared_dump_log_fd; +static int shared_stackinfo_f; + +int output_stacktraces = 0; +int use_libunwind = 1; + +struct tcb *printing_tcp = NULL; +static struct tcb *current_tcp; + +static struct tcb **tcbtab; +static unsigned int nprocs, tcbtabsize; +static const char *progname; + +unsigned os_release; /* generated from uname()'s u.release */ + +static int detach(struct tcb *tcp); +static int trace(void); +static void cleanup(void); +static void interrupt(int sig); +static sigset_t empty_set, blocked_set; + +#ifdef HAVE_SIG_ATOMIC_T +static volatile sig_atomic_t interrupted; +#else +static volatile int interrupted; +#endif + +#ifndef HAVE_STRERROR + +#if !HAVE_DECL_SYS_ERRLIST +extern int sys_nerr; +extern char *sys_errlist[]; +#endif + +const char * +strerror(int err_no) +{ + static char buf[sizeof("Unknown error %d") + sizeof(int)*3]; + + if (err_no < 1 || err_no >= sys_nerr) { + sprintf(buf, "Unknown error %d", err_no); + return buf; + } + return sys_errlist[err_no]; +} + +#endif /* HAVE_STERRROR */ + +static void +usage(FILE *ofp, int exitval) +{ + fprintf(ofp, "\ +usage: alice-strace [-CdffhiqrtttTvVxxy] [-I n] [-e expr]...\n\ + [-a column] [-o file] [-s strsize] [-P path]...\n\ + -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\ + or: alice-strace -c[df] [-I n] [-e expr]... [-O overhead] [-S sortby]\n\ + -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\ +-c -- count time, calls, and errors for each syscall and report summary\n\ +-C -- like -c but also print regular output\n\ +-d -- enable debug output to stderr\n\ +-D -- run tracer process as a detached grandchild, not as parent\n\ +-f -- follow forks, -ff -- with output into separate files\n\ +-i -- print instruction pointer at time of syscall\n\ +-q -- suppress messages about attaching, detaching, etc.\n\ +-r -- print relative timestamp, -t -- absolute timestamp, -tt -- with usecs\n\ +-T -- print time spent in each syscall\n\ +-v -- verbose mode: print unabbreviated argv, stat, termios, etc. args\n\ +-x -- print non-ascii strings in hex, -xx -- print all strings in hex\n\ +-y -- print paths associated with file descriptor arguments\n\ +-h -- print help message, -V -- print version\n\ +-a column -- alignment COLUMN for printing syscall results (default %d)\n\ +-b execve -- detach on this syscall\n\ +-e expr -- a qualifying expression: option=[!]all or option=[!]val1[,val2]...\n\ + options: trace, abbrev, verbose, raw, signal, read, write\n\ +-I interruptible --\n\ + 1: no signals are blocked\n\ + 2: fatal signals are blocked while decoding syscall (default)\n\ + 3: fatal signals are always blocked (default if '-o FILE PROG')\n\ + 4: fatal signals and SIGTSTP (^Z) are always blocked\n\ + (useful to make 'strace -o FILE PROG' not stop on ^Z)\n\ +-o file -- send trace output to FILE instead of stderr\n\ +-O overhead -- set overhead for tracing syscalls to OVERHEAD usecs\n\ +-p pid -- trace process with process id PID, may be repeated\n\ +-s strsize -- limit length of print strings to STRSIZE chars (default %d)\n\ +-S sortby -- sort syscall counts by: time, calls, name, nothing (default %s)\n\ +-u username -- run command as username handling setuid and/or setgid\n\ +-E var=val -- put var=val in the environment for command\n\ +-E var -- remove var from the environment for command\n\ +-P path -- trace accesses to path\n\ +-k -- obtain stack traces (using libunwind by default, if compiled with it)\n\ +-w -- obtain stack trace by walking up the frame pointer chain\n\ + rather than using libunwind (FASTER but requires frame pointers!)\n\ +" +/* ancient, no one should use it +-F -- attempt to follow vforks (deprecated, use -f)\n\ + */ +/* this is broken, so don't document it +-z -- print only succeeding syscalls\n\ + */ +, DEFAULT_ACOLUMN, DEFAULT_STRLEN, DEFAULT_SORTBY); + exit(exitval); +} + +static void die(void) __attribute__ ((noreturn)); +static void die(void) +{ + if (strace_tracer_pid == getpid()) { + cflag = 0; + cleanup(); + } + exit(1); +} + +static void verror_msg(int err_no, const char *fmt, va_list p) +{ + char *msg; + + fflush(NULL); + + /* We want to print entire message with single fprintf to ensure + * message integrity if stderr is shared with other programs. + * Thus we use vasprintf + single fprintf. + */ + msg = NULL; + if (vasprintf(&msg, fmt, p) >= 0) { + if (err_no) + fprintf(stderr, "%s: %s: %s\n", progname, msg, strerror(err_no)); + else + fprintf(stderr, "%s: %s\n", progname, msg); + free(msg); + } else { + /* malloc in vasprintf failed, try it without malloc */ + fprintf(stderr, "%s: ", progname); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + } + /* We don't switch stderr to buffered, thus fprintf(stderr) + * always flushes its output and this is not necessary: */ + /* fflush(stderr); */ +} + +void error_msg(const char *fmt, ...) +{ + va_list p; + va_start(p, fmt); + verror_msg(0, fmt, p); + va_end(p); +} + +void error_msg_and_die(const char *fmt, ...) +{ + va_list p; + va_start(p, fmt); + verror_msg(0, fmt, p); + die(); +} + +void perror_msg(const char *fmt, ...) +{ + va_list p; + va_start(p, fmt); + verror_msg(errno, fmt, p); + va_end(p); +} + +void perror_msg_and_die(const char *fmt, ...) +{ + va_list p; + va_start(p, fmt); + verror_msg(errno, fmt, p); + die(); +} + +void die_out_of_memory(void) +{ + static bool recursed = 0; + if (recursed) + exit(1); + recursed = 1; + error_msg_and_die("Out of memory"); +} + +static void +error_opt_arg(int opt, const char *arg) +{ + error_msg_and_die("Invalid -%c argument: '%s'", opt, arg); +} + +#if USE_SEIZE +static int +ptrace_attach_or_seize(int pid) +{ + int r; + if (!use_seize) + return ptrace(PTRACE_ATTACH, pid, 0, 0); + r = ptrace(PTRACE_SEIZE, pid, 0, 0); + if (r) + return r; + r = ptrace(PTRACE_INTERRUPT, pid, 0, 0); + return r; +} +#else +# define ptrace_attach_or_seize(pid) ptrace(PTRACE_ATTACH, (pid), 0, 0) +#endif + +/* + * Used when we want to unblock stopped traced process. + * Should be only used with PTRACE_CONT, PTRACE_DETACH and PTRACE_SYSCALL. + * Returns 0 on success or if error was ESRCH + * (presumably process was killed while we talk to it). + * Otherwise prints error message and returns -1. + */ +static int +ptrace_restart(int op, struct tcb *tcp, int sig) +{ + int err; + const char *msg; + + errno = 0; + ptrace(op, tcp->pid, (void *) 0, (long) sig); + err = errno; + if (!err) + return 0; + + msg = "SYSCALL"; + if (op == PTRACE_CONT) + msg = "CONT"; + if (op == PTRACE_DETACH) + msg = "DETACH"; +#ifdef PTRACE_LISTEN + if (op == PTRACE_LISTEN) + msg = "LISTEN"; +#endif + /* + * Why curcol != 0? Otherwise sometimes we get this: + * + * 10252 kill(10253, SIGKILL) = 0 + * 10253 ...next decode... + * + * 10252 died after we retrieved syscall exit data, + * but before we tried to restart it. Log looks ugly. + */ + if (current_tcp && current_tcp->curcol != 0) { + tprintf(" \n", msg, strerror(err)); + line_ended(); + } + if (err == ESRCH) + return 0; + errno = err; + perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%d)", msg, tcp->pid, sig); + return -1; +} + +static void +set_cloexec_flag(int fd) +{ + int flags, newflags; + + flags = fcntl(fd, F_GETFD); + if (flags < 0) { + /* Can happen only if fd is bad. + * Should never happen: if it does, we have a bug + * in the caller. Therefore we just abort + * instead of propagating the error. + */ + perror_msg_and_die("fcntl(%d, F_GETFD)", fd); + } + + newflags = flags | FD_CLOEXEC; + if (flags == newflags) + return; + + fcntl(fd, F_SETFD, newflags); /* never fails */ +} + +static void kill_save_errno(pid_t pid, int sig) +{ + int saved_errno = errno; + + (void) kill(pid, sig); + errno = saved_errno; +} + +/* + * When strace is setuid executable, we have to swap uids + * before and after filesystem and process management operations. + */ +static void +swap_uid(void) +{ + int euid = geteuid(), uid = getuid(); + + if (euid != uid && setreuid(euid, uid) < 0) { + perror_msg_and_die("setreuid"); + } +} + +#if _LFS64_LARGEFILE +# define fopen_for_output fopen64 +# define struct_stat struct stat64 +# define stat_file stat64 +# define struct_dirent struct dirent64 +# define read_dir readdir64 +# define struct_rlimit struct rlimit64 +# define set_rlimit setrlimit64 +#else +# define fopen_for_output fopen +# define struct_stat struct stat +# define stat_file stat +# define struct_dirent struct dirent +# define read_dir readdir +# define struct_rlimit struct rlimit +# define set_rlimit setrlimit +#endif + +static FILE * +strace_fopen(const char *path) +{ + FILE *fp; + + swap_uid(); + fp = fopen_for_output(path, "w"); + if (!fp) + perror_msg_and_die("Can't fopen '%s'", path); + swap_uid(); + set_cloexec_flag(fileno(fp)); + return fp; +} + +static int popen_pid = 0; + +#ifndef _PATH_BSHELL +# define _PATH_BSHELL "/bin/sh" +#endif + +/* + * We cannot use standard popen(3) here because we have to distinguish + * popen child process from other processes we trace, and standard popen(3) + * does not export its child's pid. + */ +static FILE * +strace_popen(const char *command) +{ + FILE *fp; + int fds[2]; + + swap_uid(); + if (pipe(fds) < 0) + perror_msg_and_die("pipe"); + + set_cloexec_flag(fds[1]); /* never fails */ + + popen_pid = vfork(); + if (popen_pid == -1) + perror_msg_and_die("vfork"); + + if (popen_pid == 0) { + /* child */ + close(fds[1]); + if (fds[0] != 0) { + if (dup2(fds[0], 0)) + perror_msg_and_die("dup2"); + close(fds[0]); + } + execl(_PATH_BSHELL, "sh", "-c", command, NULL); + perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL); + } + + /* parent */ + close(fds[0]); + swap_uid(); + fp = fdopen(fds[1], "w"); + if (!fp) + die_out_of_memory(); + return fp; +} + +void +tprintf(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + if (current_tcp) { + int n = strace_vfprintf(current_tcp->outf, fmt, args); + if (n < 0) { + if (current_tcp->outf != stderr) + perror_msg("%s", outfname); + } else + current_tcp->curcol += n; + } + va_end(args); +} + +void +tprintstackinfo(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + if (current_tcp) { + int n = strace_vfprintf(current_tcp->out_stack_f, fmt, args); + } + va_end(args); +} + +void +tdump(void *addr, long len) +{ + long ret = write(current_tcp->out_dump_f, addr, len); + assert(ret == len); +} + + +void +tprints(const char *str) +{ + if (current_tcp) { + int n = fputs_unlocked(str, current_tcp->outf); + if (n >= 0) { + current_tcp->curcol += strlen(str); + return; + } + if (current_tcp->outf != stderr) + perror_msg("%s", outfname); + } +} + +void +line_ended(void) +{ + if (current_tcp) { + current_tcp->curcol = 0; + fflush(current_tcp->outf); + } + if (printing_tcp) { + printing_tcp->curcol = 0; + printing_tcp = NULL; + } +} + +void +printleader(struct tcb *tcp) +{ + /* If -ff, "previous tcb we printed" is always the same as current, + * because we have per-tcb output files. + */ + if (followfork >= 2) + printing_tcp = tcp; + + if (printing_tcp) { + current_tcp = printing_tcp; + if (printing_tcp->curcol != 0 && (followfork < 2 || printing_tcp == tcp)) { + /* + * case 1: we have a shared log (i.e. not -ff), and last line + * wasn't finished (same or different tcb, doesn't matter). + * case 2: split log, we are the same tcb, but our last line + * didn't finish ("SIGKILL nuked us after syscall entry" etc). + */ + tprints(" \n"); + printing_tcp->curcol = 0; + } + } + + printing_tcp = tcp; + current_tcp = tcp; + current_tcp->curcol = 0; + + if (print_pid_pfx) + tprintf("%-5d ", tcp->pid); + else if (nprocs > 1 && !outfname) + tprintf("[pid %5u] ", tcp->pid); + + if (tflag) { + char str[sizeof("HH:MM:SS")]; + struct timeval tv, dtv; + static struct timeval otv; + + gettimeofday(&tv, NULL); + if (rflag) { + if (otv.tv_sec == 0) + otv = tv; + tv_sub(&dtv, &tv, &otv); + tprintf("%6ld.%06ld ", + (long) dtv.tv_sec, (long) dtv.tv_usec); + otv = tv; + } + else if (tflag > 2) { + tprintf("%ld.%06ld ", + (long) tv.tv_sec, (long) tv.tv_usec); + } + else { + time_t local = tv.tv_sec; + strftime(str, sizeof(str), "%T", localtime(&local)); + if (tflag > 1) + tprintf("%s.%06ld ", str, (long) tv.tv_usec); + else + tprintf("%s ", str); + } + } + if (iflag) + printcall(tcp); +} + +void +tabto(void) +{ + if (current_tcp->curcol < acolumn) + tprints(acolumn_spaces + current_tcp->curcol); +} + +/* Should be only called directly *after successful attach* to a tracee. + * Otherwise, "strace -oFILE -ff -p" + * may create bogus empty FILE., and then die. + */ +static void +newoutf(struct tcb *tcp) +{ + tcp->outf = shared_log; /* if not -ff mode, the same file is for all */ + tcp->out_dump_f = shared_dump_log_fd; /* if not -ff mode, the same file is for all */ + tcp->out_stack_f = shared_stackinfo_f; /* if not -ff mode, the same file is for all */ + if (followfork >= 2) { + char name[520 + sizeof(int) * 3]; + sprintf(name, "%.512s.%u", outfname, tcp->pid); + tcp->outf = strace_fopen(name); + sprintf(name, "%.512s.byte_dump.%u", outfname, tcp->pid); + tcp->out_dump_f = open(name, O_CREAT | O_WRONLY | O_TRUNC, 00666); + sprintf(name, "%.512s.stackinfo.%u", outfname, tcp->pid); + tcp->out_stack_f = fopen(name, "w+"); + } +} + +static void +expand_tcbtab(void) +{ + /* Allocate some more TCBs and expand the table. + We don't want to relocate the TCBs because our + callers have pointers and it would be a pain. + So tcbtab is a table of pointers. Since we never + free the TCBs, we allocate a single chunk of many. */ + int i = tcbtabsize; + struct tcb *newtcbs = calloc(tcbtabsize, sizeof(newtcbs[0])); + struct tcb **newtab = realloc(tcbtab, tcbtabsize * 2 * sizeof(tcbtab[0])); + if (!newtab || !newtcbs) + die_out_of_memory(); + tcbtabsize *= 2; + tcbtab = newtab; + while (i < tcbtabsize) + tcbtab[i++] = newtcbs++; +} + +static struct tcb * +alloctcb(int pid) +{ + int i; + struct tcb *tcp; + + if (nprocs == tcbtabsize) + expand_tcbtab(); + + for (i = 0; i < tcbtabsize; i++) { + tcp = tcbtab[i]; + if ((tcp->flags & TCB_INUSE) == 0) { + memset(tcp, 0, sizeof(*tcp)); + tcp->pid = pid; + tcp->flags = TCB_INUSE; + + tcp->mmap_cache = NULL; + tcp->mmap_cache_size = 0; + +#ifdef LIBUNWIND + if (use_libunwind) + tcp->libunwind_ui = _UPT_create(tcp->pid); +#endif + +#if SUPPORTED_PERSONALITIES > 1 + tcp->currpers = current_personality; +#endif + nprocs++; + if (debug_flag) + fprintf(stderr, "new tcb for pid %d, active tcbs:%d\n", tcp->pid, nprocs); + return tcp; + } + } + error_msg_and_die("bug in alloctcb"); +} + +static void +droptcb(struct tcb *tcp) +{ + if (tcp->pid == 0) + return; + + nprocs--; + if (debug_flag) + fprintf(stderr, "dropped tcb for pid %d, %d remain\n", tcp->pid, nprocs); + + if (tcp->outf) { + if (followfork >= 2) { + if (tcp->curcol != 0) + fprintf(tcp->outf, " \n"); + fclose(tcp->outf); + } else { + if (printing_tcp == tcp && tcp->curcol != 0) + fprintf(tcp->outf, " \n"); + fflush(tcp->outf); + } + } + + delete_mmap_cache(tcp); +#ifdef LIBUNWIND + if (use_libunwind) + _UPT_destroy(tcp->libunwind_ui); +#endif + + if (current_tcp == tcp) + current_tcp = NULL; + if (printing_tcp == tcp) + printing_tcp = NULL; + + memset(tcp, 0, sizeof(*tcp)); +} + +/* detach traced process; continue with sig + * Never call DETACH twice on the same process as both unattached and + * attached-unstopped processes give the same ESRCH. For unattached process we + * would SIGSTOP it and wait for its SIGSTOP notification forever. + */ +static int +detach(struct tcb *tcp) +{ + int error; + int status, sigstop_expected; + + if (tcp->flags & TCB_BPTSET) + clearbpt(tcp); + + /* + * Linux wrongly insists the child be stopped + * before detaching. Arghh. We go through hoops + * to make a clean break of things. + */ +#if defined(SPARC) +# undef PTRACE_DETACH +# define PTRACE_DETACH PTRACE_SUNDETACH +#endif + + error = 0; + sigstop_expected = 0; + if (tcp->flags & TCB_ATTACHED) { + /* + * We attached but possibly didn't see the expected SIGSTOP. + * We must catch exactly one as otherwise the detached process + * would be left stopped (process state T). + */ + sigstop_expected = (tcp->flags & TCB_IGNORE_ONE_SIGSTOP); + error = ptrace(PTRACE_DETACH, tcp->pid, (char *) 1, 0); + if (error == 0) { + /* On a clear day, you can see forever. */ + } + else if (errno != ESRCH) { + /* Shouldn't happen. */ + perror_msg("detach: ptrace(PTRACE_DETACH, ...)"); + } + else if (my_tkill(tcp->pid, 0) < 0) { + if (errno != ESRCH) + perror_msg("detach: checking sanity"); + } + else if (!sigstop_expected && my_tkill(tcp->pid, SIGSTOP) < 0) { + if (errno != ESRCH) + perror_msg("detach: stopping child"); + } + else + sigstop_expected = 1; + } + + if (sigstop_expected) { + for (;;) { +#ifdef __WALL + if (waitpid(tcp->pid, &status, __WALL) < 0) { + if (errno == ECHILD) /* Already gone. */ + break; + if (errno != EINVAL) { + perror_msg("detach: waiting"); + break; + } +#endif /* __WALL */ + /* No __WALL here. */ + if (waitpid(tcp->pid, &status, 0) < 0) { + if (errno != ECHILD) { + perror_msg("detach: waiting"); + break; + } +#ifdef __WCLONE + /* If no processes, try clones. */ + if (waitpid(tcp->pid, &status, __WCLONE) < 0) { + if (errno != ECHILD) + perror_msg("detach: waiting"); + break; + } +#endif /* __WCLONE */ + } +#ifdef __WALL + } +#endif + if (!WIFSTOPPED(status)) { + /* Au revoir, mon ami. */ + break; + } + if (WSTOPSIG(status) == SIGSTOP) { + ptrace_restart(PTRACE_DETACH, tcp, 0); + break; + } + error = ptrace_restart(PTRACE_CONT, tcp, + WSTOPSIG(status) == syscall_trap_sig ? 0 + : WSTOPSIG(status)); + if (error < 0) + break; + } + } + + if (!qflag && (tcp->flags & TCB_ATTACHED)) + fprintf(stderr, "Process %u detached\n", tcp->pid); + + droptcb(tcp); + + return error; +} + +static void +process_opt_p_list(char *opt) +{ + while (*opt) { + /* + * We accept -p PID,PID; -p "`pidof PROG`"; -p "`pgrep PROG`". + * pidof uses space as delim, pgrep uses newline. :( + */ + int pid; + char *delim = opt + strcspn(opt, ", \n\t"); + char c = *delim; + + *delim = '\0'; + pid = string_to_uint(opt); + if (pid <= 0) { + error_msg_and_die("Invalid process id: '%s'", opt); + } + if (pid == strace_tracer_pid) { + error_msg_and_die("I'm sorry, I can't let you do that, Dave."); + } + *delim = c; + alloctcb(pid); + if (c == '\0') + break; + opt = delim + 1; + } +} + +static void +startup_attach(void) +{ + int tcbi; + struct tcb *tcp; + + /* + * Block user interruptions as we would leave the traced + * process stopped (process state T) if we would terminate in + * between PTRACE_ATTACH and wait4() on SIGSTOP. + * We rely on cleanup() from this point on. + */ + if (interactive) + sigprocmask(SIG_BLOCK, &blocked_set, NULL); + + if (daemonized_tracer) { + pid_t pid = fork(); + if (pid < 0) { + perror_msg_and_die("fork"); + } + if (pid) { /* parent */ + /* + * Wait for grandchild to attach to straced process + * (grandparent). Grandchild SIGKILLs us after it attached. + * Grandparent's wait() is unblocked by our death, + * it proceeds to exec the straced program. + */ + pause(); + _exit(0); /* paranoia */ + } + /* grandchild */ + /* We will be the tracer process. Remember our new pid: */ + strace_tracer_pid = getpid(); + } + + for (tcbi = 0; tcbi < tcbtabsize; tcbi++) { + tcp = tcbtab[tcbi]; + + if (!(tcp->flags & TCB_INUSE)) + continue; + + /* Is this a process we should attach to, but not yet attached? */ + if (tcp->flags & TCB_ATTACHED) + continue; /* no, we already attached it */ + + if (followfork && !daemonized_tracer) { + char procdir[sizeof("/proc/%d/task") + sizeof(int) * 3]; + DIR *dir; + + sprintf(procdir, "/proc/%d/task", tcp->pid); + dir = opendir(procdir); + if (dir != NULL) { + unsigned int ntid = 0, nerr = 0; + struct_dirent *de; + + while ((de = read_dir(dir)) != NULL) { + struct tcb *cur_tcp; + int tid; + + if (de->d_fileno == 0) + continue; + /* we trust /proc filesystem */ + tid = atoi(de->d_name); + if (tid <= 0) + continue; + ++ntid; + if (ptrace_attach_or_seize(tid) < 0) { + ++nerr; + if (debug_flag) + fprintf(stderr, "attach to pid %d failed\n", tid); + continue; + } + if (debug_flag) + fprintf(stderr, "attach to pid %d succeeded\n", tid); + cur_tcp = tcp; + if (tid != tcp->pid) + cur_tcp = alloctcb(tid); + cur_tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop; + newoutf(cur_tcp); + } + closedir(dir); + if (interactive) { + sigprocmask(SIG_SETMASK, &empty_set, NULL); + if (interrupted) + goto ret; + sigprocmask(SIG_BLOCK, &blocked_set, NULL); + } + ntid -= nerr; + if (ntid == 0) { + perror_msg("attach: ptrace(PTRACE_ATTACH, ...)"); + droptcb(tcp); + continue; + } + if (!qflag) { + fprintf(stderr, ntid > 1 +? "Process %u attached with %u threads\n" +: "Process %u attached\n", + tcp->pid, ntid); + } + if (!(tcp->flags & TCB_ATTACHED)) { + /* -p PID, we failed to attach to PID itself + * but did attach to some of its sibling threads. + * Drop PID's tcp. + */ + droptcb(tcp); + } + continue; + } /* if (opendir worked) */ + } /* if (-f) */ + if (ptrace_attach_or_seize(tcp->pid) < 0) { + perror_msg("attach: ptrace(PTRACE_ATTACH, ...)"); + droptcb(tcp); + continue; + } + tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop; + newoutf(tcp); + if (debug_flag) + fprintf(stderr, "attach to pid %d (main) succeeded\n", tcp->pid); + + if (daemonized_tracer) { + /* + * Make parent go away. + * Also makes grandparent's wait() unblock. + */ + kill(getppid(), SIGKILL); + } + + if (!qflag) + fprintf(stderr, + "Process %u attached\n", + tcp->pid); + } /* for each tcbtab[] */ + + ret: + if (interactive) + sigprocmask(SIG_SETMASK, &empty_set, NULL); +} + +/* Stack-o-phobic exec helper, in the hope to work around + * NOMMU + "daemonized tracer" difficulty. + */ +struct exec_params { + int fd_to_close; + uid_t run_euid; + gid_t run_egid; + char **argv; + char *pathname; +}; +static struct exec_params params_for_tracee; +static void __attribute__ ((noinline, noreturn)) +exec_or_die(void) +{ + struct exec_params *params = ¶ms_for_tracee; + + if (params->fd_to_close >= 0) + close(params->fd_to_close); + if (!daemonized_tracer && !use_seize) { + if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0) { + perror_msg_and_die("ptrace(PTRACE_TRACEME, ...)"); + } + } + + if (username != NULL) { + /* + * It is important to set groups before we + * lose privileges on setuid. + */ + if (initgroups(username, run_gid) < 0) { + perror_msg_and_die("initgroups"); + } + if (setregid(run_gid, params->run_egid) < 0) { + perror_msg_and_die("setregid"); + } + if (setreuid(run_uid, params->run_euid) < 0) { + perror_msg_and_die("setreuid"); + } + } + else if (geteuid() != 0) + if (setreuid(run_uid, run_uid) < 0) { + perror_msg_and_die("setreuid"); + } + + if (!daemonized_tracer) { + /* + * Induce a ptrace stop. Tracer (our parent) + * will resume us with PTRACE_SYSCALL and display + * the immediately following execve syscall. + * Can't do this on NOMMU systems, we are after + * vfork: parent is blocked, stopping would deadlock. + */ + if (!NOMMU_SYSTEM) + kill(getpid(), SIGSTOP); + } else { + alarm(3); + /* we depend on SIGCHLD set to SIG_DFL by init code */ + /* if it happens to be SIG_IGN'ed, wait won't block */ + wait(NULL); + alarm(0); + } + + execv(params->pathname, params->argv); + perror_msg_and_die("exec"); +} + +static void +startup_child(char **argv) +{ + struct_stat statbuf; + const char *filename; + char pathname[MAXPATHLEN]; + int pid; + struct tcb *tcp; + + filename = argv[0]; + if (strchr(filename, '/')) { + if (strlen(filename) > sizeof pathname - 1) { + errno = ENAMETOOLONG; + perror_msg_and_die("exec"); + } + strcpy(pathname, filename); + } +#ifdef USE_DEBUGGING_EXEC + /* + * Debuggers customarily check the current directory + * first regardless of the path but doing that gives + * security geeks a panic attack. + */ + else if (stat_file(filename, &statbuf) == 0) + strcpy(pathname, filename); +#endif /* USE_DEBUGGING_EXEC */ + else { + const char *path; + int m, n, len; + + for (path = getenv("PATH"); path && *path; path += m) { + const char *colon = strchr(path, ':'); + if (colon) { + n = colon - path; + m = n + 1; + } + else + m = n = strlen(path); + if (n == 0) { + if (!getcwd(pathname, MAXPATHLEN)) + continue; + len = strlen(pathname); + } + else if (n > sizeof pathname - 1) + continue; + else { + strncpy(pathname, path, n); + len = n; + } + if (len && pathname[len - 1] != '/') + pathname[len++] = '/'; + strcpy(pathname + len, filename); + if (stat_file(pathname, &statbuf) == 0 && + /* Accept only regular files + with some execute bits set. + XXX not perfect, might still fail */ + S_ISREG(statbuf.st_mode) && + (statbuf.st_mode & 0111)) + break; + } + } + if (stat_file(pathname, &statbuf) < 0) { + perror_msg_and_die("Can't stat '%s'", filename); + } + + params_for_tracee.fd_to_close = (shared_log != stderr) ? fileno(shared_log) : -1; + params_for_tracee.run_euid = (statbuf.st_mode & S_ISUID) ? statbuf.st_uid : run_uid; + params_for_tracee.run_egid = (statbuf.st_mode & S_ISGID) ? statbuf.st_gid : run_gid; + params_for_tracee.argv = argv; + /* + * On NOMMU, can be safely freed only after execve in tracee. + * It's hard to know when that happens, so we just leak it. + */ + params_for_tracee.pathname = NOMMU_SYSTEM ? strdup(pathname) : pathname; + +#if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY + if (daemonized_tracer) + prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); +#endif + + strace_child = pid = fork(); + if (pid < 0) { + perror_msg_and_die("fork"); + } + if ((pid != 0 && daemonized_tracer) + || (pid == 0 && !daemonized_tracer) + ) { + /* We are to become the tracee. Two cases: + * -D: we are parent + * not -D: we are child + */ + exec_or_die(); + } + + /* We are the tracer */ + + if (!daemonized_tracer) { + if (!use_seize) { + /* child did PTRACE_TRACEME, nothing to do in parent */ + } else { + if (!NOMMU_SYSTEM) { + /* Wait until child stopped itself */ + int status; + while (waitpid(pid, &status, WSTOPPED) < 0) { + if (errno == EINTR) + continue; + perror_msg_and_die("waitpid"); + } + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("Unexpected wait status %x", status); + } + } + /* Else: NOMMU case, we have no way to sync. + * Just attach to it as soon as possible. + * This means that we may miss a few first syscalls... + */ + + if (ptrace_attach_or_seize(pid)) { + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("Can't attach to %d", pid); + } + if (!NOMMU_SYSTEM) + kill(pid, SIGCONT); + } + tcp = alloctcb(pid); + if (!NOMMU_SYSTEM) + tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP | post_attach_sigstop; + else + tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP; + newoutf(tcp); + } + else { + /* With -D, we are *child* here, IOW: different pid. Fetch it: */ + strace_tracer_pid = getpid(); + /* The tracee is our parent: */ + pid = getppid(); + alloctcb(pid); + /* attaching will be done later, by startup_attach */ + /* note: we don't do newoutf(tcp) here either! */ + + /* NOMMU BUG! -D mode is active, we (child) return, + * and we will scribble over parent's stack! + * When parent later unpauses, it segfaults. + * + * We work around it + * (1) by declaring exec_or_die() NORETURN, + * hopefully compiler will just jump to it + * instead of call (won't push anything to stack), + * (2) by trying very hard in exec_or_die() + * to not use any stack, + * (3) having a really big (MAXPATHLEN) stack object + * in this function, which creates a "buffer" between + * child's and parent's stack pointers. + * This may save us if (1) and (2) failed + * and compiler decided to use stack in exec_or_die() anyway + * (happens on i386 because of stack parameter passing). + * + * A cleaner solution is to use makecontext + setcontext + * to create a genuine separate stack and execute on it. + */ + } +} + +/* + * Test whether the kernel support PTRACE_O_TRACECLONE et al options. + * First fork a new child, call ptrace with PTRACE_SETOPTIONS on it, + * and then see which options are supported by the kernel. + */ +static int +test_ptrace_setoptions_followfork(void) +{ + int pid, expected_grandchild = 0, found_grandchild = 0; + const unsigned int test_options = PTRACE_O_TRACECLONE | + PTRACE_O_TRACEFORK | + PTRACE_O_TRACEVFORK; + + /* Need fork for test. NOMMU has no forks */ + if (NOMMU_SYSTEM) + goto worked; /* be bold, and pretend that test succeeded */ + + pid = fork(); + if (pid < 0) + perror_msg_and_die("fork"); + if (pid == 0) { + pid = getpid(); + if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0) + perror_msg_and_die("%s: PTRACE_TRACEME doesn't work", + __func__); + kill_save_errno(pid, SIGSTOP); + if (fork() < 0) + perror_msg_and_die("fork"); + _exit(0); + } + + while (1) { + int status, tracee_pid; + + errno = 0; + tracee_pid = wait(&status); + if (tracee_pid <= 0) { + if (errno == EINTR) + continue; + if (errno == ECHILD) + break; + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("%s: unexpected wait result %d", + __func__, tracee_pid); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status)) { + if (tracee_pid != pid) + kill_save_errno(pid, SIGKILL); + error_msg_and_die("%s: unexpected exit status %u", + __func__, WEXITSTATUS(status)); + } + continue; + } + if (WIFSIGNALED(status)) { + if (tracee_pid != pid) + kill_save_errno(pid, SIGKILL); + error_msg_and_die("%s: unexpected signal %u", + __func__, WTERMSIG(status)); + } + if (!WIFSTOPPED(status)) { + if (tracee_pid != pid) + kill_save_errno(tracee_pid, SIGKILL); + kill_save_errno(pid, SIGKILL); + error_msg_and_die("%s: unexpected wait status %x", + __func__, status); + } + if (tracee_pid != pid) { + found_grandchild = tracee_pid; + if (ptrace(PTRACE_CONT, tracee_pid, 0, 0) < 0) { + kill_save_errno(tracee_pid, SIGKILL); + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("PTRACE_CONT doesn't work"); + } + continue; + } + switch (WSTOPSIG(status)) { + case SIGSTOP: + if (ptrace(PTRACE_SETOPTIONS, pid, 0, test_options) < 0 + && errno != EINVAL && errno != EIO) + perror_msg("PTRACE_SETOPTIONS"); + break; + case SIGTRAP: + if (status >> 16 == PTRACE_EVENT_FORK) { + long msg = 0; + + if (ptrace(PTRACE_GETEVENTMSG, pid, + NULL, (long) &msg) == 0) + expected_grandchild = msg; + } + break; + } + if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) { + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("PTRACE_SYSCALL doesn't work"); + } + } + if (expected_grandchild && expected_grandchild == found_grandchild) { + worked: + ptrace_setoptions |= test_options; + if (debug_flag) + fprintf(stderr, "ptrace_setoptions = %#x\n", + ptrace_setoptions); + return 0; + } + error_msg("Test for PTRACE_O_TRACECLONE failed, " + "giving up using this feature."); + return 1; +} + +/* + * Test whether the kernel support PTRACE_O_TRACESYSGOOD. + * First fork a new child, call ptrace(PTRACE_SETOPTIONS) on it, + * and then see whether it will stop with (SIGTRAP | 0x80). + * + * Use of this option enables correct handling of user-generated SIGTRAPs, + * and SIGTRAPs generated by special instructions such as int3 on x86: + * _start: .globl _start + * int3 + * movl $42, %ebx + * movl $1, %eax + * int $0x80 + * (compile with: "gcc -nostartfiles -nostdlib -o int3 int3.S") + */ +static int +test_ptrace_setoptions_for_all(void) +{ + const unsigned int test_options = PTRACE_O_TRACESYSGOOD | + PTRACE_O_TRACEEXEC; + int pid; + int it_worked = 0; + + /* Need fork for test. NOMMU has no forks */ + if (NOMMU_SYSTEM) + goto worked; /* be bold, and pretend that test succeeded */ + + pid = fork(); + if (pid < 0) + perror_msg_and_die("fork"); + + if (pid == 0) { + pid = getpid(); + if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0) + /* Note: exits with exitcode 1 */ + perror_msg_and_die("%s: PTRACE_TRACEME doesn't work", + __func__); + kill(pid, SIGSTOP); + _exit(0); /* parent should see entry into this syscall */ + } + + while (1) { + int status, tracee_pid; + + errno = 0; + tracee_pid = wait(&status); + if (tracee_pid <= 0) { + if (errno == EINTR) + continue; + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("%s: unexpected wait result %d", + __func__, tracee_pid); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_die("%s: unexpected exit status %u", + __func__, WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) { + error_msg_and_die("%s: unexpected signal %u", + __func__, WTERMSIG(status)); + } + if (!WIFSTOPPED(status)) { + kill(pid, SIGKILL); + error_msg_and_die("%s: unexpected wait status %x", + __func__, status); + } + if (WSTOPSIG(status) == SIGSTOP) { + /* + * We don't check "options aren't accepted" error. + * If it happens, we'll never get (SIGTRAP | 0x80), + * and thus will decide to not use the option. + * IOW: the outcome of the test will be correct. + */ + if (ptrace(PTRACE_SETOPTIONS, pid, 0L, test_options) < 0 + && errno != EINVAL && errno != EIO) + perror_msg("PTRACE_SETOPTIONS"); + } + if (WSTOPSIG(status) == (SIGTRAP | 0x80)) { + it_worked = 1; + } + if (ptrace(PTRACE_SYSCALL, pid, 0L, 0L) < 0) { + kill_save_errno(pid, SIGKILL); + perror_msg_and_die("PTRACE_SYSCALL doesn't work"); + } + } + + if (it_worked) { + worked: + syscall_trap_sig = (SIGTRAP | 0x80); + ptrace_setoptions |= test_options; + if (debug_flag) + fprintf(stderr, "ptrace_setoptions = %#x\n", + ptrace_setoptions); + return 0; + } + + error_msg("Test for PTRACE_O_TRACESYSGOOD failed, " + "giving up using this feature."); + return 1; +} + +#if USE_SEIZE +static void +test_ptrace_seize(void) +{ + int pid; + + /* Need fork for test. NOMMU has no forks */ + if (NOMMU_SYSTEM) { + post_attach_sigstop = 0; /* this sets use_seize to 1 */ + return; + } + + pid = fork(); + if (pid < 0) + perror_msg_and_die("fork"); + + if (pid == 0) { + pause(); + _exit(0); + } + + /* PTRACE_SEIZE, unlike ATTACH, doesn't force tracee to trap. After + * attaching tracee continues to run unless a trap condition occurs. + * PTRACE_SEIZE doesn't affect signal or group stop state. + */ + if (ptrace(PTRACE_SEIZE, pid, 0, 0) == 0) { + post_attach_sigstop = 0; /* this sets use_seize to 1 */ + } else if (debug_flag) { + fprintf(stderr, "PTRACE_SEIZE doesn't work\n"); + } + + kill(pid, SIGKILL); + + while (1) { + int status, tracee_pid; + + errno = 0; + tracee_pid = waitpid(pid, &status, 0); + if (tracee_pid <= 0) { + if (errno == EINTR) + continue; + perror_msg_and_die("%s: unexpected wait result %d", + __func__, tracee_pid); + } + if (WIFSIGNALED(status)) { + return; + } + error_msg_and_die("%s: unexpected wait status %x", + __func__, status); + } +} +#else /* !USE_SEIZE */ +# define test_ptrace_seize() ((void)0) +#endif + +static unsigned +get_os_release(void) +{ + unsigned rel; + const char *p; + struct utsname u; + if (uname(&u) < 0) + perror_msg_and_die("uname"); + /* u.release has this form: "3.2.9[-some-garbage]" */ + rel = 0; + p = u.release; + for (;;) { + if (!(*p >= '0' && *p <= '9')) + error_msg_and_die("Bad OS release string: '%s'", u.release); + /* Note: this open-codes KERNEL_VERSION(): */ + rel = (rel << 8) | atoi(p); + if (rel >= KERNEL_VERSION(1,0,0)) + break; + while (*p >= '0' && *p <= '9') + p++; + if (*p != '.') { + if (rel >= KERNEL_VERSION(0,1,0)) { + /* "X.Y-something" means "X.Y.0" */ + rel <<= 8; + break; + } + error_msg_and_die("Bad OS release string: '%s'", u.release); + } + p++; + } + return rel; +} + +/* + * Initialization part of main() was eating much stack (~0.5k), + * which was unused after init. + * We can reuse it if we move init code into a separate function. + * + * Don't want main() to inline us and defeat the reason + * we have a separate function. + */ +static void __attribute__ ((noinline)) +init(int argc, char *argv[]) +{ + struct tcb *tcp; + int c, i; + int optF = 0; + struct sigaction sa; + +#ifdef LIBUNWIND + if (use_libunwind) { + /* Create libunwind address space for the process */ + libunwind_as = unw_create_addr_space(&_UPT_accessors, 0); + if (!libunwind_as) { + fprintf(stderr, "Fatal error: unw_create_addr_space() from libunwind failed\n"); + exit(1); + } + } +#endif + + progname = argv[0] ? argv[0] : "strace"; + + /* Make sure SIGCHLD has the default action so that waitpid + definitely works without losing track of children. The user + should not have given us a bogus state to inherit, but he might + have. Arguably we should detect SIG_IGN here and pass it on + to children, but probably noone really needs that. */ + signal(SIGCHLD, SIG_DFL); + + strace_tracer_pid = getpid(); + + os_release = get_os_release(); + + /* Allocate the initial tcbtab. */ + tcbtabsize = argc; /* Surely enough for all -p args. */ + tcbtab = calloc(tcbtabsize, sizeof(tcbtab[0])); + if (!tcbtab) + die_out_of_memory(); + tcp = calloc(tcbtabsize, sizeof(*tcp)); + if (!tcp) + die_out_of_memory(); + for (c = 0; c < tcbtabsize; c++) + tcbtab[c] = tcp++; + + shared_log = stderr; + shared_dump_log_fd = open("/tmp/strace_dump", O_CREAT | O_TRUNC | O_WRONLY, 0666); + shared_stackinfo_f = fopen("/tmp/strace_stackinfo", "w"); + set_sortby(DEFAULT_SORTBY); + set_personality(DEFAULT_PERSONALITY); + qualify("trace=all"); + qualify("abbrev=all"); + qualify("verbose=all"); +#if DEFAULT_QUAL_FLAGS != (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE) +# error Bug in DEFAULT_QUAL_FLAGS +#endif + qualify("signal=all"); + while ((c = getopt(argc, argv, + "+b:cCdfFhiqrtTvVxyzkw" + "D" + "a:e:o:O:p:s:S:u:E:P:I:")) != EOF) { + switch (c) { + case 'b': + if (strcmp(optarg, "execve") != 0) + error_msg_and_die("Syscall '%s' for -b isn't supported", + optarg); + detach_on_execve = 1; + break; + case 'c': + if (cflag == CFLAG_BOTH) { + error_msg_and_die("-c and -C are mutually exclusive"); + } + cflag = CFLAG_ONLY_STATS; + break; + case 'C': + if (cflag == CFLAG_ONLY_STATS) { + error_msg_and_die("-c and -C are mutually exclusive"); + } + cflag = CFLAG_BOTH; + break; + case 'd': + debug_flag = 1; + break; + case 'D': + daemonized_tracer = 1; + break; + case 'F': + optF = 1; + break; + case 'f': + followfork++; + break; + case 'h': + usage(stdout, 0); + break; + case 'i': + iflag = 1; + break; + case 'q': + qflag++; + break; + case 'r': + rflag = 1; + /* fall through to tflag++ */ + case 't': + tflag++; + break; + case 'T': + Tflag = 1; + break; + case 'x': + xflag++; + break; + case 'y': + show_fd_path = 1; + break; + case 'v': + qualify("abbrev=none"); + break; + case 'V': + printf("%s -- version %s\n", PACKAGE_NAME, VERSION); + exit(0); + break; + case 'z': + not_failing_only = 1; + break; + case 'a': + acolumn = string_to_uint(optarg); + if (acolumn < 0) + error_opt_arg(c, optarg); + break; + case 'e': + qualify(optarg); + break; + case 'o': + outfname = strdup(optarg); + break; + case 'O': + i = string_to_uint(optarg); + if (i < 0) + error_opt_arg(c, optarg); + set_overhead(i); + break; + case 'p': + process_opt_p_list(optarg); + break; + case 'P': + pathtrace_select(optarg); + break; + case 's': + i = string_to_uint(optarg); + if (i < 0) + error_opt_arg(c, optarg); + max_strlen = i; + break; + case 'S': + set_sortby(optarg); + break; + case 'u': + username = strdup(optarg); + break; + case 'E': + if (putenv(optarg) < 0) + die_out_of_memory(); + break; + case 'I': + opt_intr = string_to_uint(optarg); + if (opt_intr <= 0 || opt_intr >= NUM_INTR_OPTS) + error_opt_arg(c, optarg); + break; + case 'k': + output_stacktraces = 1; + break; + case 'w': + use_libunwind = 0; + break; + default: + usage(stderr, 1); + break; + } + } + argv += optind; + /* argc -= optind; - no need, argc is not used below */ + + acolumn_spaces = malloc(acolumn + 1); + if (!acolumn_spaces) + die_out_of_memory(); + memset(acolumn_spaces, ' ', acolumn); + acolumn_spaces[acolumn] = '\0'; + + /* Must have PROG [ARGS], or -p PID. Not both. */ + if (!argv[0] == !nprocs) + usage(stderr, 1); + + if (nprocs != 0 && daemonized_tracer) { + error_msg_and_die("-D and -p are mutually exclusive"); + } + + if (!followfork) + followfork = optF; + + if (followfork >= 2 && cflag) { + error_msg_and_die("(-c or -C) and -ff are mutually exclusive"); + } + + /* See if they want to run as another user. */ + if (username != NULL) { + struct passwd *pent; + + if (getuid() != 0 || geteuid() != 0) { + error_msg_and_die("You must be root to use the -u option"); + } + pent = getpwnam(username); + if (pent == NULL) { + error_msg_and_die("Cannot find user '%s'", username); + } + run_uid = pent->pw_uid; + run_gid = pent->pw_gid; + } + else { + run_uid = getuid(); + run_gid = getgid(); + } + + /* + * On any reasonably recent Linux kernel (circa about 2.5.46) + * need_fork_exec_workarounds should stay 0 after these tests: + */ + /*need_fork_exec_workarounds = 0; - already is */ + if (followfork) + need_fork_exec_workarounds = test_ptrace_setoptions_followfork(); + need_fork_exec_workarounds |= test_ptrace_setoptions_for_all(); + test_ptrace_seize(); + + /* Check if they want to redirect the output. */ + if (outfname) { + /* See if they want to pipe the output. */ + if (outfname[0] == '|' || outfname[0] == '!') { + /* + * We can't do the .PID funny business + * when using popen, so prohibit it. + */ + if (followfork >= 2) + error_msg_and_die("Piping the output and -ff are mutually exclusive"); + shared_log = strace_popen(outfname + 1); + shared_dump_log_fd = open("/tmp/strace_dump", O_CREAT | O_TRUNC | O_WRONLY, 0666); + shared_stackinfo_f = fopen("/tmp/strace_stackinfo", "w"); + } + else if (followfork < 2) + shared_log = strace_fopen(outfname); + shared_dump_log_fd = open("/tmp/strace_dump", O_CREAT | O_TRUNC | O_WRONLY, 0666); + shared_stackinfo_f = fopen("/tmp/strace_stackinfo", "w"); + } else { + /* -ff without -o FILE is the same as single -f */ + if (followfork >= 2) + followfork = 1; + } + + if (!outfname || outfname[0] == '|' || outfname[0] == '!') { + char *buf = malloc(BUFSIZ); + if (!buf) + die_out_of_memory(); + setvbuf(shared_log, buf, _IOLBF, BUFSIZ); + } + if (outfname && argv[0]) { + if (!opt_intr) + opt_intr = INTR_NEVER; + qflag = 1; + } + if (!opt_intr) + opt_intr = INTR_WHILE_WAIT; + + /* argv[0] -pPID -oFILE Default interactive setting + * yes 0 0 INTR_WHILE_WAIT + * no 1 0 INTR_WHILE_WAIT + * yes 0 1 INTR_NEVER + * no 1 1 INTR_WHILE_WAIT + */ + + sigemptyset(&empty_set); + sigemptyset(&blocked_set); + + /* startup_child() must be called before the signal handlers get + * installed below as they are inherited into the spawned process. + * Also we do not need to be protected by them as during interruption + * 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); + } + + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGTTOU, &sa, NULL); /* SIG_IGN */ + sigaction(SIGTTIN, &sa, NULL); /* SIG_IGN */ + if (opt_intr != INTR_ANYWHERE) { + if (opt_intr == INTR_BLOCK_TSTP_TOO) + sigaction(SIGTSTP, &sa, NULL); /* SIG_IGN */ + /* + * In interactive mode (if no -o OUTFILE, or -p PID is used), + * fatal signals are blocked while syscall stop is processed, + * and acted on in between, when waiting for new syscall stops. + * In non-interactive mode, signals are ignored. + */ + if (opt_intr == INTR_WHILE_WAIT) { + sigaddset(&blocked_set, SIGHUP); + sigaddset(&blocked_set, SIGINT); + sigaddset(&blocked_set, SIGQUIT); + sigaddset(&blocked_set, SIGPIPE); + sigaddset(&blocked_set, SIGTERM); + sa.sa_handler = interrupt; + } + /* SIG_IGN, or set handler for these */ + sigaction(SIGHUP, &sa, NULL); + sigaction(SIGINT, &sa, NULL); + sigaction(SIGQUIT, &sa, NULL); + sigaction(SIGPIPE, &sa, NULL); + sigaction(SIGTERM, &sa, NULL); + } + if (nprocs != 0 || daemonized_tracer) + startup_attach(); + + /* Do we want pids printed in our -o OUTFILE? + * -ff: no (every pid has its own file); or + * -f: yes (there can be more pids in the future); or + * -p PID1,PID2: yes (there are already more than one pid) + */ + print_pid_pfx = (outfname && followfork < 2 && (followfork == 1 || nprocs > 1)); +} + +static struct tcb * +pid2tcb(int pid) +{ + int i; + + if (pid <= 0) + return NULL; + + for (i = 0; i < tcbtabsize; i++) { + struct tcb *tcp = tcbtab[i]; + if (tcp->pid == pid && (tcp->flags & TCB_INUSE)) + return tcp; + } + + return NULL; +} + +static void +cleanup(void) +{ + int i; + struct tcb *tcp; + int fatal_sig; + + /* 'interrupted' is a volatile object, fetch it only once */ + fatal_sig = interrupted; + if (!fatal_sig) + fatal_sig = SIGTERM; + + for (i = 0; i < tcbtabsize; i++) { + tcp = tcbtab[i]; + if (!(tcp->flags & TCB_INUSE)) + continue; + if (debug_flag) + fprintf(stderr, + "cleanup: looking at pid %u\n", tcp->pid); + if (tcp->flags & TCB_STRACE_CHILD) { + kill(tcp->pid, SIGCONT); + kill(tcp->pid, fatal_sig); + } + detach(tcp); + } + if (cflag) + call_summary(shared_log); +} + +static void +interrupt(int sig) +{ + interrupted = sig; +} + +static int +trace(void) +{ + struct rusage ru; + struct rusage *rup = cflag ? &ru : NULL; +#ifdef __WALL + static int wait4_options = __WALL; +#endif + + while (nprocs != 0) { + int pid; + int wait_errno; + int status, sig; + int stopped; + struct tcb *tcp; + unsigned event; + + if (interrupted) + return 0; + if (interactive) + sigprocmask(SIG_SETMASK, &empty_set, NULL); +#ifdef __WALL + pid = wait4(-1, &status, wait4_options, rup); + if (pid < 0 && (wait4_options & __WALL) && errno == EINVAL) { + /* this kernel does not support __WALL */ + wait4_options &= ~__WALL; + pid = wait4(-1, &status, wait4_options, rup); + } + if (pid < 0 && !(wait4_options & __WALL) && errno == ECHILD) { + /* most likely a "cloned" process */ + pid = wait4(-1, &status, __WCLONE, rup); + if (pid < 0) { + perror_msg("wait4(__WCLONE) failed"); + } + } +#else + pid = wait4(-1, &status, 0, rup); +#endif /* __WALL */ + wait_errno = errno; + if (interactive) + sigprocmask(SIG_BLOCK, &blocked_set, NULL); + + if (pid < 0) { + switch (wait_errno) { + case EINTR: + continue; + case ECHILD: + /* + * We would like to verify this case + * but sometimes a race in Solbourne's + * version of SunOS sometimes reports + * ECHILD before sending us SIGCHILD. + */ + return 0; + default: + errno = wait_errno; + perror_msg("wait"); + return -1; + } + } + if (pid == popen_pid) { + if (WIFEXITED(status) || WIFSIGNALED(status)) + popen_pid = 0; + continue; + } + + event = ((unsigned)status >> 16); + if (debug_flag) { + char buf[sizeof("WIFEXITED,exitcode=%u") + sizeof(int)*3 /*paranoia:*/ + 16]; + char evbuf[sizeof(",PTRACE_EVENT_?? (%u)") + sizeof(int)*3 /*paranoia:*/ + 16]; + strcpy(buf, "???"); + if (WIFSIGNALED(status)) +#ifdef WCOREDUMP + sprintf(buf, "WIFSIGNALED,%ssig=%s", + WCOREDUMP(status) ? "core," : "", + signame(WTERMSIG(status))); +#else + sprintf(buf, "WIFSIGNALED,sig=%s", + signame(WTERMSIG(status))); +#endif + if (WIFEXITED(status)) + sprintf(buf, "WIFEXITED,exitcode=%u", WEXITSTATUS(status)); + if (WIFSTOPPED(status)) + sprintf(buf, "WIFSTOPPED,sig=%s", signame(WSTOPSIG(status))); +#ifdef WIFCONTINUED + if (WIFCONTINUED(status)) + strcpy(buf, "WIFCONTINUED"); +#endif + evbuf[0] = '\0'; + if (event != 0) { + static const char *const event_names[] = { + [PTRACE_EVENT_CLONE] = "CLONE", + [PTRACE_EVENT_FORK] = "FORK", + [PTRACE_EVENT_VFORK] = "VFORK", + [PTRACE_EVENT_VFORK_DONE] = "VFORK_DONE", + [PTRACE_EVENT_EXEC] = "EXEC", + [PTRACE_EVENT_EXIT] = "EXIT", + }; + const char *e; + if (event < ARRAY_SIZE(event_names)) + e = event_names[event]; + else { + sprintf(buf, "?? (%u)", event); + e = buf; + } + sprintf(evbuf, ",PTRACE_EVENT_%s", e); + } + fprintf(stderr, " [wait(0x%04x) = %u] %s%s\n", status, pid, buf, evbuf); + } + + /* Look up 'pid' in our table. */ + tcp = pid2tcb(pid); + + if (!tcp) { + if (followfork) { + tcp = alloctcb(pid); + tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop; + newoutf(tcp); + if (!qflag) + fprintf(stderr, "Process %d attached\n", + pid); + } else { + /* This can happen if a clone call used + CLONE_PTRACE itself. */ + if (WIFSTOPPED(status)) + ptrace(PTRACE_CONT, pid, (char *) 0, 0); + error_msg_and_die("Unknown pid: %u", pid); + } + } + + clear_regs(); + if (WIFSTOPPED(status)) + get_regs(pid); + + /* Under Linux, execve changes pid to thread leader's pid, + * and we see this changed pid on EVENT_EXEC and later, + * execve sysexit. Leader "disappears" without exit + * notification. Let user know that, drop leader's tcb, + * and fix up pid in execve thread's tcb. + * Effectively, execve thread's tcb replaces leader's tcb. + * + * BTW, leader is 'stuck undead' (doesn't report WIFEXITED + * on exit syscall) in multithreaded programs exactly + * in order to handle this case. + * + * PTRACE_GETEVENTMSG returns old pid starting from Linux 3.0. + * On 2.6 and earlier, it can return garbage. + */ + if (event == PTRACE_EVENT_EXEC && os_release >= KERNEL_VERSION(3,0,0)) { + FILE *fp; + int fd; + struct tcb *execve_thread; + long old_pid = 0; + + if (ptrace(PTRACE_GETEVENTMSG, pid, NULL, (long) &old_pid) < 0) + goto dont_switch_tcbs; + if (old_pid <= 0 || old_pid == pid) + goto dont_switch_tcbs; + execve_thread = pid2tcb(old_pid); + /* It should be !NULL, but I feel paranoid */ + if (!execve_thread) + goto dont_switch_tcbs; + + if (execve_thread->curcol != 0) { + /* + * One case we are here is -ff: + * try "strace -oLOG -ff test/threaded_execve" + */ + fprintf(execve_thread->outf, " \n", pid); + /*execve_thread->curcol = 0; - no need, see code below */ + } + /* Swap output FILEs (needed for -ff) */ + fp = execve_thread->outf; + execve_thread->outf = tcp->outf; + tcp->outf = fp; + fd = execve_thread->out_dump_f; + execve_thread->out_dump_f = tcp->out_dump_f; + tcp->out_dump_f = fd; + fp = execve_thread->out_stack_f; + execve_thread->out_stack_f = tcp->out_stack_f; + tcp->out_stack_f = fp; + /* And their column positions */ + execve_thread->curcol = tcp->curcol; + tcp->curcol = 0; + /* Drop leader, but close execve'd thread outfile (if -ff) */ + droptcb(tcp); + /* Switch to the thread, reusing leader's outfile and pid */ + tcp = execve_thread; + tcp->pid = pid; + if (cflag != CFLAG_ONLY_STATS) { + printleader(tcp); + tprintf("+++ superseded by execve in pid %lu +++\n", old_pid); + line_ended(); + tcp->flags |= TCB_REPRINT; + } + } + dont_switch_tcbs: + + if (event == PTRACE_EVENT_EXEC) { + if (detach_on_execve && !skip_one_b_execve) + detach(tcp); /* do "-b execve" thingy */ + skip_one_b_execve = 0; + } + + /* Set current output file */ + current_tcp = tcp; + + if (cflag) { + tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime); + tcp->stime = ru.ru_stime; + } + + if (WIFSIGNALED(status)) { + if (pid == strace_child) + exit_code = 0x100 | WTERMSIG(status); + if (cflag != CFLAG_ONLY_STATS + && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL) + ) { + printleader(tcp); +#ifdef WCOREDUMP + tprintf("+++ killed by %s %s+++\n", + signame(WTERMSIG(status)), + WCOREDUMP(status) ? "(core dumped) " : ""); +#else + tprintf("+++ killed by %s +++\n", + signame(WTERMSIG(status))); +#endif + line_ended(); + } + droptcb(tcp); + continue; + } + if (WIFEXITED(status)) { + if (pid == strace_child) + exit_code = WEXITSTATUS(status); + if (cflag != CFLAG_ONLY_STATS && + qflag < 2) { + printleader(tcp); + tprintf("+++ exited with %d +++\n", WEXITSTATUS(status)); + line_ended(); + } + droptcb(tcp); + continue; + } + if (!WIFSTOPPED(status)) { + fprintf(stderr, "PANIC: pid %u not stopped\n", pid); + droptcb(tcp); + continue; + } + + /* Is this the very first time we see this tracee stopped? */ + if (tcp->flags & TCB_STARTUP) { + if (debug_flag) + fprintf(stderr, "pid %d has TCB_STARTUP, initializing it\n", tcp->pid); + tcp->flags &= ~TCB_STARTUP; + if (tcp->flags & TCB_BPTSET) { + /* + * One example is a breakpoint inherited from + * parent through fork(). + */ + if (clearbpt(tcp) < 0) { + /* Pretty fatal */ + droptcb(tcp); + cleanup(); + return -1; + } + } + if (ptrace_setoptions) { + if (debug_flag) + fprintf(stderr, "setting opts %x on pid %d\n", ptrace_setoptions, tcp->pid); + if (ptrace(PTRACE_SETOPTIONS, tcp->pid, NULL, ptrace_setoptions) < 0) { + if (errno != ESRCH) { + /* Should never happen, really */ + perror_msg_and_die("PTRACE_SETOPTIONS"); + } + } + } + } + + sig = WSTOPSIG(status); + + if (event != 0) { + /* Ptrace event */ +#if USE_SEIZE + if (event == PTRACE_EVENT_STOP) { + /* + * PTRACE_INTERRUPT-stop or group-stop. + * PTRACE_INTERRUPT-stop has sig == SIGTRAP here. + */ + if (sig == SIGSTOP + || sig == SIGTSTP + || sig == SIGTTIN + || sig == SIGTTOU + ) { + stopped = 1; + goto show_stopsig; + } + } +#endif + goto restart_tracee_with_sig_0; + } + + /* Is this post-attach SIGSTOP? + * Interestingly, the process may stop + * with STOPSIG equal to some other signal + * than SIGSTOP if we happend to attach + * just before the process takes a signal. + */ + if (sig == SIGSTOP && (tcp->flags & TCB_IGNORE_ONE_SIGSTOP)) { + if (debug_flag) + fprintf(stderr, "ignored SIGSTOP on pid %d\n", tcp->pid); + tcp->flags &= ~TCB_IGNORE_ONE_SIGSTOP; + goto restart_tracee_with_sig_0; + } + + if (sig != syscall_trap_sig) { + siginfo_t si; + + /* Nonzero (true) if tracee is stopped by signal + * (as opposed to "tracee received signal"). + * 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); +#if USE_SEIZE + show_stopsig: +#endif + if (cflag != CFLAG_ONLY_STATS + && !hide_log_until_execve + && (qual_flags[sig] & QUAL_SIGNAL) + ) { +#if defined(PT_CR_IPSR) && defined(PT_CR_IIP) + long pc = 0; + long psr = 0; + + upeek(tcp, PT_CR_IPSR, &psr); + upeek(tcp, PT_CR_IIP, &pc); + +# define PSR_RI 41 + pc += (psr >> PSR_RI) & 0x3; +# define PC_FORMAT_STR " @ %lx" +# define PC_FORMAT_ARG , pc +#else +# define PC_FORMAT_STR "" +# define PC_FORMAT_ARG /* nothing */ +#endif + printleader(tcp); + if (!stopped) { + tprintf("--- %s ", signame(sig)); + printsiginfo(&si, verbose(tcp)); + tprintf(PC_FORMAT_STR " ---\n" + PC_FORMAT_ARG); + } else + tprintf("--- stopped by %s" PC_FORMAT_STR " ---\n", + signame(sig) + PC_FORMAT_ARG); + line_ended(); + } + + if (!stopped) + /* It's signal-delivery-stop. Inject the signal */ + goto restart_tracee; + + /* It's group-stop */ +#if USE_SEIZE + if (use_seize) { + /* + * This ends ptrace-stop, but does *not* end group-stop. + * This makes stopping signals work properly on straced process + * (that is, process really stops. It used to continue to run). + */ + if (ptrace_restart(PTRACE_LISTEN, tcp, 0) < 0) { + cleanup(); + return -1; + } + continue; + } + /* We don't have PTRACE_LISTEN support... */ +#endif + goto restart_tracee; + } + + /* We handled quick cases, we are permitted to interrupt now. */ + if (interrupted) + return 0; + + /* This should be syscall entry or exit. + * (Or it still can be that pesky post-execve SIGTRAP!) + * Handle it. + */ + if (trace_syscall(tcp) < 0) { + /* ptrace() failed in trace_syscall(). + * Likely a result of process disappearing mid-flight. + * Observed case: exit_group() or SIGKILL terminating + * all processes in thread group. + * We assume that ptrace error was caused by process death. + * We used to detach(tcp) here, but since we no longer + * implement "detach before death" policy/hack, + * we can let this process to report its death to us + * normally, via WIFEXITED or WIFSIGNALED wait status. + */ + continue; + } + restart_tracee_with_sig_0: + sig = 0; + restart_tracee: + if (ptrace_restart(PTRACE_SYSCALL, tcp, sig) < 0) { + cleanup(); + return -1; + } + } + return 0; +} + +int +main(int argc, char *argv[]) +{ + init(argc, argv); + + /* Run main tracing loop */ + if (trace() < 0) + return 1; + + cleanup(); + fflush(NULL); + if (shared_log != stderr) + fclose(shared_log); + if (popen_pid) { + while (waitpid(popen_pid, NULL, 0) < 0 && errno == EINTR) + ; + } + if (exit_code > 0xff) { + /* Avoid potential core file clobbering. */ + struct_rlimit rlim = {0, 0}; + set_rlimit(RLIMIT_CORE, &rlim); + + /* Child was killed by a signal, mimic that. */ + exit_code &= 0xff; + signal(exit_code, SIG_DFL); + raise(exit_code); + /* Paranoia - what if this signal is not fatal? + Exit with 128 + signo then. */ + exit_code += 128; + } + + return exit_code; +} diff --git a/alice-strace/alice-strace.spec b/alice-strace/alice-strace.spec new file mode 100644 index 0000000..817f1ae --- /dev/null +++ b/alice-strace/alice-strace.spec @@ -0,0 +1,491 @@ +Summary: Tracks and displays system calls associated with a running process +Name: strace +Version: 4.8 +Release: 1%{?dist} +License: BSD +Group: Development/Debuggers +URL: http://sourceforge.net/projects/strace/ +Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: libacl-devel, libaio-devel, time + +%define strace64_arches ppc64 sparc64 + +%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 + +%build +%configure +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +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 check + +%clean +rm -rf %{buildroot} + +%files +%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 +%defattr(-,root,root) +%{_bindir}/strace64 +%endif + +%changelog +* 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 + +* Mon 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 + +* Sat 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/alice-strace/alice-strace_test.c b/alice-strace/alice-strace_test.c new file mode 100644 index 0000000..1cc0b2d --- /dev/null +++ b/alice-strace/alice-strace_test.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include +#include +int main() { + int fd = open("/tmp/x", O_CREAT | O_RDWR, 0666); + assert(fd > 0); + write(fd, "hello", 5); + pwrite(fd, "world", 5, 4); + struct iovec x[3]; + x[0].iov_base = "aaa"; + x[0].iov_len = 3; + x[1].iov_base = "bbb"; + x[1].iov_len = 3; + x[2].iov_base = "ccc"; + x[2].iov_len = 3; + writev(fd, x, 3); + x[0].iov_base = "xxx"; + x[1].iov_base = "yyy"; + x[2].iov_base = "zzz"; + pwritev(fd, x, 3, 10); +} diff --git a/alice-strace/bjm.c b/alice-strace/bjm.c new file mode 100644 index 0000000..cd7dc13 --- /dev/null +++ b/alice-strace/bjm.c @@ -0,0 +1,202 @@ +/* + * 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 +#include +#include +#include +#include +#include + +/* Bits of module.flags. */ + +#define MOD_UNINITIALIZED 0 +#define MOD_RUNNING 1 +#define MOD_DELETED 2 +#define MOD_AUTOCLEAN 4 +#define MOD_VISITED 8 +#define MOD_USED_ONCE 16 +#define MOD_JUST_FREED 32 +#define MOD_INITIALIZING 64 + +/* Values for query_module's which. */ + +#define QM_MODULES 1 +#define QM_DEPS 2 +#define QM_REFS 3 +#define QM_SYMBOLS 4 +#define QM_INFO 5 + +struct module_symbol +{ + unsigned long value; + const char *name; +}; + +struct module_info +{ + unsigned long addr; + unsigned long size; + unsigned long flags; + long usecount; +}; + +static const struct xlat which[] = { + { 0, "0" }, + { QM_MODULES, "QM_MODULES" }, + { QM_DEPS, "QM_DEPS" }, + { QM_REFS, "QM_REFS" }, + { QM_SYMBOLS, "QM_SYMBOLS" }, + { QM_INFO, "QM_INFO" }, + { 0, NULL }, +}; + +static const struct xlat modflags[] = { + { MOD_UNINITIALIZED, "MOD_UNINITIALIZED" }, + { MOD_RUNNING, "MOD_RUNNING" }, + { MOD_DELETED, "MOD_DELETED" }, + { MOD_AUTOCLEAN, "MOD_AUTOCLEAN" }, + { MOD_VISITED, "MOD_VISITED" }, + { MOD_USED_ONCE, "MOD_USED_ONCE" }, + { MOD_JUST_FREED, "MOD_JUST_FREED" }, + { 0, NULL }, +}; + +int +sys_query_module(struct tcb *tcp) +{ + if (entering(tcp)) { + printstr(tcp, tcp->u_arg[0], -1); + tprints(", "); + printxval(which, tcp->u_arg[1], "QM_???"); + tprints(", "); + } else { + size_t ret; + + if (!verbose(tcp) || syserror(tcp) || + umove(tcp, tcp->u_arg[4], &ret) < 0) { + tprintf("%#lx, %lu, %#lx", tcp->u_arg[2], + tcp->u_arg[3], tcp->u_arg[4]); + } else if (tcp->u_arg[1]==QM_INFO) { + struct module_info mi; + if (umove(tcp, tcp->u_arg[2], &mi) < 0) { + tprintf("%#lx, ", tcp->u_arg[2]); + } else { + tprintf("{address=%#lx, size=%lu, flags=", + mi.addr, mi.size); + printflags(modflags, mi.flags, "MOD_???"); + tprintf(", usecount=%lu}, ", mi.usecount); + } + tprintf("%lu", (unsigned long)ret); + } else if ((tcp->u_arg[1]==QM_MODULES) || + (tcp->u_arg[1]==QM_DEPS) || + (tcp->u_arg[1]==QM_REFS)) { + tprints("{"); + if (!abbrev(tcp)) { + char* data = malloc(tcp->u_arg[3]); + char* mod = data; + size_t idx; + + if (!data) { + fprintf(stderr, "out of memory\n"); + tprintf(" /* %lu entries */ ", (unsigned long)ret); + } else { + if (umoven(tcp, tcp->u_arg[2], + tcp->u_arg[3], data) < 0) { + tprintf(" /* %lu entries */ ", (unsigned long)ret); + } else { + for (idx = 0; idx < ret; idx++) { + tprintf("%s%s", + (idx ? ", " : ""), + mod); + mod += strlen(mod)+1; + } + } + free(data); + } + } else + tprintf(" /* %lu entries */ ", (unsigned long)ret); + tprintf("}, %lu", (unsigned long)ret); + } else if (tcp->u_arg[1]==QM_SYMBOLS) { + tprints("{"); + if (!abbrev(tcp)) { + char* data = malloc(tcp->u_arg[3]); + struct module_symbol* sym = (struct module_symbol*)data; + size_t idx; + + if (!data) { + fprintf(stderr, "out of memory\n"); + tprintf(" /* %lu entries */ ", (unsigned long)ret); + } else { + if (umoven(tcp, tcp->u_arg[2], + tcp->u_arg[3], data) < 0) { + tprintf(" /* %lu entries */ ", (unsigned long)ret); + } else { + for (idx = 0; idx < ret; idx++) { + tprintf("%s{name=%s, value=%lu}", + (idx ? " " : ""), + data+(long)sym->name, + sym->value); + sym++; + } + } + free(data); + } + } else + tprintf(" /* %lu entries */ ", (unsigned long)ret); + tprintf("}, %ld", (unsigned long)ret); + } else { + printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]); + tprintf(", %#lx", tcp->u_arg[4]); + } + } + return 0; +} + +int +sys_create_module(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", %lu", tcp->u_arg[1]); + } + return RVAL_HEX; +} + +int +sys_init_module(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + printstr(tcp, tcp->u_arg[2], -1); + } + return 0; +} diff --git a/alice-strace/block.c b/alice-strace/block.c new file mode 100644 index 0000000..374002e --- /dev/null +++ b/alice-strace/block.c @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2009, 2010 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" +#include +#include +#include + +/* ioctls <= 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 system. */ + +#define BLKTRACE_BDEV_SIZE 32 +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; +}; + +#ifndef BLKTRACESETUP +#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) +#endif +#ifndef BLKTRACESTART +#define BLKTRACESTART _IO(0x12,116) +#endif +#ifndef BLKTRACESTOP +#define BLKTRACESTOP _IO(0x12,117) +#endif +#ifndef BLKTRACETEARDOWN +#define BLKTRACETEARDOWN _IO(0x12,118) +#endif +#ifndef BLKDISCARD +#define BLKDISCARD _IO(0x12,119) +#endif +#ifndef BLKIOMIN +#define BLKIOMIN _IO(0x12,120) +#endif +#ifndef BLKIOOPT +#define BLKIOOPT _IO(0x12,121) +#endif +#ifndef BLKALIGNOFF +#define BLKALIGNOFF _IO(0x12,122) +#endif +#ifndef BLKPBSZGET +#define BLKPBSZGET _IO(0x12,123) +#endif +#ifndef BLKDISCARDZEROES +#define BLKDISCARDZEROES _IO(0x12,124) +#endif +#ifndef BLKSECDISCARD +#define BLKSECDISCARD _IO(0x12,125) +#endif + +static const struct xlat blkpg_ops[] = { + { BLKPG_ADD_PARTITION, "BLKPG_ADD_PARTITION", }, + { BLKPG_DEL_PARTITION, "BLKPG_DEL_PARTITION", }, + { 0, NULL }, +}; + +static void +print_blkpg_req(struct tcb *tcp, struct blkpg_ioctl_arg *blkpg) +{ + struct blkpg_partition p; + + tprints("{"); + printxval(blkpg_ops, blkpg->op, "BLKPG_???"); + + tprintf(", flags=%d, datalen=%d, ", + blkpg->flags, blkpg->datalen); + + if (umove(tcp, (long) blkpg->data, &p) < 0) + tprintf("%#lx}", (long) blkpg->data); + else + tprintf("{start=%lld, length=%lld, pno=%d, " + "devname=\"%.*s\", volname=\"%.*s\"}}", + p.start, p.length, p.pno, + (int) sizeof(p.devname), p.devname, + (int) sizeof(p.volname), p.volname); +} + +int +block_ioctl(struct tcb *tcp, long code, long arg) +{ + switch (code) { + /* take arg as a value, not as a pointer */ + case BLKRASET: + case BLKFRASET: + if (entering(tcp)) + tprintf(", %ld", arg); + break; + + /* take a signed int */ + case BLKROSET: + case BLKBSZSET: + if (entering(tcp)) { + int val; + if (umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %d", val); + } + break; + + /* returns an unsigned short */ + case BLKSECTGET: + if (exiting(tcp)) { + unsigned short val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %u", (unsigned)val); + } + break; + + /* return a signed int */ + case BLKROGET: + case BLKBSZGET: + case BLKSSZGET: + case BLKALIGNOFF: + if (exiting(tcp)) { + int val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %d", val); + } + break; + + /* return an unsigned int */ + case BLKPBSZGET: + case BLKIOMIN: + case BLKIOOPT: + case BLKDISCARDZEROES: + if (exiting(tcp)) { + unsigned int val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %u", val); + } + break; + + /* return a signed long */ + case BLKRAGET: + case BLKFRAGET: + if (exiting(tcp)) { + long val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %ld", val); + } + break; + + /* returns an unsigned long */ + case BLKGETSIZE: + if (exiting(tcp)) { + unsigned long val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %lu", val); + } + break; + +#ifdef HAVE_BLKGETSIZE64 + /* return an uint64_t */ + case BLKGETSIZE64: + if (exiting(tcp)) { + uint64_t val; + if (syserror(tcp) || umove(tcp, arg, &val) < 0) + tprintf(", %#lx", arg); + else + tprintf(", %" PRIu64, val); + } + break; +#endif + + /* More complex types */ + case BLKDISCARD: + case BLKSECDISCARD: + if (entering(tcp)) { + uint64_t range[2]; + if (umove(tcp, arg, range) < 0) + tprintf(", %#lx", arg); + else + tprintf(", {%" PRIx64 ", %" PRIx64 "}", + range[0], range[1]); + } + break; + + case HDIO_GETGEO: + if (exiting(tcp)) { + struct hd_geometry geo; + if (syserror(tcp) || umove(tcp, arg, &geo) < 0) + tprintf(", %#lx", arg); + else + tprintf(", {heads=%u, sectors=%u, " + "cylinders=%u, start=%lu}", + (unsigned)geo.heads, + (unsigned)geo.sectors, + (unsigned)geo.cylinders, + geo.start); + } + break; + + case BLKPG: + if (entering(tcp)) { + struct blkpg_ioctl_arg blkpg; + if (umove(tcp, arg, &blkpg) < 0) + tprintf(", %#lx", arg); + else { + tprints(", "); + print_blkpg_req(tcp, &blkpg); + } + } + break; + + case BLKTRACESETUP: + if (entering(tcp)) { + struct blk_user_trace_setup buts; + if (umove(tcp, arg, &buts) < 0) + tprintf(", %#lx", arg); + else + tprintf(", {act_mask=%u, buf_size=%u, " + "buf_nr=%u, start_lba=%" PRIu64 ", " + "end_lba=%" PRIu64 ", pid=%u}", + (unsigned)buts.act_mask, buts.buf_size, + buts.buf_nr, buts.start_lba, + buts.end_lba, buts.pid); + } + if (exiting(tcp)) { + struct blk_user_trace_setup buts; + if (syserror(tcp) || umove(tcp, arg, &buts) < 0) + tprintf(", %#lx", arg); + else + tprintf(", {name=\"%.*s\"}", + (int) sizeof(buts.name), buts.name); + } + break; + + /* No arguments or unhandled */ + case BLKTRACESTART: + case BLKTRACESTOP: + case BLKTRACETEARDOWN: + case BLKFLSBUF: /* Requires driver knowlege */ + case BLKRRPART: /* No args */ + default: + if (entering(tcp)) + tprintf(", %#lx", arg); + break; + + }; + return 1; +} diff --git a/alice-strace/config.guess b/alice-strace/config.guess new file mode 100755 index 0000000..120cc0d --- /dev/null +++ b/alice-strace/config.guess @@ -0,0 +1,1552 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-05-16' + +# 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. +# +# 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 with a ChangeLog entry to config-patches@gnu.org. + + +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-2013 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'` + ;; +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=`(/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 ;; + *) 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*|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 + # 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/[-_].*/\./'` + ;; + 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}" + 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 ;; + 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/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + 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 ;; + i*: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 ;; + 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 ;; + 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; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32: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 ;; + 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}-unknown-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 [ "$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 + 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 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +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/alice-strace/config.h.in b/alice-strace/config.h.in new file mode 100644 index 0000000..3cd5fd8 --- /dev/null +++ b/alice-strace/config.h.in @@ -0,0 +1,556 @@ +/* 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 ARM architecture. */ +#undef ARM + +/* 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 the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* 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 declaration of `IO_CMD_PWRITE', and to 0 if you + don't. */ +#undef HAVE_DECL_IO_CMD_PWRITE + +/* Define to 1 if you have the declaration of `IO_CMD_PWRITEV', and to 0 if + you don't. */ +#undef HAVE_DECL_IO_CMD_PWRITEV + +/* 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_PARTSCAN', and to 0 if + you don't. */ +#undef HAVE_DECL_LO_FLAGS_PARTSCAN + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_CLONE', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_CLONE + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_EXEC', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_EXEC + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_EXIT', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_EXIT + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_FORK', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_FORK + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_VFORK', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_VFORK + +/* Define to 1 if you have the declaration of `PTRACE_EVENT_VFORK_DONE', and + to 0 if you don't. */ +#undef HAVE_DECL_PTRACE_EVENT_VFORK_DONE + +/* Define to 1 if you have the declaration of `PTRACE_GETEVENTMSG', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_GETEVENTMSG + +/* Define to 1 if you have the declaration of `PTRACE_GETSIGINFO', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_GETSIGINFO + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACECLONE', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACECLONE + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACEEXEC', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACEEXEC + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACEEXIT', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACEEXIT + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACEFORK', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACEFORK + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACESYSGOOD', and to + 0 if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACESYSGOOD + +/* Define to 1 if you have the declaration of `PTRACE_O_TRACEVFORK', and to 0 + if you don't. */ +#undef HAVE_DECL_PTRACE_O_TRACEVFORK + +/* Define to 1 if you have the declaration of `PTRACE_SETOPTIONS', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_SETOPTIONS + +/* 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 `sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_SIGLIST + +/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL__SYS_SIGLIST + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ELF_H + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `if_indextoname' function. */ +#undef HAVE_IF_INDEXTONAME + +/* Define to 1 if you have the `inet_ntop' function. */ +#undef HAVE_INET_NTOP + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_IOCTLS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBAIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_CAPABILITY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_ICMP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IF_PACKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IN6_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NETLINK_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_PTRACE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_UTSNAME_H + +/* Define if long long is little-endian. */ +#undef HAVE_LITTLE_ENDIAN_LONG_LONG + +/* Define to 1 if the system has the type `long long'. */ +#undef HAVE_LONG_LONG + +/* Define if off_t is a long long. */ +#undef HAVE_LONG_LONG_OFF_T + +/* 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 the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* 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_POLL_H + +/* Define to 1 if you have the `prctl' function. */ +#undef HAVE_PRCTL + +/* Define to 1 if you have the `process_vm_readv' function. */ +#undef HAVE_PROCESS_VM_READV + +/* Define to 1 if you have the `sendmsg' function. */ +#undef HAVE_SENDMSG + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if the system has the type `siginfo_t'. */ +#undef HAVE_SIGINFO_T + +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#undef HAVE_SIG_ATOMIC_T + +/* Define if stat64 is available in asm/stat.h. */ +#undef HAVE_STAT64 + +/* Define if statfs64 is available in sys/vfs.h. */ +#undef HAVE_STATFS64 + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* 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 `dqb_curblocks' is a member of `struct dqblk'. */ +#undef HAVE_STRUCT_DQBLK_DQB_CURBLOCKS + +/* Define to 1 if the system has the type `struct ia64_fpreg'. */ +#undef HAVE_STRUCT_IA64_FPREG + +/* Define to 1 if `u.c.flags' is a member of `struct iocb'. */ +#undef HAVE_STRUCT_IOCB_U_C_FLAGS + +/* Define to 1 if `msg_control' is a member of `struct msghdr'. */ +#undef HAVE_STRUCT_MSGHDR_MSG_CONTROL + +/* Define to 1 if the system has the type `struct opthdr'. */ +#undef HAVE_STRUCT_OPTHDR + +/* 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 `sc_hi2' is a member of `struct sigcontext'. */ +#undef HAVE_STRUCT_SIGCONTEXT_SC_HI2 + +/* Define to 1 if the system has the type `struct sigcontext_struct'. */ +#undef HAVE_STRUCT_SIGCONTEXT_STRUCT + +/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */ +#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID + +/* Define to 1 if `st_aclcnt' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ACLCNT + +/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLKSIZE + +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLOCKS + +/* Define to 1 if `st_flags' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_FLAGS + +/* Define to 1 if `st_fstype' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_FSTYPE + +/* Define to 1 if `st_gen' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_GEN + +/* Define to 1 if `st_level' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_LEVEL + +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV + +/* Define to 1 if `ACCEPTOR_id' is a member of `struct T_conn_res'. */ +#undef HAVE_STRUCT_T_CONN_RES_ACCEPTOR_ID + +/* Define to 1 if `QUEUE_ptr' is a member of `struct T_conn_res'. */ +#undef HAVE_STRUCT_T_CONN_RES_QUEUE_PTR + +/* Define to 1 if the system has the type `struct t_opthdr'. */ +#undef HAVE_STRUCT_T_OPTHDR + +/* 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 __old_kernel_stat'. */ +#undef HAVE_STRUCT___OLD_KERNEL_STAT + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ACL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ASYNCH_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CONF_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_EPOLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_POLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PTRACE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_REG_H + +/* Define to 1 if you have the `sys_siglist' function. */ +#undef HAVE_SYS_SIGLIST + +/* 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_UIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to 1 if you have the `_sys_siglist' function. */ +#undef HAVE__SYS_SIGLIST + +/* Define for the HPPA architecture. */ +#undef HPPA + +/* Define for the i386 architecture. */ +#undef I386 + +/* Define for the IA64 architecture. */ +#undef IA64 + +/* Define for the m68k architecture. */ +#undef M68K + +/* Define to 1 if `major', `minor', and `makedev' are declared in . + */ +#undef MAJOR_IN_MKDEV + +/* Define to 1 if `major', `minor', and `makedev' are declared in + . */ +#undef MAJOR_IN_SYSMACROS + +/* Define for the Meta architecture. */ +#undef METAG + +/* Define for the MicroBlaze architecture. */ +#undef MICROBLAZE + +/* Define for the MIPS architecture. */ +#undef MIPS + +/* 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 as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* 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 `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* The size of `rlim_t', as computed by sizeof. */ +#undef SIZEOF_RLIM_T + +/* Define for the SPARC architecture. */ +#undef SPARC + +/* Define for the SPARC64 architecture. */ +#undef SPARC64 + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define for the Tile architecture */ +#undef TILE + +/* 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 empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to `int' if doesn't define. */ +#undef uid_t diff --git a/alice-strace/config.sub b/alice-strace/config.sub new file mode 100755 index 0000000..cd7c0f7 --- /dev/null +++ b/alice-strace/config.sub @@ -0,0 +1,1788 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-04-24' + +# 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 with a ChangeLog entry to config-patches@gnu.org. +# +# 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-2013 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* | \ + 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 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | 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 \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | 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 \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | 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 + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | 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-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | 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-* \ + | 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-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | 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-* \ + | 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 + ;; + 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 + ;; + 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=i386-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 + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-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* \ + | -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* \ + | -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*) + # 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 + ;; + 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 + ;; + or1k-*) + 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/alice-strace/configure b/alice-strace/configure new file mode 100755 index 0000000..20baf6f --- /dev/null +++ b/alice-strace/configure @@ -0,0 +1,8752 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.68 for alice-strace 0.1. +# +# Report bugs to . +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## 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 + +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" + 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 : + # 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 + export CONFIG_SHELL + 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+"$@"} +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: alice-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_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; } + + # 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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +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 + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# 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='alice-strace' +PACKAGE_TARNAME='alice-strace' +PACKAGE_VERSION='0.1' +PACKAGE_STRING='alice-strace 0.1' +PACKAGE_BUGREPORT='alice-strace-devel@lists.sourceforge.net' +PACKAGE_URL='' + +ac_unique_file="alice-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 +PERL +WARN_CFLAGS +X32_FALSE +X32_TRUE +X86_64_FALSE +X86_64_TRUE +I386_FALSE +I386_TRUE +arch +EGREP +GREP +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 +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 +' + 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 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 + 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 alice-strace 0.1 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/alice-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 alice-strace 0.1:";; + 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 + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-gcc-Werror turn on gcc's -Werror option + +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 . +_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 +alice-strace configure 0.1 +generated by GNU Autoconf 2.68 + +Copyright (C) 2010 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_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_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 alice-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_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_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 || + $as_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_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_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + 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. */ +/* 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_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 + +# 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 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 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 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 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 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 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 alice-strace $as_me 0.1, which was +generated by GNU Autoconf 2.68. 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=$? + # 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.11' + +# 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 ( + 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 + rm -f conftest.file + 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 + + 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; } +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 --run true"; then + am_missing_run="$MISSING --run " +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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='alice-strace' + VERSION='0.1' + + +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"} + +# 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}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +{ $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 + + + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +#include +#include +/* 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 +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 8's {/usr,}/bin/sh. + touch 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 + + +{ $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" + { test -f "$ac_path_GREP" && $as_test_x "$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" + { test -f "$ac_path_EGREP" && $as_test_x "$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 supported architecture" >&5 +$as_echo_n "checking for supported architecture... " >&6; } +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 + +$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*) + arch=powerpc + +$as_echo "#define POWERPC 1" >>confdefs.h + + if test $host_cpu = powerpc64; then + +$as_echo "#define POWERPC64 1" >>confdefs.h + + fi + ;; +arm*) + arch=arm + +$as_echo "#define ARM 1" >>confdefs.h + + ;; +aarch64*) + arch=aarch64 + +$as_echo "#define AARCH64 1" >>confdefs.h + + ;; +avr32*) + arch=avr32 + +$as_echo "#define AVR32 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*) + 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 + +$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 + + ;; +or1k*) + arch=or1k + +$as_echo "#define OR1K 1" >>confdefs.h + + ;; + +xtensa*) + arch=xtensa + +$as_echo "#define XTENSA 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 alice-strace" "$LINENO" 5 + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $arch" >&5 +$as_echo "$arch" >&6; } + + + + if test x$arch = xi386; then + I386_TRUE= + I386_FALSE='#' +else + I386_TRUE='#' + I386_FALSE= +fi + + if test x$arch = xx86_64; then + X86_64_TRUE= + X86_64_FALSE='#' +else + X86_64_TRUE='#' + X86_64_FALSE= +fi + + if test x$arch = xx32; then + X32_TRUE= + X32_FALSE='#' +else + X32_TRUE='#' + X32_FALSE= +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for primary include directory" >&5 +$as_echo_n "checking for primary include directory... " >&6; } +includedir=/usr/include +if test -n "$GCC" +then + >conftest.c + new_includedir=` + $CC -v -E conftest.c 2>&1 | $AWK ' + /^End of search list/ { print last; exit } + { last = $1 } + ' + ` + rm -f conftest.c + if test -n "$new_includedir" && test -d "$new_includedir" + then + includedir=$new_includedir + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $includedir" >&5 +$as_echo "$includedir" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wall" >&5 +$as_echo_n "checking whether compiler handles -Wall... " >&6; } +if ${gl_cv_warn__Wall+:} false; then : + $as_echo_n "(cached) " >&6 +else + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} -Wall" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + gl_cv_warn__Wall=yes +else + gl_cv_warn__Wall=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wall" >&5 +$as_echo "$gl_cv_warn__Wall" >&6; } +if test "x$gl_cv_warn__Wall" = xyes; then : + as_fn_append WARN_CFLAGS " -Wall" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wwrite-strings" >&5 +$as_echo_n "checking whether compiler handles -Wwrite-strings... " >&6; } +if ${gl_cv_warn__Wwrite_strings+:} false; then : + $as_echo_n "(cached) " >&6 +else + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} -Wwrite-strings" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + gl_cv_warn__Wwrite_strings=yes +else + gl_cv_warn__Wwrite_strings=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wwrite_strings" >&5 +$as_echo "$gl_cv_warn__Wwrite_strings" >&6; } +if test "x$gl_cv_warn__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) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5 +$as_echo_n "checking whether compiler handles -Werror... " >&6; } +if ${gl_cv_warn__Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + gl_cv_warn__Werror=yes +else + gl_cv_warn__Werror=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext + CPPFLAGS="$save_CPPFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5 +$as_echo "$gl_cv_warn__Werror" >&6; } +if test "x$gl_cv_warn__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 + + + +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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + { $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 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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef bool + "error: bool is not defined" +#endif +#ifndef false + "error: false is not defined" +#endif +#if false + "error: false is not 0" +#endif +#ifndef true + "error: true is not defined" +#endif +#if true != 1 + "error: true is not 1" +#endif +#ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" +#endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } +ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_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 opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break +fi +done +if ${ac_cv_search_opendir+:} false; then : + +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif + +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stat_broken=no +else + ac_cv_header_stat_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +$as_echo "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi + +ac_fn_c_check_member "$LINENO" "struct stat" "st_aclcnt" "ac_cv_member_struct_stat_st_aclcnt" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_aclcnt" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ACLCNT 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_fstype" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_FSTYPE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_GEN 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_level" "ac_cv_member_struct_stat_st_level" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_level" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_LEVEL 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in (asm|sys)/stat.h" >&5 +$as_echo_n "checking for stat64 in (asm|sys)/stat.h... " >&6; } +if ${ac_cv_type_stat64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ +struct stat64 st; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_stat64=yes +else + ac_cv_type_stat64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stat64" >&5 +$as_echo "$ac_cv_type_stat64" >&6; } +if test "$ac_cv_type_stat64" = yes +then + +$as_echo "#define HAVE_STAT64 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs64 in sys/vfs.h" >&5 +$as_echo_n "checking for statfs64 in sys/vfs.h... " >&6; } +if ${ac_cv_type_statfs64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +struct statfs64 st; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_statfs64=yes +else + ac_cv_type_statfs64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_statfs64" >&5 +$as_echo "$ac_cv_type_statfs64" >&6; } +if test "$ac_cv_type_statfs64" = yes +then + +$as_echo "#define HAVE_STATFS64 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ $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 + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +$as_echo_n "checking type of array argument to getgroups... " >&6; } +if ${ac_cv_type_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_type_getgroups=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +if test $ac_cv_type_getgroups = cross; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +$as_echo "$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if ${ac_cv_header_sys_types_h_makedev+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return makedev(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes +else + ac_cv_header_sys_types_h_makedev=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: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : + +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h + +fi + + + + if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : + +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h + +fi + + + fi +fi + +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" "siginfo_t" "ac_cv_type_siginfo_t" "#include +" +if test "x$ac_cv_type_siginfo_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T 1 +_ACEOF + + +fi + +ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "#include +#include +#include +" +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" +if test "x$ac_cv_type_long_long" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for little endian long long" >&5 +$as_echo_n "checking for little endian long long... " >&6; } +if ${ac_cv_have_little_endian_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + +if test "x$ac_cv_c_bigendian" = "xyes"; then + ac_cv_have_little_endian_long_long=no +else + ac_cv_have_little_endian_long_long=yes +fi + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main () { + union { + long long ll; + int l [2]; + } u; + u.ll = 0x12345678; + if (u.l[0] == 0x12345678) + return 0; + return 1; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_have_little_endian_long_long=yes +else + ac_cv_have_little_endian_long_long=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: $ac_cv_have_little_endian_long_long" >&5 +$as_echo "$ac_cv_have_little_endian_long_long" >&6; } +if test "$ac_cv_have_little_endian_long_long" = yes +then + +$as_echo "#define HAVE_LITTLE_ENDIAN_LONG_LONG 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long off_t" >&5 +$as_echo_n "checking for long long off_t... " >&6; } +if ${ac_cv_have_long_long_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +char a[(sizeof (off_t) == sizeof (long long) && + sizeof (off_t) > sizeof (long)) - 1]; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_long_long_off_t=yes +else + ac_cv_have_long_long_off_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_off_t" >&5 +$as_echo "$ac_cv_have_long_long_off_t" >&6; } +if test "$ac_cv_have_long_long_off_t" = yes +then + +$as_echo "#define HAVE_LONG_LONG_OFF_T 1" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "struct opthdr" "ac_cv_type_struct_opthdr" "#include +" +if test "x$ac_cv_type_struct_opthdr" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_OPTHDR 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "struct t_opthdr" "ac_cv_type_struct_t_opthdr" "#include +" +if test "x$ac_cv_type_struct_t_opthdr" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_T_OPTHDR 1 +_ACEOF + + +fi + + +for ac_func in fork if_indextoname inet_ntop prctl process_vm_readv sendmsg sigaction stpcpy strerror strsignal _sys_siglist sys_siglist +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 + +for ac_header in asm/cachectl.h asm/sysmips.h elf.h inttypes.h ioctls.h linux/capability.h linux/perf_event.h linux/ptrace.h linux/utsname.h mqueue.h netinet/sctp.h poll.h stropts.h sys/acl.h sys/asynch.h sys/conf.h sys/epoll.h sys/filio.h sys/ioctl.h sys/poll.h sys/ptrace.h sys/reg.h sys/uio.h sys/vfs.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 linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.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 +#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 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 + +ac_fn_c_check_type "$LINENO" "struct sigcontext_struct" "ac_cv_type_struct_sigcontext_struct" "#include +" +if test "x$ac_cv_type_struct_sigcontext_struct" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SIGCONTEXT_STRUCT 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 + +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 + + +ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#include +" +if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct T_conn_res" "QUEUE_ptr" "ac_cv_member_struct_T_conn_res_QUEUE_ptr" "#include +#include +" +if test "x$ac_cv_member_struct_T_conn_res_QUEUE_ptr" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_T_CONN_RES_QUEUE_PTR 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct T_conn_res" "ACCEPTOR_id" "ac_cv_member_struct_T_conn_res_ACCEPTOR_id" "#include +#include +" +if test "x$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_T_CONN_RES_ACCEPTOR_ID 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct __old_kernel_stat" "ac_cv_type_struct___old_kernel_stat" "#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 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 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 dqblk" "dqb_curblocks" "ac_cv_member_struct_dqblk_dqb_curblocks" "#include +" +if test "x$ac_cv_member_struct_dqblk_dqb_curblocks" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_DQBLK_DQB_CURBLOCKS 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct sigcontext" "sc_hi2" "ac_cv_member_struct_sigcontext_sc_hi2" "#include +#ifdef HAVE_ASM_SIGCONTEXT_H +# include +#endif +" +if test "x$ac_cv_member_struct_sigcontext_sc_hi2" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SIGCONTEXT_SC_HI2 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_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" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include +" +if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include +" +if test "x$ac_cv_have_decl__sys_siglist" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SYS_SIGLIST $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_CLONE" "ac_cv_have_decl_PTRACE_EVENT_CLONE" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_CLONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_CLONE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_EXEC" "ac_cv_have_decl_PTRACE_EVENT_EXEC" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_EXEC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_EXEC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_EXIT" "ac_cv_have_decl_PTRACE_EVENT_EXIT" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_EXIT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_EXIT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_FORK" "ac_cv_have_decl_PTRACE_EVENT_FORK" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_FORK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_FORK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_VFORK" "ac_cv_have_decl_PTRACE_EVENT_VFORK" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_VFORK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_VFORK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_EVENT_VFORK_DONE" "ac_cv_have_decl_PTRACE_EVENT_VFORK_DONE" "#include +" +if test "x$ac_cv_have_decl_PTRACE_EVENT_VFORK_DONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_EVENT_VFORK_DONE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_GETEVENTMSG" "ac_cv_have_decl_PTRACE_GETEVENTMSG" "#include +" +if test "x$ac_cv_have_decl_PTRACE_GETEVENTMSG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_GETEVENTMSG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_GETSIGINFO" "ac_cv_have_decl_PTRACE_GETSIGINFO" "#include +" +if test "x$ac_cv_have_decl_PTRACE_GETSIGINFO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_GETSIGINFO $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACECLONE" "ac_cv_have_decl_PTRACE_O_TRACECLONE" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACECLONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACECLONE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACEEXEC" "ac_cv_have_decl_PTRACE_O_TRACEEXEC" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACEEXEC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACEEXEC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACEEXIT" "ac_cv_have_decl_PTRACE_O_TRACEEXIT" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACEEXIT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACEEXIT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACEFORK" "ac_cv_have_decl_PTRACE_O_TRACEFORK" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACEFORK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACEFORK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACESYSGOOD" "ac_cv_have_decl_PTRACE_O_TRACESYSGOOD" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACESYSGOOD" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACESYSGOOD $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_O_TRACEVFORK" "ac_cv_have_decl_PTRACE_O_TRACEVFORK" "#include +" +if test "x$ac_cv_have_decl_PTRACE_O_TRACEVFORK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_O_TRACEVFORK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_SETOPTIONS" "ac_cv_have_decl_PTRACE_SETOPTIONS" "#include +" +if test "x$ac_cv_have_decl_PTRACE_SETOPTIONS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_SETOPTIONS $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 + + +{ $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 rlim_t" >&5 +$as_echo_n "checking size of rlim_t... " >&6; } +if ${ac_cv_sizeof_rlim_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (rlim_t))" "ac_cv_sizeof_rlim_t" "#include +"; then : + +else + if test "$ac_cv_type_rlim_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 (rlim_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_rlim_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_rlim_t" >&5 +$as_echo "$ac_cv_sizeof_rlim_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_RLIM_T $ac_cv_sizeof_rlim_t +_ACEOF + + + +for ac_header in libaio.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default" +if test "x$ac_cv_header_libaio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAIO_H 1 +_ACEOF + + ac_fn_c_check_member "$LINENO" "struct iocb" "u.c.flags" "ac_cv_member_struct_iocb_u_c_flags" "#include +" +if test "x$ac_cv_member_struct_iocb_u_c_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IOCB_U_C_FLAGS 1 +_ACEOF + + +fi + + ac_fn_c_check_decl "$LINENO" "IO_CMD_PWRITE" "ac_cv_have_decl_IO_CMD_PWRITE" "#include +" +if test "x$ac_cv_have_decl_IO_CMD_PWRITE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IO_CMD_PWRITE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "IO_CMD_PWRITEV" "ac_cv_have_decl_IO_CMD_PWRITEV" "#include +" +if test "x$ac_cv_have_decl_IO_CMD_PWRITEV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_IO_CMD_PWRITEV $ac_have_decl +_ACEOF + + +fi + +done + + + + +{ $as_echo "$as_me:$LINENO: checking for in -l" >&5 +$as_echo_n "checking for in -l... " >&6; } +if test "${ac_cv_lib__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 (); +int +main () +{ +return (); + ; + return 0; +} +_ACEOF +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:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib__=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib__" >&5 +$as_echo "$ac_cv_lib__" >&6; } +if test "x$ac_cv_lib__" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIB 1 +_ACEOF + + LIBS="-l $LIBS" + +fi + + + +# Check whether --with-libunwind was given. +if test "${with_libunwind+set}" = set; then + withval=$with_libunwind; +else + with_libunwind=yes +fi + + +if test "x$with_libunwind" != xno; then + + if test "$arch" = "x86_64"; then + +{ $as_echo "$as_me:$LINENO: checking for _Ux86_64_init_local in -lunwind-x86_64" >&5 +$as_echo_n "checking for _Ux86_64_init_local in -lunwind-x86_64... " >&6; } +if test "${ac_cv_lib_unwind_x86_64__Ux86_64_init_local+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lunwind-x86_64 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 _Ux86_64_init_local (); +int +main () +{ +return _Ux86_64_init_local (); + ; + return 0; +} +_ACEOF +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:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_unwind_x86_64__Ux86_64_init_local=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_unwind_x86_64__Ux86_64_init_local=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_x86_64__Ux86_64_init_local" >&5 +$as_echo "$ac_cv_lib_unwind_x86_64__Ux86_64_init_local" >&6; } +if test "x$ac_cv_lib_unwind_x86_64__Ux86_64_init_local" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND_X86_64 1 +_ACEOF + + LIBS="-lunwind-x86_64 $LIBS" + +else + { $as_echo "$as_me:$LINENO: \"libunwind-x86_64 library could not be found!\"" >&5 +$as_echo "$as_me: \"libunwind-x86_64 library could not be found!\"" >&6;} +exit 128 +fi + + elif test "$arch" = "i386"; then + +{ $as_echo "$as_me:$LINENO: checking for _ULx86_init_local in -lunwind" >&5 +$as_echo_n "checking for _ULx86_init_local in -lunwind... " >&6; } +if test "${ac_cv_lib_unwind__ULx86_init_local+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lunwind $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 _ULx86_init_local (); +int +main () +{ +return _ULx86_init_local (); + ; + return 0; +} +_ACEOF +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:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_unwind__ULx86_init_local=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_unwind__ULx86_init_local=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_unwind__ULx86_init_local" >&5 +$as_echo "$ac_cv_lib_unwind__ULx86_init_local" >&6; } +if test "x$ac_cv_lib_unwind__ULx86_init_local" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND 1 +_ACEOF + + LIBS="-lunwind $LIBS" + +else + { $as_echo "$as_me:$LINENO: \"libunwind library could not be found!\"" >&5 +$as_echo "$as_me: \"libunwind library could not be found!\"" >&6;} +exit 128 +fi + + fi + +{ $as_echo "$as_me:$LINENO: checking for _UPT_create in -lunwind-ptrace" >&5 +$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; } +if test "${ac_cv_lib_unwind_ptrace__UPT_create+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lunwind-ptrace $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +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:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_unwind_ptrace__UPT_create=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_unwind_ptrace__UPT_create=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$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" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND_PTRACE 1 +_ACEOF + + LIBS="-lunwind-ptrace $LIBS" + +else + { $as_echo "$as_me:$LINENO: \"libunwind-ptrace library could not be found!\"" >&5 +$as_echo "$as_me: \"libunwind-ptrace library could not be found!\"" >&6;} +exit 128 +fi + + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 + + + +ac_config_files="$ac_config_files Makefile tests/Makefile" + +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 + + + 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 "${I386_TRUE}" && test -z "${I386_FALSE}"; then + as_fn_error $? "conditional \"I386\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${X86_64_TRUE}" && test -z "${X86_64_FALSE}"; then + as_fn_error $? "conditional \"X86_64\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${X32_TRUE}" && test -z "${X32_FALSE}"; then + as_fn_error $? "conditional \"X32\" 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 -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +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 + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# 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 alice-strace $as_me 0.1, which was +generated by GNU Autoconf 2.68. 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 ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +alice-strace config.status 0.1 +configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2011 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" ;; + + *) 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"" || { + # Autoconf 2.62 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"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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/alice-strace/count.c b/alice-strace/count.c new file mode 100644 index 0000000..8395466 --- /dev/null +++ b/alice-strace/count.c @@ -0,0 +1,249 @@ +/* + * 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) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * Copyright (c) 2004 Roland McGrath + * Copyright (c) 2006 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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" + +/* Per-syscall stats structure */ +struct call_counts { + /* system time spent in syscall (not wall clock time) */ + struct timeval time; + int calls, errors; +}; + +static struct call_counts *countv[SUPPORTED_PERSONALITIES]; +#define counts (countv[current_personality]) + +static struct timeval shortest = { 1000000, 0 }; + +/* On entry, tv is syscall exit timestamp */ +void +count_syscall(struct tcb *tcp, struct timeval *tv) +{ + struct call_counts *cc; + unsigned long scno = tcp->scno; + + if (!SCNO_IN_RANGE(scno)) + return; + + if (!counts) { + counts = calloc(nsyscalls, sizeof(*counts)); + if (!counts) + die_out_of_memory(); + } + cc = &counts[scno]; + + cc->calls++; + if (tcp->u_error) + cc->errors++; + + /* tv = wall clock time spent while in syscall */ + tv_sub(tv, tv, &tcp->etime); + + /* Spent more wall clock time than spent system time? (usually yes) */ + if (tv_cmp(tv, &tcp->dtime) > 0) { + static struct timeval one_tick = { -1, 0 }; + + if (one_tick.tv_sec == -1) { + /* Initialize it. */ + struct itimerval it; + + memset(&it, 0, sizeof it); + it.it_interval.tv_usec = 1; + setitimer(ITIMER_REAL, &it, NULL); + getitimer(ITIMER_REAL, &it); + one_tick = it.it_interval; +//FIXME: this hack doesn't work (tested on linux-3.6.11): one_tick = 0.000000 +//tprintf(" one_tick.tv_usec:%u\n", (unsigned)one_tick.tv_usec); + } + + if (tv_nz(&tcp->dtime)) + /* tv = system time spent, if it isn't 0 */ + *tv = tcp->dtime; + else if (tv_cmp(tv, &one_tick) > 0) { + /* tv = smallest "sane" time interval */ + if (tv_cmp(&shortest, &one_tick) < 0) + *tv = shortest; + else + *tv = one_tick; + } + } + if (tv_cmp(tv, &shortest) < 0) + shortest = *tv; + tv_add(&cc->time, &cc->time, tv); +} + +static int +time_cmp(void *a, void *b) +{ + return -tv_cmp(&counts[*((int *) a)].time, + &counts[*((int *) b)].time); +} + +static int +syscall_cmp(void *a, void *b) +{ + return strcmp(sysent[*((int *) a)].sys_name, + sysent[*((int *) b)].sys_name); +} + +static int +count_cmp(void *a, void *b) +{ + int m = counts[*((int *) a)].calls; + int n = counts[*((int *) b)].calls; + + return (m < n) ? 1 : (m > n) ? -1 : 0; +} + +static int (*sortfun)(); +static struct timeval overhead = { -1, -1 }; + +void +set_sortby(const char *sortby) +{ + if (strcmp(sortby, "time") == 0) + sortfun = time_cmp; + else if (strcmp(sortby, "calls") == 0) + sortfun = count_cmp; + else if (strcmp(sortby, "name") == 0) + sortfun = syscall_cmp; + else if (strcmp(sortby, "nothing") == 0) + sortfun = NULL; + else { + error_msg_and_die("invalid sortby: '%s'", sortby); + } +} + +void set_overhead(int n) +{ + overhead.tv_sec = n / 1000000; + overhead.tv_usec = n % 1000000; +} + +static void +call_summary_pers(FILE *outf) +{ + int i; + int call_cum, error_cum; + struct timeval tv_cum, dtv; + double float_tv_cum; + double percent; + const char *dashes = "----------------"; + char error_str[sizeof(int)*3]; + int *sorted_count; + + fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n", + "% time", "seconds", "usecs/call", + "calls", "errors", "syscall"); + fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n", + dashes, dashes, dashes, dashes, dashes, dashes); + + sorted_count = calloc(sizeof(int), nsyscalls); + if (!sorted_count) + die_out_of_memory(); + call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_usec = 0; + if (overhead.tv_sec == -1) { + tv_mul(&overhead, &shortest, 8); + tv_div(&overhead, &overhead, 10); + } + for (i = 0; i < nsyscalls; i++) { + sorted_count[i] = i; + if (counts == NULL || counts[i].calls == 0) + continue; + tv_mul(&dtv, &overhead, counts[i].calls); + tv_sub(&counts[i].time, &counts[i].time, &dtv); + call_cum += counts[i].calls; + error_cum += counts[i].errors; + tv_add(&tv_cum, &tv_cum, &counts[i].time); + } + float_tv_cum = tv_float(&tv_cum); + if (counts) { + if (sortfun) + qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun); + for (i = 0; i < nsyscalls; i++) { + double float_syscall_time; + int idx = sorted_count[i]; + struct call_counts *cc = &counts[idx]; + if (cc->calls == 0) + continue; + tv_div(&dtv, &cc->time, cc->calls); + error_str[0] = '\0'; + if (cc->errors) + sprintf(error_str, "%u", cc->errors); + float_syscall_time = tv_float(&cc->time); + percent = (100.0 * float_syscall_time); + if (percent != 0.0) + percent /= float_tv_cum; + /* else: float_tv_cum can be 0.0 too and we get 0/0 = NAN */ + fprintf(outf, "%6.2f %11.6f %11lu %9u %9.9s %s\n", + percent, float_syscall_time, + (long) (1000000 * dtv.tv_sec + dtv.tv_usec), + cc->calls, + error_str, sysent[idx].sys_name); + } + } + free(sorted_count); + + fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n", + dashes, dashes, dashes, dashes, dashes, dashes); + error_str[0] = '\0'; + if (error_cum) + sprintf(error_str, "%u", error_cum); + fprintf(outf, "%6.6s %11.6f %11.11s %9u %9.9s %s\n", + "100.00", float_tv_cum, "", + call_cum, error_str, "total"); +} + +void +call_summary(FILE *outf) +{ + int i, old_pers = current_personality; + + for (i = 0; i < SUPPORTED_PERSONALITIES; ++i) { + if (!countv[i]) + continue; + + if (current_personality != i) + set_personality(i); + if (i) + fprintf(outf, + "System call usage summary for %d bit mode:\n", + current_wordsize * 8); + call_summary_pers(outf); + } + + if (old_pers != current_personality) + set_personality(old_pers); +} diff --git a/alice-strace/debian/alice-strace-udeb.install b/alice-strace/debian/alice-strace-udeb.install new file mode 100644 index 0000000..1f41928 --- /dev/null +++ b/alice-strace/debian/alice-strace-udeb.install @@ -0,0 +1 @@ +build/strace usr/bin diff --git a/alice-strace/debian/alice-strace.docs b/alice-strace/debian/alice-strace.docs new file mode 100644 index 0000000..edc0071 --- /dev/null +++ b/alice-strace/debian/alice-strace.docs @@ -0,0 +1 @@ +NEWS diff --git a/alice-strace/debian/alice-strace.examples b/alice-strace/debian/alice-strace.examples new file mode 100644 index 0000000..06b4d96 --- /dev/null +++ b/alice-strace/debian/alice-strace.examples @@ -0,0 +1 @@ +strace-graph diff --git a/alice-strace/debian/alice-strace.install b/alice-strace/debian/alice-strace.install new file mode 100644 index 0000000..1f41928 --- /dev/null +++ b/alice-strace/debian/alice-strace.install @@ -0,0 +1 @@ +build/strace usr/bin diff --git a/alice-strace/debian/alice-strace.manpages b/alice-strace/debian/alice-strace.manpages new file mode 100644 index 0000000..5e74dd7 --- /dev/null +++ b/alice-strace/debian/alice-strace.manpages @@ -0,0 +1 @@ +strace.1 diff --git a/alice-strace/debian/alice-strace64.install b/alice-strace/debian/alice-strace64.install new file mode 100644 index 0000000..2d3036d --- /dev/null +++ b/alice-strace/debian/alice-strace64.install @@ -0,0 +1 @@ +build64/strace64 usr/bin diff --git a/alice-strace/debian/alice-strace64.manpages b/alice-strace/debian/alice-strace64.manpages new file mode 100644 index 0000000..e3adc93 --- /dev/null +++ b/alice-strace/debian/alice-strace64.manpages @@ -0,0 +1 @@ +strace64.1 diff --git a/alice-strace/debian/changelog b/alice-strace/debian/changelog new file mode 100644 index 0000000..39bb56f --- /dev/null +++ b/alice-strace/debian/changelog @@ -0,0 +1,800 @@ +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 +02 + +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; priority=LOW + + * Revamped debian files + + -- Wichert Akkerman , Thu Jul 11 20:19:11 MET DST 1996 + + +strace (3.1-2) unstable; priority=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; priority=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/alice-strace/debian/compat b/alice-strace/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/alice-strace/debian/compat @@ -0,0 +1 @@ +7 diff --git a/alice-strace/debian/control b/alice-strace/debian/control new file mode 100644 index 0000000..417a909 --- /dev/null +++ b/alice-strace/debian/control @@ -0,0 +1,56 @@ +Source: strace +Maintainer: Frederik Schüler +Section: utils +Priority: optional +Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [i386 powerpc s390 sparc], debhelper (>= 7.0.0) +Standards-Version: 3.8.4 +Homepage: http://sourceforge.net/projects/strace/ + +Package: strace +Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4 sparc sparc64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A system call tracer + strace is a system call tracer, i.e. a debugging tool which prints out + a trace of all the system calls made by a another process/program. + The program to be traced need not be recompiled for this, so you can + use it on binaries for which you don't have source. + . + System calls and signals are events that happen at the user/kernel + interface. A close examination of this boundary is very useful for bug + isolation, sanity checking and attempting to capture race conditions. + +Package: strace64 +Architecture: i386 powerpc s390 sparc +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A system call tracer for 64bit binaries + strace is a system call tracer, i.e. a debugging tool which prints out + a trace of all the system calls made by a another process/program. + The program to be traced need not be recompiled for this, so you can + use it on binaries for which you don't have source. + . + This package containts the 64bit version of the binary, intended for + biarch systems with 32bit userland and 64bit kernel. + . + System calls and signals are events that happen at the user/kernel + interface. A close examination of this boundary is very useful for bug + isolation, sanity checking and attempting to capture race conditions. + +Package: strace-udeb +Section: debian-installer +XC-Package-Type: udeb +Priority: extra +Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 sh4 sparc sparc64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A system call tracer + strace is a system call tracer, i.e. a debugging tool which prints out + a trace of all the system calls made by a another process/program. + The program to be traced need not be recompiled for this, so you can + use it on binaries for which you don't have source. + . + System calls and signals are events that happen at the user/kernel + interface. A close examination of this boundary is very useful for bug + isolation, sanity checking and attempting to capture race conditions. + . + This is a stripped down package intended for debugging use in the Debian + installer. diff --git a/alice-strace/debian/copyright b/alice-strace/debian/copyright new file mode 100644 index 0000000..fd35507 --- /dev/null +++ b/alice-strace/debian/copyright @@ -0,0 +1,39 @@ +This is the Debian packaged version of strace. For a complete list of +changes from the upstream version please see the changelog. + +The upstream sources can be found at http://sourceforge.net/projects/strace/ + +This is the copyright as found in the upstream sources: + +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-2003 Wichert Akkerman +Copyright (c) 2002-2008 Roland McGrath +Copyright (c) 2003-2008 Dmitry V. Levin +Copyright (c) 2007-2008 Jan Kratochvil +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(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/alice-strace/debian/rules b/alice-strace/debian/rules new file mode 100755 index 0000000..b997182 --- /dev/null +++ b/alice-strace/debian/rules @@ -0,0 +1,86 @@ +#! /usr/bin/make -f + +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) + +arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x +ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map))) + HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \ + $(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu + CC64 = gcc -m64 + extra_build_targets += build64-stamp +endif + +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) +else + CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + +all build: build-stamp $(extra_build_targets) + +%-stamp: %/Makefile + $(MAKE) -C $* +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) -C $* check +endif + touch $@ + +build/Makefile: + mkdir -p $(@D) + cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS) + +build64/Makefile: + mkdir -p $(@D) + cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64) + +clean: + dh_testdir + dh_testroot + rm -rf build build64 strace64.1 + dh_clean + +binary: binary-indep binary-arch + +binary-indep: + +binary-arch: build + test -f build-stamp || make $(MFLAGS) -f debian/rules build + + # prepare 64bit executable and manpage, if it has been built + test -f build64-stamp && ( mv build64/strace build64/strace64 ; \ + cp strace.1 strace64.1 ) || true + + dh_testdir -s + dh_testroot -s + dh_installdirs -s + dh_installdocs -s + dh_installman -s + dh_installexamples -s + dh_installchangelogs -s + dh_install -s + dh_link -s + dh_strip -s + dh_compress -s + dh_fixperms -s + dh_installdeb -s + dh_shlibdeps -s + dh_gencontrol -s + dh_md5sums -s + dh_builddeb -s diff --git a/alice-strace/debian/source/format b/alice-strace/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/alice-strace/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/alice-strace/debian/watch b/alice-strace/debian/watch new file mode 100644 index 0000000..5e4f652 --- /dev/null +++ b/alice-strace/debian/watch @@ -0,0 +1,2 @@ +version=3 +opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz diff --git a/alice-strace/defs.h b/alice-strace/defs.h new file mode 100644 index 0000000..5353063 --- /dev/null +++ b/alice-strace/defs.h @@ -0,0 +1,850 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#ifdef _LARGEFILE64_SOURCE +/* This is the macro everything checks before using foo64 names. */ +# ifndef _LFS64_LARGEFILE +# define _LFS64_LARGEFILE 1 +# endif +#endif + +#ifdef MIPS +# include +# if _MIPS_SIM == _MIPS_SIM_ABI64 +# define LINUX_MIPSN64 +# elif _MIPS_SIM == _MIPS_SIM_NABI32 +# define LINUX_MIPSN32 +# elif _MIPS_SIM == _MIPS_SIM_ABI32 +# define LINUX_MIPSO32 +# else +# error Unsupported _MIPS_SIM +# endif +#endif + +#include +#ifdef HAVE_STDBOOL_H +# include +#endif +#include +#include +#include +#ifdef STDC_HEADERS +# include +#endif +#include +#include +#include +/* Open-coding isprint(ch) et al proved more efficient than calling + * generalized libc interface. We don't *want* to do non-ASCII anyway. + */ +/* #include */ +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_STRERROR +const char *strerror(int); +#endif +#ifndef HAVE_STPCPY +/* Some libc have stpcpy, some don't. Sigh... + * Roll our private implementation... + */ +#undef stpcpy +#define stpcpy strace_stpcpy +extern char *stpcpy(char *dst, const char *src); +#endif + +#if !defined __GNUC__ +# define __attribute__(x) /*nothing*/ +#endif + +#ifndef offsetof +# define offsetof(type, member) \ + (((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL)) +#endif + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + +/* macros */ +#ifndef MAX +# define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef MIN +# define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#define CLAMP(val, min, max) MIN(MAX(min, val), max) + +/* Glibc has an efficient macro for sigemptyset + * (it just does one or two assignments of 0 to internal vector of longs). + */ +#if defined(__GLIBC__) && defined(__sigemptyset) && !defined(sigemptyset) +# define sigemptyset __sigemptyset +#endif + +/* Configuration section */ +#ifndef DEFAULT_STRLEN +/* default maximum # of bytes printed in `printstr', change with -s switch */ +# define DEFAULT_STRLEN 32 +#endif +#ifndef DEFAULT_ACOLUMN +# define DEFAULT_ACOLUMN 40 /* default alignment column for results */ +#endif +/* + * Maximum number of args to a syscall. + * + * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS! + * linux//syscallent*.h: + * all have nargs <= 6 except mips o32 which has nargs <= 7. + */ +#ifndef MAX_ARGS +# ifdef LINUX_MIPSO32 +# define MAX_ARGS 7 +# else +# define MAX_ARGS 6 +# endif +#endif +/* default sorting method for call profiling */ +#ifndef DEFAULT_SORTBY +# define DEFAULT_SORTBY "time" +#endif +/* + * Experimental code using PTRACE_SEIZE can be enabled here. + * This needs Linux kernel 3.4.x or later to work. + */ +#define USE_SEIZE 1 +/* To force NOMMU build, set to 1 */ +#define NOMMU_SYSTEM 0 + +#if (defined(SPARC) || defined(SPARC64) \ + || defined(I386) || defined(X32) || defined(X86_64) \ + || defined(ARM) || defined(AARCH64) \ + || defined(AVR32) \ + || defined(OR1K) \ + || defined(METAG) \ + || defined(TILE) \ + || defined(XTENSA) \ + ) && defined(__GLIBC__) +# include +#else +/* Work around awkward prototype in ptrace.h. */ +# define ptrace xptrace +# include +# undef ptrace +# ifdef POWERPC +# define __KERNEL__ +# include +# undef __KERNEL__ +# endif +extern long ptrace(int, int, char *, long); +#endif + +#if defined(TILE) +# include /* struct pt_regs */ +#endif + +#if !HAVE_DECL_PTRACE_SETOPTIONS +# define PTRACE_SETOPTIONS 0x4200 +#endif +#if !HAVE_DECL_PTRACE_GETEVENTMSG +# define PTRACE_GETEVENTMSG 0x4201 +#endif +#if !HAVE_DECL_PTRACE_GETSIGINFO +# define PTRACE_GETSIGINFO 0x4202 +#endif + +#if !HAVE_DECL_PTRACE_O_TRACESYSGOOD +# define PTRACE_O_TRACESYSGOOD 0x00000001 +#endif +#if !HAVE_DECL_PTRACE_O_TRACEFORK +# define PTRACE_O_TRACEFORK 0x00000002 +#endif +#if !HAVE_DECL_PTRACE_O_TRACEVFORK +# define PTRACE_O_TRACEVFORK 0x00000004 +#endif +#if !HAVE_DECL_PTRACE_O_TRACECLONE +# define PTRACE_O_TRACECLONE 0x00000008 +#endif +#if !HAVE_DECL_PTRACE_O_TRACEEXEC +# define PTRACE_O_TRACEEXEC 0x00000010 +#endif +#if !HAVE_DECL_PTRACE_O_TRACEEXIT +# define PTRACE_O_TRACEEXIT 0x00000040 +#endif + +#if !HAVE_DECL_PTRACE_EVENT_FORK +# define PTRACE_EVENT_FORK 1 +#endif +#if !HAVE_DECL_PTRACE_EVENT_VFORK +# define PTRACE_EVENT_VFORK 2 +#endif +#if !HAVE_DECL_PTRACE_EVENT_CLONE +# define PTRACE_EVENT_CLONE 3 +#endif +#if !HAVE_DECL_PTRACE_EVENT_EXEC +# define PTRACE_EVENT_EXEC 4 +#endif +#if !HAVE_DECL_PTRACE_EVENT_VFORK_DONE +# define PTRACE_EVENT_VFORK_DONE 5 +#endif +#if !HAVE_DECL_PTRACE_EVENT_EXIT +# define PTRACE_EVENT_EXIT 6 +#endif + +#if !defined(__GLIBC__) +# define PTRACE_PEEKUSER PTRACE_PEEKUSR +# define PTRACE_POKEUSER PTRACE_POKEUSR +#endif + +#if USE_SEIZE +# undef PTRACE_SEIZE +# define PTRACE_SEIZE 0x4206 +# undef PTRACE_INTERRUPT +# define PTRACE_INTERRUPT 0x4207 +# undef PTRACE_LISTEN +# define PTRACE_LISTEN 0x4208 +# undef PTRACE_EVENT_STOP +# define PTRACE_EVENT_STOP 128 +#endif + +#ifdef ALPHA +# define REG_R0 0 +# define REG_A0 16 +# define REG_A3 19 +# define REG_FP 30 +# define REG_PC 64 +#endif /* ALPHA */ +#ifdef MIPS +# define REG_V0 2 +# define REG_A0 4 +# define REG_A3 7 +# define REG_SP 29 +# define REG_EPC 64 +#endif /* MIPS */ +#ifdef HPPA +# define PT_GR20 (20*4) +# define PT_GR26 (26*4) +# define PT_GR28 (28*4) +# define PT_IAOQ0 (106*4) +# define PT_IAOQ1 (107*4) +#endif /* HPPA */ +#ifdef SH64 + /* SH64 Linux - this code assumes the following kernel API for system calls: + PC Offset 0 + System Call Offset 16 (actually, (syscall no.) | (0x1n << 16), + where n = no. of parameters. + Other regs Offset 24+ + + On entry: R2-7 = parameters 1-6 (as many as necessary) + On return: R9 = result. */ + + /* Offset for peeks of registers */ +# define REG_OFFSET (24) +# define REG_GENERAL(x) (8*(x)+REG_OFFSET) +# define REG_PC (0*8) +# define REG_SYSCALL (2*8) +#endif /* SH64 */ +#ifdef AARCH64 +struct arm_pt_regs { + int uregs[18]; +}; +# define ARM_cpsr uregs[16] +# define ARM_pc uregs[15] +# define ARM_lr uregs[14] +# define ARM_sp uregs[13] +# define ARM_ip uregs[12] +# define ARM_fp uregs[11] +# define ARM_r10 uregs[10] +# define ARM_r9 uregs[9] +# define ARM_r8 uregs[8] +# define ARM_r7 uregs[7] +# define ARM_r6 uregs[6] +# define ARM_r5 uregs[5] +# define ARM_r4 uregs[4] +# define ARM_r3 uregs[3] +# define ARM_r2 uregs[2] +# define ARM_r1 uregs[1] +# define ARM_r0 uregs[0] +# define ARM_ORIG_r0 uregs[17] +#endif /* AARCH64 */ + +#if defined(SPARC) || defined(SPARC64) +/* Indexes into the pt_regs.u_reg[] array -- UREG_XX from kernel are all off + * by 1 and use Ix instead of Ox. These work for both 32 and 64 bit Linux. */ +# define U_REG_G1 0 +# define U_REG_O0 7 +# define U_REG_O1 8 +# define PERSONALITY0_WORDSIZE 4 +# define PERSONALITY1_WORDSIZE 4 +# if defined(SPARC64) +# include +# define SUPPORTED_PERSONALITIES 3 +# define PERSONALITY2_WORDSIZE 8 +# else +# include +# define SUPPORTED_PERSONALITIES 2 +# endif /* SPARC64 */ +#endif /* SPARC[64] */ + +#ifdef X86_64 +# define SUPPORTED_PERSONALITIES 3 +# define PERSONALITY0_WORDSIZE 8 +# define PERSONALITY1_WORDSIZE 4 +# define PERSONALITY2_WORDSIZE 4 +#endif + +#ifdef X32 +# define SUPPORTED_PERSONALITIES 2 +# define PERSONALITY0_WORDSIZE 4 +# define PERSONALITY1_WORDSIZE 4 +#endif + +#ifdef ARM +/* one personality */ +#endif + +#ifdef AARCH64 +/* The existing ARM personality, then AArch64 */ +# define SUPPORTED_PERSONALITIES 2 +# define PERSONALITY0_WORDSIZE 4 +# define PERSONALITY1_WORDSIZE 8 +# define DEFAULT_PERSONALITY 1 +#endif + +#ifdef POWERPC64 +# define SUPPORTED_PERSONALITIES 2 +# define PERSONALITY0_WORDSIZE 8 +# define PERSONALITY1_WORDSIZE 4 +#endif + +#ifdef TILE +# define SUPPORTED_PERSONALITIES 2 +# define PERSONALITY0_WORDSIZE 8 +# define PERSONALITY1_WORDSIZE 4 +# ifdef __tilepro__ +# define DEFAULT_PERSONALITY 1 +# endif +#endif + +#ifndef SUPPORTED_PERSONALITIES +# define SUPPORTED_PERSONALITIES 1 +#endif +#ifndef DEFAULT_PERSONALITY +# define DEFAULT_PERSONALITY 0 +#endif +#ifndef PERSONALITY0_WORDSIZE +# define PERSONALITY0_WORDSIZE (int)(sizeof(long)) +#endif + +#if defined(I386) +extern struct user_regs_struct i386_regs; +#elif defined(IA64) +extern long ia32; +#elif defined(SPARC) || defined(SPARC64) +extern struct pt_regs sparc_regs; +#elif defined(ARM) +extern struct pt_regs arm_regs; +#elif defined(TILE) +extern struct pt_regs tile_regs; +#endif + +typedef struct sysent { + unsigned nargs; + int sys_flags; + int (*sys_func)(); + const char *sys_name; +} struct_sysent; + +typedef struct ioctlent { + const char *doth; + const char *symbol; + unsigned long code; +} struct_ioctlent; + +#define HAVE_LIBUNWIND 1 +#define HAVE_LIBUNWIND_PTRACE 1 + +#if (defined(HAVE_LIBUNWIND) || defined(HAVE_LIBUNWIND_X86_64)) && defined(HAVE_LIBUNWIND_PTRACE) +# define LIBUNWIND +// put this #include as LATE in the file as possible, or else there might be +// include conflicts +# include "libunwind-ptrace.h" +#endif + +// like an assert except that it always fires, even in release builds +#define EXITIF(x) do { \ + if (x) { \ + fprintf(stderr, "Fatal error in %s [%s:%d]\n", __FUNCTION__, __FILE__, __LINE__); \ + exit(1); \ + } \ +} while(0) + +#if defined(X86_64) +// current_personality == 1 means that a 64-bit cde-exec is actually tracking a +// 32-bit target process at the moment: +#define IS_32BIT_EMU (current_personality == 1) +#endif + +// keep a sorted array of cache entries, so that we can binary search through +// it +struct mmap_cache_t { + // example entry: + // 7fabbb09b000-7fabbb09f000 r--p 00179000 fc:00 1180246 /lib/libc-2.11.1.so + // + // start_addr is 0x7fabbb09b000 + // end_addr is 0x7fabbb09f000 + // mmap_offset is 0x179000 + // binary_filename is "/lib/libc-2.11.1.so" + unsigned long start_addr; + unsigned long end_addr; + unsigned long mmap_offset; + char* binary_filename; +}; + +/* Trace Control Block */ +struct tcb { + int flags; /* See below for TCB_ values */ + int pid; /* Process Id of this entry */ + int qual_flg; /* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */ + int u_error; /* Error code */ + long scno; /* System call number */ + long u_arg[MAX_ARGS]; /* System call arguments */ +#if defined(LINUX_MIPSN32) || defined(X32) + long long ext_arg[MAX_ARGS]; + long long u_lrval; /* long long return value */ +#endif + long u_rval; /* Return value */ +#if SUPPORTED_PERSONALITIES > 1 + int currpers; /* Personality at the time of scno update */ +#endif + int curcol; /* Output column for this process */ + FILE *outf; /* Output file for this process */ + int out_dump_f; /* Output dump file for this process (fd) */ + FILE *out_stack_f; /* Output stack file for this process (fd) */ + const char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */ + const struct_sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */ + 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 */ + /* Support for tracing forked processes: */ + long inst[2]; /* Saved clone args (badly named) */ + + struct mmap_cache_t* mmap_cache; /* Cache of /proc//mmap contents */ + int mmap_cache_size; /* The size of the cache */ + + struct UPT_info* libunwind_ui; /* For libunwind */ +}; + +void alloc_mmap_cache(struct tcb* tcp); +void delete_mmap_cache(struct tcb* tcp); + + +/* TCB flags */ +#define TCB_INUSE 00001 /* This table entry is in use */ +/* We have attached to this process, but did not see it stopping yet */ +#define TCB_STARTUP 00002 +#define TCB_IGNORE_ONE_SIGSTOP 00004 /* Next SIGSTOP is to be ignored */ +/* + * Are we in system call entry or in syscall exit? + * + * This bit is set after all syscall entry processing is done. + * Therefore, this bit will be set when next ptrace stop occurs, + * which should be syscall exit stop. Other stops which are possible + * directly after syscall entry (death, ptrace event stop) + * are simpler and handled without calling trace_syscall(), therefore + * the places where TCB_INSYSCALL can be set but we aren't in syscall stop + * are limited to trace(), this condition is never observed in trace_syscall() + * and below. + * The bit is cleared after all syscall exit processing is done. + * User-generated SIGTRAPs and post-execve SIGTRAP make it necessary + * to be very careful and NOT set TCB_INSYSCALL bit when they are encountered. + * TCB_WAITEXECVE bit is used for this purpose (see below). + * + * Use entering(tcp) / exiting(tcp) to check this bit to make code more readable. + */ +#define TCB_INSYSCALL 00010 +#define TCB_ATTACHED 00020 /* It is attached already */ +/* Are we PROG from "strace PROG [ARGS]" invocation? */ +#define TCB_STRACE_CHILD 0040 +#define TCB_BPTSET 00100 /* "Breakpoint" set after fork(2) */ +#define TCB_REPRINT 00200 /* We should reprint this syscall on exit */ +#define TCB_FILTERED 00400 /* This system call has been filtered out */ +/* x86 does not need TCB_WAITEXECVE. + * It can detect post-execve SIGTRAP by looking at eax/rax. + * See "not a syscall entry (eax = %ld)\n" message. + * + * Note! On new kernels (about 2.5.46+), we use PTRACE_O_TRACEEXEC, which + * suppresses post-execve SIGTRAP. If you are adding a new arch which is + * only supported by newer kernels, you most likely don't need to define + * TCB_WAITEXECVE! + */ +#if defined(ALPHA) \ + || defined(SPARC) || defined(SPARC64) \ + || defined(POWERPC) \ + || defined(IA64) \ + || defined(HPPA) \ + || defined(SH) || defined(SH64) \ + || defined(S390) || defined(S390X) \ + || defined(ARM) \ + || defined(MIPS) +/* This tracee has entered into execve syscall. Expect post-execve SIGTRAP + * to happen. (When it is detected, tracee is continued and this bit is cleared.) + */ +# define TCB_WAITEXECVE 01000 +#endif + +/* 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 UNDEFINED_SCNO 0x100 /* Used only in tcp->qual_flg */ + +#define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE) + +#define entering(tcp) (!((tcp)->flags & TCB_INSYSCALL)) +#define exiting(tcp) ((tcp)->flags & TCB_INSYSCALL) +#define syserror(tcp) ((tcp)->u_error != 0) +#define verbose(tcp) ((tcp)->qual_flg & QUAL_VERBOSE) +#define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV) +#define filtered(tcp) ((tcp)->flags & TCB_FILTERED) + +struct xlat { + int val; + const char *str; +}; + +extern const struct xlat open_mode_flags[]; +extern const struct xlat addrfams[]; +extern const struct xlat struct_user_offsets[]; +extern const struct xlat open_access_modes[]; +extern const struct xlat whence_codes[]; + +/* Format of syscall return values */ +#define RVAL_DECIMAL 000 /* decimal format */ +#define RVAL_HEX 001 /* hex format */ +#define RVAL_OCTAL 002 /* octal format */ +#define RVAL_UDECIMAL 003 /* unsigned decimal format */ +#if defined(LINUX_MIPSN32) || defined(X32) +# 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 +#define RVAL_MASK 007 /* mask for these values */ + +#define RVAL_STR 010 /* Print `auxstr' field after return val */ +#define RVAL_NONE 020 /* Print nothing */ + +#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. */ + +typedef enum { + CFLAG_NONE = 0, + CFLAG_ONLY_STATS, + CFLAG_BOTH +} cflag_t; +extern cflag_t cflag; +extern bool debug_flag; +extern bool Tflag; +extern unsigned int qflag; +extern bool not_failing_only; +extern bool 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) +extern bool need_fork_exec_workarounds; +extern unsigned xflag; +extern unsigned followfork; +extern unsigned ptrace_setoptions; +extern unsigned max_strlen; +extern unsigned os_release; +#undef KERNEL_VERSION +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) + +enum bitness_t { BITNESS_CURRENT = 0, BITNESS_32 }; + +void error_msg(const char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +void perror_msg(const char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +void error_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2))); +void perror_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2))); +void die_out_of_memory(void) __attribute__ ((noreturn)); + +#ifdef USE_CUSTOM_PRINTF +/* + * Speed-optimized vfprintf implementation. + * See comment in vsprintf.c for allowed formats. + * Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u. + * + * 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. + */ +int strace_vfprintf(FILE *fp, const char *fmt, va_list args); +#else +# define strace_vfprintf vfprintf +#endif + +extern void set_sortby(const char *); +extern void set_overhead(int); +extern void qualify(const char *); +extern int trace_syscall(struct tcb *); +extern void count_syscall(struct tcb *, struct timeval *); +extern void call_summary(FILE *); + +#if defined(AVR32) \ + || defined(I386) \ + || defined(X86_64) || defined(X32) \ + || defined(AARCH64) \ + || defined(ARM) \ + || defined(SPARC) || defined(SPARC64) \ + || defined(TILE) \ + || defined(OR1K) \ + || defined(METAG) +extern long get_regs_error; +# define clear_regs() (get_regs_error = -1) +extern void get_regs(pid_t pid); +#else +# define get_regs_error 0 +# define clear_regs() ((void)0) +# define get_regs(pid) ((void)0) +#endif +extern int umoven(struct tcb *, long, int, char *); +#define umove(pid, addr, objp) \ + umoven((pid), (addr), sizeof(*(objp)), (char *) (objp)) +extern int umovestr(struct tcb *, long, int, char *); +extern int upeek(struct tcb *, long, long *); +#if defined(SPARC) || defined(SPARC64) || defined(IA64) || defined(SH) +extern long getrval2(struct tcb *); +#endif +/* + * On Linux, "setbpt" is a misnomer: we don't set a breakpoint + * (IOW: no poking in user's text segment), + * instead we change fork/vfork/clone into clone(CLONE_PTRACE). + * On newer kernels, we use PTRACE_O_TRACECLONE/TRACE[V]FORK instead. + */ +extern int setbpt(struct tcb *); +extern int clearbpt(struct tcb *); + +extern const char *signame(int); +extern int is_restart_error(struct tcb *); +extern void pathtrace_select(const char *); +extern int pathtrace_match(struct tcb *); +extern int getfdpath(struct tcb *, int, char *, unsigned); + +extern const char *xlookup(const struct xlat *, int); + +extern int string_to_uint(const char *str); +extern int string_quote(const char *, char *, long, int); + +/* a refers to the lower numbered u_arg, + * b refers to the higher numbered u_arg + */ +#if HAVE_LITTLE_ENDIAN_LONG_LONG +# define LONG_LONG(a,b) \ + ((long long)((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))) +#else +# define LONG_LONG(a,b) \ + ((long long)((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))) +#endif +extern int printllval(struct tcb *, const char *, int); + +extern void printxval(const struct xlat *, int, const char *); +extern int printargs(struct tcb *); +extern int printargs_lu(struct tcb *); +extern int printargs_ld(struct tcb *); +extern void addflags(const struct xlat *, int); +extern int printflags(const struct xlat *, int, const char *); +extern const char *sprintflags(const char *, const struct xlat *, int); +extern void dumpiov(struct tcb *, int, long); +extern void dumpstr(struct tcb *, long, int); +extern void printstr(struct tcb *, long, long); +extern void dump_bytes(struct tcb *, long, long); +extern void printnum(struct tcb *, long, const char *); +extern void printnum_int(struct tcb *, long, const char *); +extern void printpath(struct tcb *, long); +extern void printpathn(struct tcb *, long, int); +#define TIMESPEC_TEXT_BUFSIZE (sizeof(long)*3 * 2 + sizeof("{%u, %u}")) +#define TIMEVAL_TEXT_BUFSIZE TIMESPEC_TEXT_BUFSIZE +extern void printtv_bitness(struct tcb *, long, enum bitness_t, int); +#define printtv(tcp, addr) \ + printtv_bitness((tcp), (addr), BITNESS_CURRENT, 0) +#define printtv_special(tcp, addr) \ + printtv_bitness((tcp), (addr), BITNESS_CURRENT, 1) +extern char *sprinttv(char *, struct tcb *, long, enum bitness_t, int special); +extern void print_timespec(struct tcb *, long); +extern void sprint_timespec(char *, struct tcb *, long); +#ifdef HAVE_SIGINFO_T +extern void printsiginfo(siginfo_t *, int); +extern void printsiginfo_at(struct tcb *tcp, long addr); +#endif +extern void printfd(struct tcb *, int); +extern void printsock(struct tcb *, long, int); +extern void print_sock_optmgmt(struct tcb *, long, int); +extern void printrusage(struct tcb *, long); +#ifdef ALPHA +extern void printrusage32(struct tcb *, long); +#endif +extern void printuid(const char *, unsigned long); +extern void printcall(struct tcb *); +extern void print_sigset(struct tcb *, long, int); +extern void printsignal(int); +extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_iov); +extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long); +extern void tprint_open_modes(mode_t); +extern const char *sprint_open_modes(mode_t); +extern void print_loff_t(struct tcb *, long); + +extern const struct_ioctlent *ioctl_lookup(long); +extern const struct_ioctlent *ioctl_next_match(const struct_ioctlent *); +extern int ioctl_decode(struct tcb *, long, long); +extern int term_ioctl(struct tcb *, long, long); +extern int sock_ioctl(struct tcb *, long, long); +extern int proc_ioctl(struct tcb *, int, int); +extern int rtc_ioctl(struct tcb *, long, long); +extern int scsi_ioctl(struct tcb *, long, long); +extern int block_ioctl(struct tcb *, long, long); +extern int mtd_ioctl(struct tcb *, long, long); +extern int ubi_ioctl(struct tcb *, long, long); +extern int loop_ioctl(struct tcb *, long, long); + +extern int tv_nz(struct timeval *); +extern int tv_cmp(struct timeval *, struct timeval *); +extern double tv_float(struct timeval *); +extern void tv_add(struct timeval *, struct timeval *, struct timeval *); +extern void tv_sub(struct timeval *, struct timeval *, struct timeval *); +extern void tv_mul(struct timeval *, struct timeval *, int); +extern void tv_div(struct timeval *, struct timeval *, int); + +/* Strace log generation machinery. + * + * printing_tcp: tcb which has incomplete line being printed right now. + * NULL if last line has been completed ('\n'-terminated). + * printleader(tcp) examines it, finishes incomplete line if needed, + * the sets it to tcp. + * line_ended() clears printing_tcp and resets ->curcol = 0. + * tcp->curcol == 0 check is also used to detect completeness + * of last line, since in -ff mode just checking printing_tcp for NULL + * is not enough. + * + * If you change this code, test log generation in both -f and -ff modes + * using: + * strace -oLOG -f[f] test/threaded_execve + * strace -oLOG -f[f] test/sigkill_rain + * strace -oLOG -f[f] -p "`pidof web_browser`" + */ +extern struct tcb *printing_tcp; +extern void printleader(struct tcb *); +extern void line_ended(void); +extern void tabto(void); +extern void tprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern void tdump(void *addr, long len); +extern void tprintstackinfo(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern void tprints(const char *str); + +#if SUPPORTED_PERSONALITIES > 1 +extern void set_personality(int personality); +extern unsigned current_personality; +#else +# define set_personality(personality) ((void)0) +# define current_personality 0 +#endif + +#if SUPPORTED_PERSONALITIES == 1 +# define current_wordsize PERSONALITY0_WORDSIZE +#else +# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE +# define current_wordsize PERSONALITY0_WORDSIZE +# else +extern unsigned current_wordsize; +# 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)) +#endif + +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; +extern const char *const *errnoent; +extern const char *const *signalent; +extern const struct_ioctlent *ioctlent; +#else +# define sysent sysent0 +# define errnoent errnoent0 +# define signalent signalent0 +# define ioctlent ioctlent0 +#endif +extern unsigned nsyscalls; +extern unsigned nerrnos; +extern unsigned nsignals; +extern unsigned nioctlents; +extern unsigned num_quals; + +/* + * If you need non-NULL sysent[scno].sys_func and sysent[scno].sys_name + */ +#define SCNO_IS_VALID(scno) \ + ((unsigned long)(scno) < nsyscalls && sysent[scno].sys_func) + +/* Only ensures that sysent[scno] isn't out of range */ +#define SCNO_IN_RANGE(scno) \ + ((unsigned long)(scno) < nsyscalls) diff --git a/alice-strace/depcomp b/alice-strace/depcomp new file mode 100755 index 0000000..25a39e6 --- /dev/null +++ b/alice-strace/depcomp @@ -0,0 +1,708 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2012-03-27.16; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 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 + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + +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" + +# 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 informations. + 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 -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## 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). +## - 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 -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## 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. + tr ' ' "$nl" < "$tmpdepfile" | +## 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. + 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 -eq 0; then : + else + 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 + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#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. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + 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 -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependent.h'. + # Do two passes, one to just change these to + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\': + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + 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 -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$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. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + 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 -eq 0; then : + else + 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#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. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # 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.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +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" = 0; then : + else + 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" + 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" + tr ' ' "$nl" < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + 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" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + 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/alice-strace/desc.c b/alice-strace/desc.c new file mode 100644 index 0000000..a420feb --- /dev/null +++ b/alice-strace/desc.c @@ -0,0 +1,1105 @@ +/* + * 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 +#include +#ifdef HAVE_SYS_EPOLL_H +# include +#endif +#ifdef HAVE_LIBAIO_H +# include +#endif +#ifdef HAVE_LINUX_PERF_EVENT_H +# include +#endif + +static const struct xlat fcntlcmds[] = { + { F_DUPFD, "F_DUPFD" }, + { F_GETFD, "F_GETFD" }, + { F_SETFD, "F_SETFD" }, + { F_GETFL, "F_GETFL" }, + { F_SETFL, "F_SETFL" }, + { F_GETLK, "F_GETLK" }, + { F_SETLK, "F_SETLK" }, + { F_SETLKW, "F_SETLKW" }, + { F_GETOWN, "F_GETOWN" }, + { F_SETOWN, "F_SETOWN" }, +#ifdef F_RSETLK + { F_RSETLK, "F_RSETLK" }, +#endif +#ifdef F_RSETLKW + { F_RSETLKW, "F_RSETLKW" }, +#endif +#ifdef F_RGETLK + { F_RGETLK, "F_RGETLK" }, +#endif +#ifdef F_CNVT + { F_CNVT, "F_CNVT" }, +#endif +#ifdef F_SETSIG + { F_SETSIG, "F_SETSIG" }, +#endif +#ifdef F_GETSIG + { F_GETSIG, "F_GETSIG" }, +#endif +#ifdef F_CHKFL + { F_CHKFL, "F_CHKFL" }, +#endif +#ifdef F_DUP2FD + { F_DUP2FD, "F_DUP2FD" }, +#endif +#ifdef F_ALLOCSP + { F_ALLOCSP, "F_ALLOCSP" }, +#endif +#ifdef F_ISSTREAM + { F_ISSTREAM, "F_ISSTREAM" }, +#endif +#ifdef F_PRIV + { F_PRIV, "F_PRIV" }, +#endif +#ifdef F_NPRIV + { F_NPRIV, "F_NPRIV" }, +#endif +#ifdef F_QUOTACL + { F_QUOTACL, "F_QUOTACL" }, +#endif +#ifdef F_BLOCKS + { F_BLOCKS, "F_BLOCKS" }, +#endif +#ifdef F_BLKSIZE + { F_BLKSIZE, "F_BLKSIZE" }, +#endif +#ifdef F_GETOWN + { F_GETOWN, "F_GETOWN" }, +#endif +#ifdef F_SETOWN + { F_SETOWN, "F_SETOWN" }, +#endif +#ifdef F_REVOKE + { F_REVOKE, "F_REVOKE" }, +#endif +#ifdef F_SETLK + { F_SETLK, "F_SETLK" }, +#endif +#ifdef F_SETLKW + { F_SETLKW, "F_SETLKW" }, +#endif +#ifdef F_FREESP + { F_FREESP, "F_FREESP" }, +#endif +#ifdef F_GETLK + { F_GETLK, "F_GETLK" }, +#endif +#ifdef F_SETLK64 + { F_SETLK64, "F_SETLK64" }, +#endif +#ifdef F_SETLKW64 + { F_SETLKW64, "F_SETLKW64" }, +#endif +#ifdef F_FREESP64 + { F_FREESP64, "F_FREESP64" }, +#endif +#ifdef F_GETLK64 + { F_GETLK64, "F_GETLK64" }, +#endif +#ifdef F_SHARE + { F_SHARE, "F_SHARE" }, +#endif +#ifdef F_UNSHARE + { F_UNSHARE, "F_UNSHARE" }, +#endif +#ifdef F_SETLEASE + { F_SETLEASE, "F_SETLEASE" }, +#endif +#ifdef F_GETLEASE + { F_GETLEASE, "F_GETLEASE" }, +#endif +#ifdef F_NOTIFY + { F_NOTIFY, "F_NOTIFY" }, +#endif +#ifdef F_DUPFD_CLOEXEC + { F_DUPFD_CLOEXEC,"F_DUPFD_CLOEXEC"}, +#endif + { 0, NULL }, +}; + +static const struct xlat fdflags[] = { +#ifdef FD_CLOEXEC + { FD_CLOEXEC, "FD_CLOEXEC" }, +#endif + { 0, NULL }, +}; + +#ifdef LOCK_SH + +static const struct xlat flockcmds[] = { + { LOCK_SH, "LOCK_SH" }, + { LOCK_EX, "LOCK_EX" }, + { LOCK_NB, "LOCK_NB" }, + { LOCK_UN, "LOCK_UN" }, + { 0, NULL }, +}; + +#endif /* LOCK_SH */ + +static const struct xlat lockfcmds[] = { + { F_RDLCK, "F_RDLCK" }, + { F_WRLCK, "F_WRLCK" }, + { F_UNLCK, "F_UNLCK" }, +#ifdef F_EXLCK + { F_EXLCK, "F_EXLCK" }, +#endif +#ifdef F_SHLCK + { F_SHLCK, "F_SHLCK" }, +#endif + { 0, NULL }, +}; + +#ifdef F_NOTIFY +static const struct xlat notifyflags[] = { +#ifdef DN_ACCESS + { DN_ACCESS, "DN_ACCESS" }, +#endif +#ifdef DN_MODIFY + { DN_MODIFY, "DN_MODIFY" }, +#endif +#ifdef DN_CREATE + { DN_CREATE, "DN_CREATE" }, +#endif +#ifdef DN_DELETE + { DN_DELETE, "DN_DELETE" }, +#endif +#ifdef DN_RENAME + { DN_RENAME, "DN_RENAME" }, +#endif +#ifdef DN_ATTRIB + { DN_ATTRIB, "DN_ATTRIB" }, +#endif +#ifdef DN_MULTISHOT + { DN_MULTISHOT, "DN_MULTISHOT" }, +#endif + { 0, NULL }, +}; +#endif + +static const struct xlat perf_event_open_flags[] = { +#ifdef PERF_FLAG_FD_NO_GROUP + { PERF_FLAG_FD_NO_GROUP, "PERF_FLAG_FD_NO_GROUP" }, +#endif +#ifdef PERF_FLAG_FD_OUTPUT + { PERF_FLAG_FD_OUTPUT, "PERF_FLAG_FD_OUTPUT" }, +#endif +#ifdef PERF_FLAG_PID_CGROUP + { PERF_FLAG_PID_CGROUP, "PERF_FLAG_PID_CGROUP" }, +#endif + { 0, NULL }, +}; + +#if _LFS64_LARGEFILE +/* fcntl/lockf */ +static void +printflock64(struct tcb *tcp, long addr, int getlk) +{ + struct flock64 fl; + + if (umove(tcp, addr, &fl) < 0) { + tprints("{...}"); + return; + } + tprints("{type="); + printxval(lockfcmds, fl.l_type, "F_???"); + tprints(", whence="); + printxval(whence_codes, fl.l_whence, "SEEK_???"); + tprintf(", start=%lld, len=%lld", (long long) fl.l_start, (long long) fl.l_len); + if (getlk) + tprintf(", pid=%lu}", (unsigned long) fl.l_pid); + else + tprints("}"); +} +#endif + +/* fcntl/lockf */ +static void +printflock(struct tcb *tcp, long addr, int getlk) +{ + struct flock fl; + +#if SUPPORTED_PERSONALITIES > 1 +# ifdef X32 + if (current_personality == 0) { + printflock64(tcp, addr, getlk); + return; + } +# endif + if (current_wordsize != sizeof(fl.l_start)) { + if (current_wordsize == 4) { + /* 32-bit x86 app on x86_64 and similar cases */ + struct { + short int l_type; + short int l_whence; + int32_t l_start; /* off_t */ + int32_t l_len; /* off_t */ + int32_t l_pid; /* pid_t */ + } fl32; + if (umove(tcp, addr, &fl32) < 0) { + tprints("{...}"); + return; + } + fl.l_type = fl32.l_type; + fl.l_whence = fl32.l_whence; + fl.l_start = fl32.l_start; + fl.l_len = fl32.l_len; + fl.l_pid = fl32.l_pid; + } else { + /* let people know we have a problem here */ + tprintf("", + current_wordsize); + return; + } + } else +#endif + { + if (umove(tcp, addr, &fl) < 0) { + tprints("{...}"); + return; + } + } + tprints("{type="); + printxval(lockfcmds, fl.l_type, "F_???"); + tprints(", whence="); + printxval(whence_codes, fl.l_whence, "SEEK_???"); +#ifdef X32 + tprintf(", start=%lld, len=%lld", fl.l_start, fl.l_len); +#else + tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len); +#endif + if (getlk) + tprintf(", pid=%lu}", (unsigned long) fl.l_pid); + else + tprints("}"); +} + +int +sys_fcntl(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printxval(fcntlcmds, tcp->u_arg[1], "F_???"); + switch (tcp->u_arg[1]) { + case F_SETFD: + tprints(", "); + printflags(fdflags, tcp->u_arg[2], "FD_???"); + break; + case F_SETOWN: case F_DUPFD: +#ifdef F_DUPFD_CLOEXEC + case F_DUPFD_CLOEXEC: +#endif + tprintf(", %ld", tcp->u_arg[2]); + break; + case F_SETFL: + tprints(", "); + tprint_open_modes(tcp->u_arg[2]); + break; + case F_SETLK: case F_SETLKW: +#ifdef F_FREESP + case F_FREESP: +#endif + tprints(", "); + printflock(tcp, tcp->u_arg[2], 0); + break; +#if _LFS64_LARGEFILE +#ifdef F_FREESP64 + case F_FREESP64: +#endif + /* Linux glibc defines SETLK64 as SETLK, + even though the kernel has different values - as does Solaris. */ +#if defined(F_SETLK64) && F_SETLK64 + 0 != F_SETLK + case F_SETLK64: +#endif +#if defined(F_SETLKW64) && F_SETLKW64 + 0 != F_SETLKW + case F_SETLKW64: +#endif + tprints(", "); + printflock64(tcp, tcp->u_arg[2], 0); + break; +#endif +#ifdef F_NOTIFY + case F_NOTIFY: + tprints(", "); + printflags(notifyflags, tcp->u_arg[2], "DN_???"); + break; +#endif +#ifdef F_SETLEASE + case F_SETLEASE: + tprints(", "); + printxval(lockfcmds, tcp->u_arg[2], "F_???"); + break; +#endif + } + } + else { + switch (tcp->u_arg[1]) { + case F_DUPFD: +#ifdef F_DUPFD_CLOEXEC + case F_DUPFD_CLOEXEC: +#endif + case F_SETFD: case F_SETFL: + case F_SETLK: case F_SETLKW: + case F_SETOWN: case F_GETOWN: +#ifdef F_NOTIFY + case F_NOTIFY: +#endif +#ifdef F_SETLEASE + case F_SETLEASE: +#endif + break; + case F_GETFD: + if (syserror(tcp) || tcp->u_rval == 0) + return 0; + tcp->auxstr = sprintflags("flags ", fdflags, tcp->u_rval); + return RVAL_HEX|RVAL_STR; + case F_GETFL: + if (syserror(tcp)) + return 0; + tcp->auxstr = sprint_open_modes(tcp->u_rval); + return RVAL_HEX|RVAL_STR; + case F_GETLK: + tprints(", "); + printflock(tcp, tcp->u_arg[2], 1); + break; +#if _LFS64_LARGEFILE +#if defined(F_GETLK64) && F_GETLK64+0 != F_GETLK + case F_GETLK64: +#endif + tprints(", "); + printflock64(tcp, tcp->u_arg[2], 1); + break; +#endif +#ifdef F_GETLEASE + case F_GETLEASE: + if (syserror(tcp)) + return 0; + tcp->auxstr = xlookup(lockfcmds, tcp->u_rval); + return RVAL_HEX|RVAL_STR; +#endif + default: + tprintf(", %#lx", tcp->u_arg[2]); + break; + } + } + return 0; +} + +#ifdef LOCK_SH + +int +sys_flock(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printflags(flockcmds, tcp->u_arg[1], "LOCK_???"); + } + return 0; +} +#endif /* LOCK_SH */ + +int +sys_close(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + } + return 0; +} + +static int +do_dup2(struct tcb *tcp, int flags_arg) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printfd(tcp, tcp->u_arg[1]); + if (flags_arg >= 0) { + tprints(", "); + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); + } + } + return 0; +} + +int +sys_dup2(struct tcb *tcp) +{ + return do_dup2(tcp, -1); +} + +int +sys_dup3(struct tcb *tcp) +{ + return do_dup2(tcp, 2); +} + +#if defined(ALPHA) +int +sys_getdtablesize(struct tcb *tcp) +{ + return 0; +} +#endif + +static int +decode_select(struct tcb *tcp, long *args, enum bitness_t bitness) +{ + int i, j; + unsigned nfds, fdsize; + fd_set *fds; + const char *sep; + long arg; + + fdsize = args[0]; + /* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */ + if (args[0] > 1024*1024) + fdsize = 1024*1024; + if (args[0] < 0) + fdsize = 0; + fdsize = (((fdsize + 7) / 8) + sizeof(long)-1) & -sizeof(long); + + if (entering(tcp)) { + fds = malloc(fdsize); + if (!fds) + die_out_of_memory(); + nfds = args[0]; + tprintf("%d", nfds); + for (i = 0; i < 3; i++) { + arg = args[i+1]; + if (arg == 0) { + tprints(", NULL"); + continue; + } + if (!verbose(tcp)) { + tprintf(", %#lx", arg); + continue; + } + if (umoven(tcp, arg, fdsize, (char *) fds) < 0) { + tprints(", [?]"); + continue; + } + tprints(", ["); + for (j = 0, sep = ""; j < nfds; j++) { + if (FD_ISSET(j, fds)) { + tprints(sep); + printfd(tcp, j); + sep = " "; + } + } + tprints("]"); + } + free(fds); + tprints(", "); + printtv_bitness(tcp, args[4], bitness, 0); + } + else { + static char outstr[1024]; + char *outptr; +#define end_outstr (outstr + sizeof(outstr)) + const char *sep; + + if (syserror(tcp)) + return 0; + + nfds = tcp->u_rval; + if (nfds == 0) { + tcp->auxstr = "Timeout"; + return RVAL_STR; + } + + fds = malloc(fdsize); + if (!fds) + die_out_of_memory(); + + outptr = outstr; + sep = ""; + for (i = 0; i < 3; i++) { + int first = 1; + + arg = args[i+1]; + if (!arg || umoven(tcp, arg, fdsize, (char *) fds) < 0) + continue; + for (j = 0; j < args[0]; j++) { + if (FD_ISSET(j, fds)) { + /* +2 chars needed at the end: ']',NUL */ + if (outptr < end_outstr - (sizeof(", except [") + sizeof(int)*3 + 2)) { + if (first) { + outptr += sprintf(outptr, "%s%s [%u", + sep, + i == 0 ? "in" : i == 1 ? "out" : "except", + j + ); + first = 0; + sep = ", "; + } + else { + outptr += sprintf(outptr, " %u", j); + } + } + nfds--; + } + } + if (outptr != outstr) + *outptr++ = ']'; + if (nfds == 0) + break; + } + free(fds); + /* This contains no useful information on SunOS. */ + if (args[4]) { + if (outptr < end_outstr - (10 + TIMEVAL_TEXT_BUFSIZE)) { + outptr += sprintf(outptr, "%sleft ", sep); + outptr = sprinttv(outptr, tcp, args[4], bitness, /*special:*/ 0); + } + } + *outptr = '\0'; + tcp->auxstr = outstr; + return RVAL_STR; +#undef end_outstr + } + return 0; +} + +int +sys_oldselect(struct tcb *tcp) +{ + long args[5]; + + if (umoven(tcp, tcp->u_arg[0], sizeof args, (char *) args) < 0) { + tprints("[...]"); + return 0; + } + return decode_select(tcp, args, BITNESS_CURRENT); +} + +#ifdef ALPHA +int +sys_osf_select(struct tcb *tcp) +{ + long *args = tcp->u_arg; + return decode_select(tcp, args, BITNESS_32); +} +#endif + +static const struct xlat epollctls[] = { +#ifdef EPOLL_CTL_ADD + { EPOLL_CTL_ADD, "EPOLL_CTL_ADD" }, +#endif +#ifdef EPOLL_CTL_MOD + { EPOLL_CTL_MOD, "EPOLL_CTL_MOD" }, +#endif +#ifdef EPOLL_CTL_DEL + { EPOLL_CTL_DEL, "EPOLL_CTL_DEL" }, +#endif + { 0, NULL } +}; + +static const struct xlat epollevents[] = { +#ifdef EPOLLIN + { EPOLLIN, "EPOLLIN" }, +#endif +#ifdef EPOLLPRI + { EPOLLPRI, "EPOLLPRI" }, +#endif +#ifdef EPOLLOUT + { EPOLLOUT, "EPOLLOUT" }, +#endif +#ifdef EPOLLRDNORM + { EPOLLRDNORM, "EPOLLRDNORM" }, +#endif +#ifdef EPOLLRDBAND + { EPOLLRDBAND, "EPOLLRDBAND" }, +#endif +#ifdef EPOLLWRNORM + { EPOLLWRNORM, "EPOLLWRNORM" }, +#endif +#ifdef EPOLLWRBAND + { EPOLLWRBAND, "EPOLLWRBAND" }, +#endif +#ifdef EPOLLMSG + { EPOLLMSG, "EPOLLMSG" }, +#endif +#ifdef EPOLLERR + { EPOLLERR, "EPOLLERR" }, +#endif +#ifdef EPOLLHUP + { EPOLLHUP, "EPOLLHUP" }, +#endif +#ifdef EPOLLRDHUP + { EPOLLRDHUP, "EPOLLRDHUP" }, +#endif +#ifdef EPOLLONESHOT + { EPOLLONESHOT, "EPOLLONESHOT" }, +#endif +#ifdef EPOLLET + { EPOLLET, "EPOLLET" }, +#endif + { 0, NULL } +}; + +/* Not aliased to printargs_ld: we want it to have a distinct address */ +int +sys_epoll_create(struct tcb *tcp) +{ + return printargs_ld(tcp); +} + +static const struct xlat epollflags[] = { +#ifdef EPOLL_CLOEXEC + { EPOLL_CLOEXEC, "EPOLL_CLOEXEC" }, +#endif +#ifdef EPOLL_NONBLOCK + { EPOLL_NONBLOCK, "EPOLL_NONBLOCK" }, +#endif + { 0, NULL } +}; + +int +sys_epoll_create1(struct tcb *tcp) +{ + if (entering(tcp)) + printflags(epollflags, tcp->u_arg[0], "EPOLL_???"); + return 0; +} + +#ifdef HAVE_SYS_EPOLL_H +static void +print_epoll_event(struct epoll_event *ev) +{ + tprints("{"); + printflags(epollevents, ev->events, "EPOLL???"); + /* We cannot know what format the program uses, so print u32 and u64 + which will cover every value. */ + tprintf(", {u32=%" PRIu32 ", u64=%" PRIu64 "}}", + ev->data.u32, ev->data.u64); +} +#endif + +int +sys_epoll_ctl(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???"); + tprints(", "); + printfd(tcp, tcp->u_arg[2]); + tprints(", "); + if (tcp->u_arg[3] == 0) + tprints("NULL"); + else { +#ifdef HAVE_SYS_EPOLL_H + struct epoll_event ev; + if (umove(tcp, tcp->u_arg[3], &ev) == 0) + print_epoll_event(&ev); + else +#endif + tprints("{...}"); + } + } + return 0; +} + +static void +epoll_wait_common(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%lx", tcp->u_arg[1]); + else if (tcp->u_rval == 0) + tprints("{}"); + else { +#ifdef HAVE_SYS_EPOLL_H + struct epoll_event ev, *start, *cur, *end; + int failed = 0; + + tprints("{"); + start = (struct epoll_event *) tcp->u_arg[1]; + end = start + tcp->u_rval; + for (cur = start; cur < end; ++cur) { + if (cur > start) + tprints(", "); + if (umove(tcp, (long) cur, &ev) == 0) + print_epoll_event(&ev); + else { + tprints("?"); + failed = 1; + break; + } + } + tprints("}"); + if (failed) + tprintf(" %#lx", (long) start); +#else + tprints("{...}"); +#endif + } + tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]); + } +} + +int +sys_epoll_wait(struct tcb *tcp) +{ + epoll_wait_common(tcp); + return 0; +} + +int +sys_epoll_pwait(struct tcb *tcp) +{ + epoll_wait_common(tcp); + if (exiting(tcp)) { + tprints(", "); + print_sigset(tcp, tcp->u_arg[4], 0); + } + return 0; +} + +int +sys_io_setup(struct tcb *tcp) +{ + if (entering(tcp)) + tprintf("%ld, ", tcp->u_arg[0]); + else { + if (syserror(tcp)) + tprintf("0x%0lx", tcp->u_arg[1]); + else { + unsigned long user_id; + if (umove(tcp, tcp->u_arg[1], &user_id) == 0) + tprintf("{%lu}", user_id); + else + tprints("{...}"); + } + } + return 0; +} + +int +sys_io_destroy(struct tcb *tcp) +{ + if (entering(tcp)) + tprintf("%lu", tcp->u_arg[0]); + return 0; +} + +#ifdef HAVE_LIBAIO_H + +enum iocb_sub { + SUB_NONE, SUB_COMMON, SUB_POLL, SUB_VECTOR +}; + +static const char * +iocb_cmd_lookup(unsigned cmd, enum iocb_sub *sub) +{ + static char buf[sizeof("%u /* SUB_??? */") + sizeof(int)*3]; + static const struct { + const char *name; + enum iocb_sub sub; + } cmds[] = { + { "pread", SUB_COMMON }, + { "pwrite", SUB_COMMON }, + { "fsync", SUB_NONE }, + { "fdsync", SUB_NONE }, + { "op4", SUB_NONE }, + { "poll", SUB_POLL }, + { "noop", SUB_NONE }, + { "preadv", SUB_VECTOR }, + { "pwritev", SUB_VECTOR }, + }; + + if (cmd < ARRAY_SIZE(cmds)) { + *sub = cmds[cmd].sub; + return cmds[cmd].name; + } + *sub = SUB_NONE; + sprintf(buf, "%u /* SUB_??? */", cmd); + return buf; +} + +/* Not defined in libaio.h */ +#ifndef IOCB_RESFD +# define IOCB_RESFD (1 << 0) +#endif + +static void +print_common_flags(struct iocb *iocb) +{ +#if HAVE_STRUCT_IOCB_U_C_FLAGS + if (iocb->u.c.flags & IOCB_RESFD) + tprintf(", resfd=%d", iocb->u.c.resfd); + if (iocb->u.c.flags & ~IOCB_RESFD) + tprintf(", flags=%x", iocb->u.c.flags); +#else +# warning "libaio.h is too old => limited io_submit decoding" +#endif +} + +#endif /* HAVE_LIBAIO_H */ + +int +sys_io_submit(struct tcb *tcp) +{ + long nr; + if (entering(tcp)) { + tprintf("%lu, %ld, ", tcp->u_arg[0], tcp->u_arg[1]); + nr = tcp->u_arg[1]; + /* and if nr is negative? */ + if (nr == 0) + tprints("{}"); + else { +#ifdef HAVE_LIBAIO_H + long i; + struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2]; + + for (i = 0; i < nr; i++, iocbs++) { + enum iocb_sub sub; + struct iocb iocb; + if (i == 0) + tprints("{"); + else + tprints(", "); + + if (umove(tcp, (unsigned long)iocbs, &iocbp) || + umove(tcp, (unsigned long)iocbp, &iocb)) { + tprints("{...}"); + continue; + } + tprints("{"); + if (iocb.data) + tprintf("data:%p, ", iocb.data); + if (iocb.key) + tprintf("key:%u, ", iocb.key); + tprintf("%s, ", iocb_cmd_lookup(iocb.aio_lio_opcode, &sub)); + if (iocb.aio_reqprio) + tprintf("reqprio:%d, ", iocb.aio_reqprio); + tprintf("filedes:%d", iocb.aio_fildes); + switch (sub) { + case SUB_COMMON: +#if HAVE_DECL_IO_CMD_PWRITE + if (iocb.aio_lio_opcode == IO_CMD_PWRITE) { + tprints(", str:"); + printstr(tcp, (unsigned long)iocb.u.c.buf, + iocb.u.c.nbytes); + } else +#endif + tprintf(", buf:%p", iocb.u.c.buf); + tprintf(", nbytes:%lu, offset:%lld", + iocb.u.c.nbytes, + iocb.u.c.offset); + print_common_flags(&iocb); + break; + case SUB_VECTOR: + tprintf(", %lld", iocb.u.v.offset); + print_common_flags(&iocb); + tprints(", "); + tprint_iov(tcp, iocb.u.v.nr, + (unsigned long)iocb.u.v.vec, +#if HAVE_DECL_IO_CMD_PWRITEV + iocb.aio_lio_opcode == IO_CMD_PWRITEV +#else + 0 +#endif + ); + break; + case SUB_POLL: + tprintf(", %x", iocb.u.poll.events); + break; + case SUB_NONE: + break; + } + tprints("}"); + } + if (i) + tprints("}"); +#else +#warning "libaio.h is not available => no io_submit decoding" + tprintf("%#lx", tcp->u_arg[2]); +#endif + } + } + return 0; +} + +int +sys_io_cancel(struct tcb *tcp) +{ + if (entering(tcp)) { +#ifdef HAVE_LIBAIO_H + struct iocb iocb; +#endif + tprintf("%lu, ", tcp->u_arg[0]); +#ifdef HAVE_LIBAIO_H + if (umove(tcp, tcp->u_arg[1], &iocb) == 0) { + tprintf("{%p, %u, %u, %u, %d}, ", + iocb.data, iocb.key, + (unsigned)iocb.aio_lio_opcode, + (unsigned)iocb.aio_reqprio, iocb.aio_fildes); + } else +#endif + tprints("{...}, "); + } else { + if (tcp->u_rval < 0) + tprints("{...}"); + else { +#ifdef HAVE_LIBAIO_H + struct io_event event; + if (umove(tcp, tcp->u_arg[2], &event) == 0) + tprintf("{%p, %p, %ld, %ld}", + event.data, event.obj, + event.res, event.res2); + else +#endif + tprints("{...}"); + } + } + return 0; +} + +int +sys_io_getevents(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1], + tcp->u_arg[2]); + } else { + if (tcp->u_rval == 0) { + tprints("{}"); + } else { +#ifdef HAVE_LIBAIO_H + struct io_event *events = (void *)tcp->u_arg[3]; + long i, nr = tcp->u_rval; + + for (i = 0; i < nr; i++, events++) { + struct io_event event; + + if (i == 0) + tprints("{"); + else + tprints(", "); + + if (umove(tcp, (unsigned long)events, &event) != 0) { + tprints("{...}"); + continue; + } + tprintf("{%p, %p, %ld, %ld}", event.data, + event.obj, event.res, event.res2); + } + tprints("}, "); +#else + tprints("{...}"); +#endif + } + + print_timespec(tcp, tcp->u_arg[4]); + } + return 0; +} + +int +sys_select(struct tcb *tcp) +{ + return decode_select(tcp, tcp->u_arg, BITNESS_CURRENT); +} + +int +sys_pselect6(struct tcb *tcp) +{ + int rc = decode_select(tcp, tcp->u_arg, BITNESS_CURRENT); + if (entering(tcp)) { + struct { + void *ss; + unsigned long len; + } data; + if (umove(tcp, tcp->u_arg[5], &data) < 0) + tprintf(", %#lx", tcp->u_arg[5]); + else { + tprints(", {"); + if (data.len < sizeof(long)) + tprintf("%#lx", (long)data.ss); + else + print_sigset(tcp, (long)data.ss, 0); + tprintf(", %lu}", data.len); + } + } + return rc; +} + +static int +do_eventfd(struct tcb *tcp, int flags_arg) +{ + if (entering(tcp)) { + tprintf("%lu", tcp->u_arg[0]); + if (flags_arg >= 0) { + tprints(", "); + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); + } + } + return 0; +} + +int +sys_eventfd(struct tcb *tcp) +{ + return do_eventfd(tcp, -1); +} + +int +sys_eventfd2(struct tcb *tcp) +{ + return do_eventfd(tcp, 1); +} + +int +sys_perf_event_open(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %d, %d, %d, ", + tcp->u_arg[0], + (int) tcp->u_arg[1], + (int) tcp->u_arg[2], + (int) tcp->u_arg[3]); + printflags(perf_event_open_flags, tcp->u_arg[4], + "PERF_FLAG_???"); + } + return 0; +} diff --git a/alice-strace/errnoent.sh b/alice-strace/errnoent.sh new file mode 100755 index 0000000..a82fc04 --- /dev/null +++ b/alice-strace/errnoent.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# Copyright (c) 1993, 1994, 1995 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. + +awk ' +/^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ { + errno[$3] = $2 + if ($3 > max) + max = $3 +} +END { + for (i = 0; i <= max; i++) { + if (!errno[i]) + errno[i] = "ERRNO_" i + printf "\t\"%s\", /* %d */\n", errno[i], i + } +} +' $* diff --git a/alice-strace/file.c b/alice-strace/file.c new file mode 100644 index 0000000..9a83287 --- /dev/null +++ b/alice-strace/file.c @@ -0,0 +1,2788 @@ +/* + * 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 +#include + +#if defined(SPARC) || defined(SPARC64) +struct stat { + unsigned short st_dev; + unsigned int st_ino; + unsigned short st_mode; + short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned int st_size; + int st_atime; + unsigned int __unused1; + int st_mtime; + unsigned int __unused2; + int st_ctime; + unsigned int __unused3; + int st_blksize; + int st_blocks; + unsigned int __unused4[2]; +}; +# if defined(SPARC64) +struct stat_sparc64 { + unsigned int st_dev; + unsigned long st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned int st_uid; + unsigned int st_gid; + unsigned int st_rdev; + long st_size; + long st_atime; + long st_mtime; + long st_ctime; + long st_blksize; + long st_blocks; + unsigned long __unused4[2]; +}; +# endif /* SPARC64 */ +# define stat kernel_stat +# include +# undef stat +#elif defined(X32) +struct stat { + unsigned long long st_dev; + unsigned long long st_ino; + unsigned long long st_nlink; + + unsigned int st_mode; + unsigned int st_uid; + unsigned int st_gid; + unsigned int __pad0; + unsigned long long st_rdev; + long long st_size; + long long st_blksize; + long long st_blocks; + + unsigned long long st_atime; + unsigned long long st_atime_nsec; + unsigned long long st_mtime; + unsigned long long st_mtime_nsec; + unsigned long long st_ctime; + unsigned long long st_ctime_nsec; + long long __unused[3]; +}; + +struct stat64 { + unsigned long long st_dev; + unsigned char __pad0[4]; + unsigned long __st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned long st_uid; + unsigned long st_gid; + unsigned long long st_rdev; + unsigned char __pad3[4]; + long long st_size; + unsigned long st_blksize; + unsigned long long st_blocks; + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned int st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + unsigned long long st_ino; +} __attribute__((packed)); +# define HAVE_STAT64 1 + +struct __old_kernel_stat { + unsigned short st_dev; + unsigned short st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned int st_size; + unsigned int st_atime; + unsigned int st_mtime; + unsigned int st_ctime; +}; +#else +# undef dev_t +# undef ino_t +# undef mode_t +# undef nlink_t +# undef uid_t +# undef gid_t +# undef off_t +# undef loff_t +# define dev_t __kernel_dev_t +# define ino_t __kernel_ino_t +# define mode_t __kernel_mode_t +# define nlink_t __kernel_nlink_t +# define uid_t __kernel_uid_t +# define gid_t __kernel_gid_t +# define off_t __kernel_off_t +# define loff_t __kernel_loff_t + +# include + +# undef dev_t +# undef ino_t +# undef mode_t +# undef nlink_t +# undef uid_t +# undef gid_t +# undef off_t +# undef loff_t +# define dev_t dev_t +# define ino_t ino_t +# define mode_t mode_t +# define nlink_t nlink_t +# define uid_t uid_t +# define gid_t gid_t +# define off_t off_t +# define loff_t loff_t +#endif + +#define stat libc_stat +#define stat64 libc_stat64 +#include +#undef stat +#undef stat64 +/* These might be macros. */ +#undef st_atime +#undef st_mtime +#undef st_ctime + +#include +#ifdef HAVE_SYS_VFS_H +# include +#endif +#ifdef HAVE_LINUX_XATTR_H +# include +#else +# define XATTR_CREATE 1 +# define XATTR_REPLACE 2 +#endif + +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + +#ifdef MAJOR_IN_MKDEV +# include +#endif + +#ifdef HAVE_SYS_ASYNCH_H +# include +#endif + +struct kernel_dirent { + unsigned long d_ino; + unsigned long d_off; + unsigned short d_reclen; + char d_name[1]; +}; + +const struct xlat open_access_modes[] = { + { O_RDONLY, "O_RDONLY" }, + { O_WRONLY, "O_WRONLY" }, + { O_RDWR, "O_RDWR" }, +#ifdef O_ACCMODE + { O_ACCMODE, "O_ACCMODE" }, +#endif + { 0, NULL }, +}; + +const struct xlat open_mode_flags[] = { + { O_CREAT, "O_CREAT" }, + { O_EXCL, "O_EXCL" }, + { O_NOCTTY, "O_NOCTTY" }, + { O_TRUNC, "O_TRUNC" }, + { O_APPEND, "O_APPEND" }, + { O_NONBLOCK, "O_NONBLOCK" }, +#ifdef O_SYNC + { O_SYNC, "O_SYNC" }, +#endif +#ifdef O_ASYNC + { O_ASYNC, "O_ASYNC" }, +#endif +#ifdef O_DSYNC + { O_DSYNC, "O_DSYNC" }, +#endif +#ifdef O_RSYNC + { O_RSYNC, "O_RSYNC" }, +#endif +#if defined(O_NDELAY) && (O_NDELAY != O_NONBLOCK) + { O_NDELAY, "O_NDELAY" }, +#endif +#ifdef O_PRIV + { O_PRIV, "O_PRIV" }, +#endif +#ifdef O_DIRECT + { O_DIRECT, "O_DIRECT" }, +#endif +#ifdef O_LARGEFILE +# if O_LARGEFILE == 0 /* biarch platforms in 64-bit mode */ +# undef O_LARGEFILE +# ifdef SPARC64 +# define O_LARGEFILE 0x40000 +# elif defined X86_64 || defined S390X +# define O_LARGEFILE 0100000 +# endif +# endif +# ifdef O_LARGEFILE + { O_LARGEFILE, "O_LARGEFILE" }, +# endif +#endif +#ifdef O_DIRECTORY + { O_DIRECTORY, "O_DIRECTORY" }, +#endif +#ifdef O_NOFOLLOW + { O_NOFOLLOW, "O_NOFOLLOW" }, +#endif +#ifdef O_NOATIME + { O_NOATIME, "O_NOATIME" }, +#endif +#ifdef O_CLOEXEC + { O_CLOEXEC, "O_CLOEXEC" }, +#endif +#ifdef FNDELAY + { FNDELAY, "FNDELAY" }, +#endif +#ifdef FAPPEND + { FAPPEND, "FAPPEND" }, +#endif +#ifdef FMARK + { FMARK, "FMARK" }, +#endif +#ifdef FDEFER + { FDEFER, "FDEFER" }, +#endif +#ifdef FASYNC + { FASYNC, "FASYNC" }, +#endif +#ifdef FSHLOCK + { FSHLOCK, "FSHLOCK" }, +#endif +#ifdef FEXLOCK + { FEXLOCK, "FEXLOCK" }, +#endif +#ifdef FCREAT + { FCREAT, "FCREAT" }, +#endif +#ifdef FTRUNC + { FTRUNC, "FTRUNC" }, +#endif +#ifdef FEXCL + { FEXCL, "FEXCL" }, +#endif +#ifdef FNBIO + { FNBIO, "FNBIO" }, +#endif +#ifdef FSYNC + { FSYNC, "FSYNC" }, +#endif +#ifdef FNOCTTY + { FNOCTTY, "FNOCTTY" }, +#endif +#ifdef O_SHLOCK + { O_SHLOCK, "O_SHLOCK" }, +#endif +#ifdef O_EXLOCK + { O_EXLOCK, "O_EXLOCK" }, +#endif + { 0, NULL }, +}; + +#ifndef AT_FDCWD +# define AT_FDCWD -100 +#endif + +/* The fd is an "int", so when decoding x86 on x86_64, we need to force sign + * extension to get the right value. We do this by declaring fd as int here. + */ +static void +print_dirfd(struct tcb *tcp, int fd) +{ + if (fd == AT_FDCWD) + tprints("AT_FDCWD, "); + else { + printfd(tcp, fd); + tprints(", "); + } +} + +/* + * low bits of the open(2) flags define access mode, + * other bits are real flags. + */ +const char * +sprint_open_modes(mode_t flags) +{ + static char outstr[(1 + ARRAY_SIZE(open_mode_flags)) * sizeof("O_LARGEFILE")]; + char *p; + char sep; + const char *str; + const struct xlat *x; + + sep = ' '; + p = stpcpy(outstr, "flags"); + str = xlookup(open_access_modes, flags & 3); + if (str) { + *p++ = sep; + p = stpcpy(p, str); + flags &= ~3; + if (!flags) + return outstr; + sep = '|'; + } + + for (x = open_mode_flags; x->str; x++) { + if ((flags & x->val) == x->val) { + *p++ = sep; + p = stpcpy(p, x->str); + flags &= ~x->val; + if (!flags) + return outstr; + sep = '|'; + } + } + /* flags is still nonzero */ + *p++ = sep; + sprintf(p, "%#x", flags); + return outstr; +} + +void +tprint_open_modes(mode_t flags) +{ + tprints(sprint_open_modes(flags) + sizeof("flags")); +} + +static int +decode_open(struct tcb *tcp, int offset) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + /* flags */ + tprint_open_modes(tcp->u_arg[offset + 1]); + if (tcp->u_arg[offset + 1] & O_CREAT) { + /* mode */ + tprintf(", %#lo", tcp->u_arg[offset + 2]); + } + } + return 0; +} + +int +sys_open(struct tcb *tcp) +{ + return decode_open(tcp, 0); +} + +int +sys_openat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_open(tcp, 1); +} + +#if defined(SPARC) || defined(SPARC64) +static const struct xlat openmodessol[] = { + { 0, "O_RDWR" }, + { 1, "O_RDONLY" }, + { 2, "O_WRONLY" }, + { 0x80, "O_NONBLOCK" }, + { 8, "O_APPEND" }, + { 0x100, "O_CREAT" }, + { 0x200, "O_TRUNC" }, + { 0x400, "O_EXCL" }, + { 0x800, "O_NOCTTY" }, + { 0x10, "O_SYNC" }, + { 0x40, "O_DSYNC" }, + { 0x8000, "O_RSYNC" }, + { 4, "O_NDELAY" }, + { 0x1000, "O_PRIV" }, + { 0, NULL }, +}; + +int +solaris_open(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + /* flags */ + printflags(openmodessol, tcp->u_arg[1] + 1, "O_???"); + if (tcp->u_arg[1] & 0x100) { + /* mode */ + tprintf(", %#lo", tcp->u_arg[2]); + } + } + return 0; +} + +#endif + +int +sys_creat(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", %#lo", tcp->u_arg[1]); + } + return 0; +} + +static const struct xlat access_flags[] = { + { F_OK, "F_OK", }, + { R_OK, "R_OK" }, + { W_OK, "W_OK" }, + { X_OK, "X_OK" }, +#ifdef EFF_ONLY_OK + { EFF_ONLY_OK, "EFF_ONLY_OK" }, +#endif +#ifdef EX_OK + { EX_OK, "EX_OK" }, +#endif + { 0, NULL }, +}; + +static int +decode_access(struct tcb *tcp, int offset) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + printflags(access_flags, tcp->u_arg[offset + 1], "?_OK"); + } + return 0; +} + +int +sys_access(struct tcb *tcp) +{ + return decode_access(tcp, 0); +} + +int +sys_faccessat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_access(tcp, 1); +} + +int +sys_umask(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lo", tcp->u_arg[0]); + } + return RVAL_OCTAL; +} + +const struct xlat whence_codes[] = { + { SEEK_SET, "SEEK_SET" }, + { SEEK_CUR, "SEEK_CUR" }, + { SEEK_END, "SEEK_END" }, +#ifdef SEEK_DATA + { SEEK_DATA, "SEEK_DATA" }, +#endif +#ifdef SEEK_HOLE + { SEEK_HOLE, "SEEK_HOLE" }, +#endif + { 0, NULL }, +}; + +/* 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. + * Use test/x32_lseek.c to test lseek decoding. + */ +#if defined(LINUX_MIPSN32) || defined(X32) +int +sys_lseek(struct tcb *tcp) +{ + long long offset; + int whence; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + offset = tcp->ext_arg[1]; + whence = tcp->u_arg[2]; + if (whence == SEEK_SET) + tprintf(", %llu, ", offset); + else + tprintf(", %lld, ", offset); + printxval(whence_codes, whence, "SEEK_???"); + } + return RVAL_LUDECIMAL; +} +#else +int +sys_lseek(struct tcb *tcp) +{ + long offset; + int whence; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + offset = tcp->u_arg[1]; + whence = tcp->u_arg[2]; + if (whence == SEEK_SET) + tprintf(", %lu, ", offset); + else + tprintf(", %ld, ", offset); + printxval(whence_codes, whence, "SEEK_???"); + } + return RVAL_UDECIMAL; +} +#endif + +/* llseek syscall takes explicitly two ulong arguments hi, lo, + * rather than one 64-bit argument for which LONG_LONG works + * appropriate for the native byte order. + * + * See kernel's fs/read_write.c::SYSCALL_DEFINE5(llseek, ...) + * + * hi,lo are "unsigned longs" and combined exactly this way in kernel: + * ((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. + */ +int +sys_llseek(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + if (tcp->u_arg[4] == SEEK_SET) + tprintf(", %llu, ", + ((long long) tcp->u_arg[1]) << 32 | + (unsigned long long) (unsigned) tcp->u_arg[2]); + else + tprintf(", %lld, ", + ((long long) tcp->u_arg[1]) << 32 | + (unsigned long long) (unsigned) tcp->u_arg[2]); + } + else { + long long off; + if (syserror(tcp) || umove(tcp, tcp->u_arg[3], &off) < 0) + tprintf("%#lx, ", tcp->u_arg[3]); + else + tprintf("[%llu], ", off); + printxval(whence_codes, tcp->u_arg[4], "SEEK_???"); + } + return 0; +} + +int +sys_readahead(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); + argn = printllval(tcp, ", %lld", 1); + tprintf(", %ld", tcp->u_arg[argn]); + } + return 0; +} + +int +sys_truncate(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +#if _LFS64_LARGEFILE +int +sys_truncate64(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + printllval(tcp, ", %llu", 1); + } + return 0; +} +#endif + +int +sys_ftruncate(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +#if _LFS64_LARGEFILE +int +sys_ftruncate64(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + printllval(tcp, ", %llu", 1); + } + return 0; +} +#endif + +/* several stats */ + +static const struct xlat modetypes[] = { + { S_IFREG, "S_IFREG" }, + { S_IFSOCK, "S_IFSOCK" }, + { S_IFIFO, "S_IFIFO" }, + { S_IFLNK, "S_IFLNK" }, + { S_IFDIR, "S_IFDIR" }, + { S_IFBLK, "S_IFBLK" }, + { S_IFCHR, "S_IFCHR" }, + { 0, NULL }, +}; + +static const char * +sprintmode(int mode) +{ + static char buf[sizeof("S_IFSOCK|S_ISUID|S_ISGID|S_ISVTX|%o") + + sizeof(int)*3 + + /*paranoia:*/ 8]; + const char *s; + + if ((mode & S_IFMT) == 0) + s = ""; + else if ((s = xlookup(modetypes, mode & S_IFMT)) == NULL) { + sprintf(buf, "%#o", mode); + return buf; + } + s = buf + sprintf(buf, "%s%s%s%s", s, + (mode & S_ISUID) ? "|S_ISUID" : "", + (mode & S_ISGID) ? "|S_ISGID" : "", + (mode & S_ISVTX) ? "|S_ISVTX" : ""); + mode &= ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX); + if (mode) + sprintf((char*)s, "|%#o", mode); + s = (*buf == '|') ? buf + 1 : buf; + return *s ? s : "0"; +} + +static char * +sprinttime(time_t t) +{ + struct tm *tmp; + static char buf[sizeof("yyyy/mm/dd-hh:mm:ss")]; + + if (t == 0) { + strcpy(buf, "0"); + return buf; + } + 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); + else + snprintf(buf, sizeof buf, "%lu", (unsigned long) t); + + return buf; +} + +#if defined(SPARC) || defined(SPARC64) +typedef struct { + int tv_sec; + int tv_nsec; +} timestruct_t; + +struct solstat { + unsigned st_dev; + int st_pad1[3]; /* network id */ + unsigned st_ino; + unsigned st_mode; + unsigned st_nlink; + unsigned st_uid; + unsigned st_gid; + unsigned st_rdev; + int st_pad2[2]; + int st_size; + int st_pad3; /* st_size, off_t expansion */ + timestruct_t st_atime; + timestruct_t st_mtime; + timestruct_t st_ctime; + int st_blksize; + int st_blocks; + char st_fstype[16]; + int st_pad4[8]; /* expansion area */ +}; + +static void +printstatsol(struct tcb *tcp, long addr) +{ + struct solstat statbuf; + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + if (!abbrev(tcp)) { + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ", + (unsigned long) ((statbuf.st_dev >> 18) & 0x3fff), + (unsigned long) (statbuf.st_dev & 0x3ffff), + (unsigned long) statbuf.st_ino, + sprintmode(statbuf.st_mode)); + tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ", + (unsigned long) statbuf.st_nlink, + (unsigned long) statbuf.st_uid, + (unsigned long) statbuf.st_gid); + tprintf("st_blksize=%lu, ", (unsigned long) statbuf.st_blksize); + tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks); + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode)); + switch (statbuf.st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) ((statbuf.st_rdev >> 18) & 0x3fff), + (unsigned long) (statbuf.st_rdev & 0x3ffff)); + break; + default: + tprintf("st_size=%u, ", statbuf.st_size); + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime.tv_sec)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime.tv_sec)); + tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec)); + } + else + tprints("...}"); +} + +# if defined(SPARC64) +static void +printstat_sparc64(struct tcb *tcp, long addr) +{ + struct stat_sparc64 statbuf; + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + if (!abbrev(tcp)) { + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ", + (unsigned long) major(statbuf.st_dev), + (unsigned long) minor(statbuf.st_dev), + (unsigned long) statbuf.st_ino, + sprintmode(statbuf.st_mode)); + tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ", + (unsigned long) statbuf.st_nlink, + (unsigned long) statbuf.st_uid, + (unsigned long) statbuf.st_gid); + tprintf("st_blksize=%lu, ", + (unsigned long) statbuf.st_blksize); + tprintf("st_blocks=%lu, ", + (unsigned long) statbuf.st_blocks); + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode)); + switch (statbuf.st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) major(statbuf.st_rdev), + (unsigned long) minor(statbuf.st_rdev)); + break; + default: + tprintf("st_size=%lu, ", statbuf.st_size); + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); + tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime)); + } + else + tprints("...}"); +} +# endif /* SPARC64 */ +#endif /* SPARC[64] */ + +#if defined POWERPC64 +struct stat_powerpc32 { + unsigned int st_dev; + unsigned int st_ino; + unsigned int st_mode; + unsigned short st_nlink; + unsigned int st_uid; + unsigned int st_gid; + unsigned int st_rdev; + unsigned int st_size; + unsigned int st_blksize; + unsigned int st_blocks; + unsigned int st_atime; + unsigned int st_atime_nsec; + unsigned int st_mtime; + unsigned int st_mtime_nsec; + unsigned int st_ctime; + unsigned int st_ctime_nsec; + unsigned int __unused4; + unsigned int __unused5; +}; + +static void +printstat_powerpc32(struct tcb *tcp, long addr) +{ + struct stat_powerpc32 statbuf; + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + if (!abbrev(tcp)) { + tprintf("{st_dev=makedev(%u, %u), st_ino=%u, st_mode=%s, ", + major(statbuf.st_dev), minor(statbuf.st_dev), + statbuf.st_ino, + sprintmode(statbuf.st_mode)); + tprintf("st_nlink=%u, st_uid=%u, st_gid=%u, ", + statbuf.st_nlink, statbuf.st_uid, statbuf.st_gid); + tprintf("st_blksize=%u, ", statbuf.st_blksize); + tprintf("st_blocks=%u, ", statbuf.st_blocks); + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode)); + switch (statbuf.st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) major(statbuf.st_rdev), + (unsigned long) minor(statbuf.st_rdev)); + break; + default: + tprintf("st_size=%u, ", statbuf.st_size); + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); + tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime)); + } + else + tprints("...}"); +} +#endif /* POWERPC64 */ + +static const struct xlat fileflags[] = { + { 0, NULL }, +}; + +static void +realprintstat(struct tcb *tcp, struct stat *statbuf) +{ + if (!abbrev(tcp)) { + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ", + (unsigned long) major(statbuf->st_dev), + (unsigned long) minor(statbuf->st_dev), + (unsigned long) statbuf->st_ino, + sprintmode(statbuf->st_mode)); + tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ", + (unsigned long) statbuf->st_nlink, + (unsigned long) statbuf->st_uid, + (unsigned long) statbuf->st_gid); +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + tprintf("st_blksize=%lu, ", (unsigned long) statbuf->st_blksize); +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + tprintf("st_blocks=%lu, ", (unsigned long) statbuf->st_blocks); +#endif + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf->st_mode)); + switch (statbuf->st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: +#ifdef HAVE_STRUCT_STAT_ST_RDEV + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) major(statbuf->st_rdev), + (unsigned long) minor(statbuf->st_rdev)); +#else /* !HAVE_STRUCT_STAT_ST_RDEV */ + tprintf("st_size=makedev(%lu, %lu), ", + (unsigned long) major(statbuf->st_size), + (unsigned long) minor(statbuf->st_size)); +#endif /* !HAVE_STRUCT_STAT_ST_RDEV */ + break; + default: + tprintf("st_size=%lu, ", (unsigned long) statbuf->st_size); + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf->st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf->st_mtime)); + tprintf("st_ctime=%s", sprinttime(statbuf->st_ctime)); +#if HAVE_STRUCT_STAT_ST_FLAGS + tprints(", st_flags="); + printflags(fileflags, statbuf->st_flags, "UF_???"); +#endif +#if HAVE_STRUCT_STAT_ST_ACLCNT + tprintf(", st_aclcnt=%d", statbuf->st_aclcnt); +#endif +#if HAVE_STRUCT_STAT_ST_LEVEL + tprintf(", st_level=%ld", statbuf->st_level); +#endif +#if HAVE_STRUCT_STAT_ST_FSTYPE + tprintf(", st_fstype=%.*s", + (int) sizeof statbuf->st_fstype, statbuf->st_fstype); +#endif +#if HAVE_STRUCT_STAT_ST_GEN + tprintf(", st_gen=%u", statbuf->st_gen); +#endif + tprints("}"); + } + else + tprints("...}"); +} + +#ifndef X32 +static void +printstat(struct tcb *tcp, long addr) +{ + struct stat statbuf; + + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + +#if defined(SPARC) || defined(SPARC64) + if (current_personality == 1) { + printstatsol(tcp, addr); + return; + } +#ifdef SPARC64 + else if (current_personality == 2) { + printstat_sparc64(tcp, addr); + return; + } +#endif +#endif /* SPARC[64] */ + +#if defined POWERPC64 + if (current_personality == 1) { + printstat_powerpc32(tcp, addr); + return; + } +#endif + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + realprintstat(tcp, &statbuf); +} +#else /* X32 */ +# define printstat printstat64 +#endif + +#if !defined HAVE_STAT64 && defined X86_64 +/* + * Linux x86_64 has unified `struct stat' but its i386 biarch needs + * `struct stat64'. Its definition expects 32-bit `long'. + * is not in the public includes set. + * __GNUC__ is needed for the required __attribute__ below. + */ +struct stat64 { + unsigned long long st_dev; + unsigned char __pad0[4]; + unsigned int __st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned int st_uid; + unsigned int st_gid; + unsigned long long st_rdev; + unsigned char __pad3[4]; + long long st_size; + unsigned int st_blksize; + unsigned long long st_blocks; + unsigned int st_atime; + unsigned int st_atime_nsec; + unsigned int st_mtime; + unsigned int st_mtime_nsec; + unsigned int st_ctime; + unsigned int st_ctime_nsec; + unsigned long long st_ino; +} __attribute__((packed)); +# define HAVE_STAT64 1 +# define STAT64_SIZE 96 +#endif + +#ifdef HAVE_STAT64 +static void +printstat64(struct tcb *tcp, long addr) +{ +#ifdef X32 + struct stat statbuf; +#else + struct stat64 statbuf; +#endif + +#ifdef STAT64_SIZE + (void) sizeof(char[sizeof statbuf == STAT64_SIZE ? 1 : -1]); +#endif + + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + +#if defined(SPARC) || defined(SPARC64) + if (current_personality == 1) { + printstatsol(tcp, addr); + return; + } +# ifdef SPARC64 + else if (current_personality == 2) { + printstat_sparc64(tcp, addr); + return; + } +# endif +#endif /* SPARC[64] */ + +#if defined X86_64 + if (current_personality != 1) { + printstat(tcp, addr); + return; + } +#endif + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + if (!abbrev(tcp)) { +#ifdef HAVE_LONG_LONG + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%llu, st_mode=%s, ", +#else + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ", +#endif + (unsigned long) major(statbuf.st_dev), + (unsigned long) minor(statbuf.st_dev), +#ifdef HAVE_LONG_LONG + (unsigned long long) statbuf.st_ino, +#else + (unsigned long) statbuf.st_ino, +#endif + sprintmode(statbuf.st_mode)); + tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ", + (unsigned long) statbuf.st_nlink, + (unsigned long) statbuf.st_uid, + (unsigned long) statbuf.st_gid); +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + tprintf("st_blksize=%lu, ", + (unsigned long) statbuf.st_blksize); +#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks); +#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode)); + switch (statbuf.st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: +#ifdef HAVE_STRUCT_STAT_ST_RDEV + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) major(statbuf.st_rdev), + (unsigned long) minor(statbuf.st_rdev)); +#else /* !HAVE_STRUCT_STAT_ST_RDEV */ + tprintf("st_size=makedev(%lu, %lu), ", + (unsigned long) major(statbuf.st_size), + (unsigned long) minor(statbuf.st_size)); +#endif /* !HAVE_STRUCT_STAT_ST_RDEV */ + break; + default: +#ifdef HAVE_LONG_LONG + tprintf("st_size=%llu, ", (unsigned long long) statbuf.st_size); +#else + tprintf("st_size=%lu, ", (unsigned long) statbuf.st_size); +#endif + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); + tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime)); +#if HAVE_STRUCT_STAT_ST_FLAGS + tprints(", st_flags="); + printflags(fileflags, statbuf.st_flags, "UF_???"); +#endif +#if HAVE_STRUCT_STAT_ST_ACLCNT + tprintf(", st_aclcnt=%d", statbuf.st_aclcnt); +#endif +#if HAVE_STRUCT_STAT_ST_LEVEL + tprintf(", st_level=%ld", statbuf.st_level); +#endif +#if HAVE_STRUCT_STAT_ST_FSTYPE + tprintf(", st_fstype=%.*s", + (int) sizeof statbuf.st_fstype, statbuf.st_fstype); +#endif +#if HAVE_STRUCT_STAT_ST_GEN + tprintf(", st_gen=%u", statbuf.st_gen); +#endif + tprints("}"); + } + else + tprints("...}"); +} +#endif /* HAVE_STAT64 */ + +#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) +static void +convertoldstat(const struct __old_kernel_stat *oldbuf, struct stat *newbuf) +{ + newbuf->st_dev = oldbuf->st_dev; + newbuf->st_ino = oldbuf->st_ino; + newbuf->st_mode = oldbuf->st_mode; + newbuf->st_nlink = oldbuf->st_nlink; + newbuf->st_uid = oldbuf->st_uid; + newbuf->st_gid = oldbuf->st_gid; + newbuf->st_rdev = oldbuf->st_rdev; + newbuf->st_size = oldbuf->st_size; + newbuf->st_atime = oldbuf->st_atime; + newbuf->st_mtime = oldbuf->st_mtime; + newbuf->st_ctime = oldbuf->st_ctime; + newbuf->st_blksize = 0; /* not supported in old_stat */ + newbuf->st_blocks = 0; /* not supported in old_stat */ +} + +static void +printoldstat(struct tcb *tcp, long addr) +{ + struct __old_kernel_stat statbuf; + struct stat newstatbuf; + + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + +# if defined(SPARC) || defined(SPARC64) + if (current_personality == 1) { + printstatsol(tcp, addr); + return; + } +# endif + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + convertoldstat(&statbuf, &newstatbuf); + realprintstat(tcp, &newstatbuf); +} +#endif + +int +sys_stat(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printstat(tcp, tcp->u_arg[1]); + } + return 0; +} + +#ifdef X32 +static void +printstat64_x32(struct tcb *tcp, long addr) +{ + struct stat64 statbuf; + + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + + if (!abbrev(tcp)) { + tprintf("{st_dev=makedev(%lu, %lu), st_ino=%llu, st_mode=%s, ", + (unsigned long) major(statbuf.st_dev), + (unsigned long) minor(statbuf.st_dev), + (unsigned long long) statbuf.st_ino, + sprintmode(statbuf.st_mode)); + tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ", + (unsigned long) statbuf.st_nlink, + (unsigned long) statbuf.st_uid, + (unsigned long) statbuf.st_gid); + tprintf("st_blksize=%lu, ", + (unsigned long) statbuf.st_blksize); + tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks); + } + else + tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode)); + switch (statbuf.st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + tprintf("st_rdev=makedev(%lu, %lu), ", + (unsigned long) major(statbuf.st_rdev), + (unsigned long) minor(statbuf.st_rdev)); + break; + default: + tprintf("st_size=%llu, ", (unsigned long long) statbuf.st_size); + break; + } + if (!abbrev(tcp)) { + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); + tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime)); + tprints("}"); + } + else + tprints("...}"); +} +#endif /* X32 */ + +int +sys_stat64(struct tcb *tcp) +{ +#ifdef HAVE_STAT64 + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { +# ifdef X32 + printstat64_x32(tcp, tcp->u_arg[1]); +# else + printstat64(tcp, tcp->u_arg[1]); +# endif + } + return 0; +#else + return printargs(tcp); +#endif +} + +#ifndef AT_SYMLINK_NOFOLLOW +# define AT_SYMLINK_NOFOLLOW 0x100 +#endif +#ifndef AT_REMOVEDIR +# define AT_REMOVEDIR 0x200 +#endif +#ifndef AT_SYMLINK_FOLLOW +# define AT_SYMLINK_FOLLOW 0x400 +#endif +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0x800 +#endif +#ifndef AT_EMPTY_PATH +# define AT_EMPTY_PATH 0x1000 +#endif + +static const struct xlat at_flags[] = { + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" }, + { AT_REMOVEDIR, "AT_REMOVEDIR" }, + { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" }, + { AT_NO_AUTOMOUNT, "AT_NO_AUTOMOUNT" }, + { AT_EMPTY_PATH, "AT_EMPTY_PATH" }, + { 0, NULL } +}; + +int +sys_newfstatat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + } else { +#ifdef POWERPC64 + if (current_personality == 0) + printstat(tcp, tcp->u_arg[2]); + else + printstat64(tcp, tcp->u_arg[2]); +#elif defined HAVE_STAT64 + printstat64(tcp, tcp->u_arg[2]); +#else + printstat(tcp, tcp->u_arg[2]); +#endif + tprints(", "); + printflags(at_flags, tcp->u_arg[3], "AT_???"); + } + return 0; +} + +#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) +int +sys_oldstat(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printoldstat(tcp, tcp->u_arg[1]); + } + return 0; +} +#endif + +int +sys_fstat(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printstat(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_fstat64(struct tcb *tcp) +{ +#ifdef HAVE_STAT64 + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { +# ifdef X32 + printstat64_x32(tcp, tcp->u_arg[1]); +# else + printstat64(tcp, tcp->u_arg[1]); +# endif + } + return 0; +#else + return printargs(tcp); +#endif +} + +#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) +int +sys_oldfstat(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printoldstat(tcp, tcp->u_arg[1]); + } + return 0; +} +#endif + +#if defined(SPARC) || defined(SPARC64) + +int +sys_xstat(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + } else { +# ifdef _STAT64_VER + if (tcp->u_arg[0] == _STAT64_VER) + printstat64(tcp, tcp->u_arg[2]); + else +# endif + printstat(tcp, tcp->u_arg[2]); + } + return 0; +} + +int +sys_fxstat(struct tcb *tcp) +{ + if (entering(tcp)) + tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]); + else { +# ifdef _STAT64_VER + if (tcp->u_arg[0] == _STAT64_VER) + printstat64(tcp, tcp->u_arg[2]); + else +# endif + printstat(tcp, tcp->u_arg[2]); + } + return 0; +} + +int +sys_lxstat(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + } else { +# ifdef _STAT64_VER + if (tcp->u_arg[0] == _STAT64_VER) + printstat64(tcp, tcp->u_arg[2]); + else +# endif + printstat(tcp, tcp->u_arg[2]); + } + return 0; +} + +int +sys_xmknod(struct tcb *tcp) +{ + int mode = tcp->u_arg[2]; + + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprintf(", %s", sprintmode(mode)); + switch (mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + tprintf(", makedev(%lu, %lu)", + (unsigned long) ((tcp->u_arg[3] >> 18) & 0x3fff), + (unsigned long) (tcp->u_arg[3] & 0x3ffff)); + break; + default: + break; + } + } + return 0; +} + +# ifdef HAVE_SYS_ACL_H + +# include + +static const struct xlat aclcmds[] = { +# ifdef SETACL + { SETACL, "SETACL" }, +# endif +# ifdef GETACL + { GETACL, "GETACL" }, +# endif +# ifdef GETACLCNT + { GETACLCNT, "GETACLCNT" }, +# endif +# ifdef ACL_GET + { ACL_GET, "ACL_GET" }, +# endif +# ifdef ACL_SET + { ACL_SET, "ACL_SET" }, +# endif +# ifdef ACL_CNT + { ACL_CNT, "ACL_CNT" }, +# endif + { 0, NULL }, +}; + +int +sys_acl(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printxval(aclcmds, tcp->u_arg[1], "???ACL???"); + tprintf(", %ld", tcp->u_arg[2]); + /* + * FIXME - dump out the list of aclent_t's pointed to + * by "tcp->u_arg[3]" if it's not NULL. + */ + if (tcp->u_arg[3]) + tprintf(", %#lx", tcp->u_arg[3]); + else + tprints(", NULL"); + } + return 0; +} + +int +sys_facl(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printxval(aclcmds, tcp->u_arg[1], "???ACL???"); + tprintf(", %ld", tcp->u_arg[2]); + /* + * FIXME - dump out the list of aclent_t's pointed to + * by "tcp->u_arg[3]" if it's not NULL. + */ + if (tcp->u_arg[3]) + tprintf(", %#lx", tcp->u_arg[3]); + else + tprints(", NULL"); + } + return 0; +} + +static const struct xlat aclipc[] = { +# ifdef IPC_SHM + { IPC_SHM, "IPC_SHM" }, +# endif +# ifdef IPC_SEM + { IPC_SEM, "IPC_SEM" }, +# endif +# ifdef IPC_MSG + { IPC_MSG, "IPC_MSG" }, +# endif + { 0, NULL }, +}; + +int +sys_aclipc(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(aclipc, tcp->u_arg[0], "???IPC???"); + tprintf(", %#lx, ", tcp->u_arg[1]); + printxval(aclcmds, tcp->u_arg[2], "???ACL???"); + tprintf(", %ld", tcp->u_arg[3]); + /* + * FIXME - dump out the list of aclent_t's pointed to + * by "tcp->u_arg[4]" if it's not NULL. + */ + if (tcp->u_arg[4]) + tprintf(", %#lx", tcp->u_arg[4]); + else + tprints(", NULL"); + } + return 0; +} + +# endif /* HAVE_SYS_ACL_H */ + +#endif /* SPARC[64] */ + +static const struct xlat fsmagic[] = { + { 0x73757245, "CODA_SUPER_MAGIC" }, + { 0x012ff7b7, "COH_SUPER_MAGIC" }, + { 0x1373, "DEVFS_SUPER_MAGIC" }, + { 0x1cd1, "DEVPTS_SUPER_MAGIC" }, + { 0x414A53, "EFS_SUPER_MAGIC" }, + { 0xef51, "EXT2_OLD_SUPER_MAGIC" }, + { 0xef53, "EXT2_SUPER_MAGIC" }, + { 0x137d, "EXT_SUPER_MAGIC" }, + { 0xf995e849, "HPFS_SUPER_MAGIC" }, + { 0x9660, "ISOFS_SUPER_MAGIC" }, + { 0x137f, "MINIX_SUPER_MAGIC" }, + { 0x138f, "MINIX_SUPER_MAGIC2" }, + { 0x2468, "MINIX2_SUPER_MAGIC" }, + { 0x2478, "MINIX2_SUPER_MAGIC2" }, + { 0x4d44, "MSDOS_SUPER_MAGIC" }, + { 0x564c, "NCP_SUPER_MAGIC" }, + { 0x6969, "NFS_SUPER_MAGIC" }, + { 0x9fa0, "PROC_SUPER_MAGIC" }, + { 0x002f, "QNX4_SUPER_MAGIC" }, + { 0x52654973, "REISERFS_SUPER_MAGIC" }, + { 0x02011994, "SHMFS_SUPER_MAGIC" }, + { 0x517b, "SMB_SUPER_MAGIC" }, + { 0x012ff7b6, "SYSV2_SUPER_MAGIC" }, + { 0x012ff7b5, "SYSV4_SUPER_MAGIC" }, + { 0x00011954, "UFS_MAGIC" }, + { 0x54190100, "UFS_CIGAM" }, + { 0x012ff7b4, "XENIX_SUPER_MAGIC" }, + { 0x012fd16d, "XIAFS_SUPER_MAGIC" }, + { 0x62656572, "SYSFS_MAGIC" }, + { 0, NULL }, +}; + +static const char * +sprintfstype(int magic) +{ + static char buf[32]; + const char *s; + + s = xlookup(fsmagic, magic); + if (s) { + sprintf(buf, "\"%s\"", s); + return buf; + } + sprintf(buf, "%#x", magic); + return buf; +} + +static void +printstatfs(struct tcb *tcp, long addr) +{ + struct statfs statbuf; + + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } +#ifdef ALPHA + + tprintf("{f_type=%s, f_fbsize=%u, f_blocks=%u, f_bfree=%u, ", + sprintfstype(statbuf.f_type), + statbuf.f_bsize, statbuf.f_blocks, statbuf.f_bfree); + tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_fsid={%d, %d}, f_namelen=%u", + statbuf.f_bavail, statbuf.f_files, statbuf.f_ffree, + statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1], + statbuf.f_namelen); +#else /* !ALPHA */ + tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ", + sprintfstype(statbuf.f_type), + (unsigned long)statbuf.f_bsize, + (unsigned long)statbuf.f_blocks, + (unsigned long)statbuf.f_bfree); + tprintf("f_bavail=%lu, f_files=%lu, f_ffree=%lu, f_fsid={%d, %d}", + (unsigned long)statbuf.f_bavail, + (unsigned long)statbuf.f_files, + (unsigned long)statbuf.f_ffree, + statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); + tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); +#endif /* !ALPHA */ +#ifdef _STATFS_F_FRSIZE + tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize); +#endif + tprints("}"); +} + +int +sys_statfs(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printstatfs(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_fstatfs(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printstatfs(tcp, tcp->u_arg[1]); + } + return 0; +} + +#if defined HAVE_STATFS64 +static void +printstatfs64(struct tcb *tcp, long addr) +{ + struct statfs64 statbuf; + + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + tprintf("{f_type=%s, f_bsize=%llu, f_blocks=%llu, f_bfree=%llu, ", + sprintfstype(statbuf.f_type), + (unsigned long long)statbuf.f_bsize, + (unsigned long long)statbuf.f_blocks, + (unsigned long long)statbuf.f_bfree); + tprintf("f_bavail=%llu, f_files=%llu, f_ffree=%llu, f_fsid={%d, %d}", + (unsigned long long)statbuf.f_bavail, + (unsigned long long)statbuf.f_files, + (unsigned long long)statbuf.f_ffree, + statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); + tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); +#ifdef _STATFS_F_FRSIZE + tprintf(", f_frsize=%llu", (unsigned long long)statbuf.f_frsize); +#endif +#ifdef _STATFS_F_FLAGS + tprintf(", f_flags=%llu", (unsigned long long)statbuf.f_flags); +#endif + tprints("}"); +} + +struct compat_statfs64 { + 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; + fsid_t f_fsid; + uint32_t f_namelen; + uint32_t f_frsize; + uint32_t f_flags; + uint32_t f_spare[4]; +} +#if defined(X86_64) || defined(IA64) + __attribute__ ((packed, aligned(4))) +#endif +; + +static void +printcompat_statfs64(struct tcb *tcp, long addr) +{ + struct compat_statfs64 statbuf; + + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + if (umove(tcp, addr, &statbuf) < 0) { + tprints("{...}"); + return; + } + tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%llu, f_bfree=%llu, ", + sprintfstype(statbuf.f_type), + (unsigned long)statbuf.f_bsize, + (unsigned long long)statbuf.f_blocks, + (unsigned long long)statbuf.f_bfree); + tprintf("f_bavail=%llu, f_files=%llu, f_ffree=%llu, f_fsid={%d, %d}", + (unsigned long long)statbuf.f_bavail, + (unsigned long long)statbuf.f_files, + (unsigned long long)statbuf.f_ffree, + statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]); + tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen); + tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize); + tprintf(", f_flags=%lu}", (unsigned long)statbuf.f_frsize); +} + +int +sys_statfs64(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprintf(", %lu, ", tcp->u_arg[1]); + } else { + if (tcp->u_arg[1] == sizeof(struct statfs64)) + printstatfs64(tcp, tcp->u_arg[2]); + else if (tcp->u_arg[1] == sizeof(struct compat_statfs64)) + printcompat_statfs64(tcp, tcp->u_arg[2]); + else + tprints("{???}"); + } + return 0; +} + +int +sys_fstatfs64(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprintf(", %lu, ", tcp->u_arg[1]); + } else { + if (tcp->u_arg[1] == sizeof(struct statfs64)) + printstatfs64(tcp, tcp->u_arg[2]); + else if (tcp->u_arg[1] == sizeof(struct compat_statfs64)) + printcompat_statfs64(tcp, tcp->u_arg[2]); + else + tprints("{???}"); + } + return 0; +} +#endif + +#if defined(ALPHA) +int +osf_statfs(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + printstatfs(tcp, tcp->u_arg[1]); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +int +osf_fstatfs(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + } else { + printstatfs(tcp, tcp->u_arg[1]); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} +#endif + +/* directory */ +int +sys_chdir(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + } + return 0; +} + +static int +decode_mkdir(struct tcb *tcp, int offset) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprintf(", %#lo", tcp->u_arg[offset + 1]); + } + return 0; +} + +int +sys_mkdir(struct tcb *tcp) +{ + return decode_mkdir(tcp, 0); +} + +int +sys_mkdirat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_mkdir(tcp, 1); +} + +int +sys_link(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printpath(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_linkat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + print_dirfd(tcp, tcp->u_arg[2]); + printpath(tcp, tcp->u_arg[3]); + tprints(", "); + printflags(at_flags, tcp->u_arg[4], "AT_???"); + } + return 0; +} + +int +sys_unlinkat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + printflags(at_flags, tcp->u_arg[2], "AT_???"); + } + return 0; +} + +int +sys_symlinkat(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + print_dirfd(tcp, tcp->u_arg[1]); + printpath(tcp, tcp->u_arg[2]); + } + return 0; +} + +static int +decode_readlink(struct tcb *tcp, int offset) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[offset + 1]); + else + /* Used to use printpathn(), but readlink + * neither includes NUL in the returned count, + * nor actually writes it into memory. + * printpathn() would decide on printing + * "..." 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]); + } + return 0; +} + +int +sys_readlink(struct tcb *tcp) +{ + return decode_readlink(tcp, 0); +} + +int +sys_readlinkat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_readlink(tcp, 1); +} + +int +sys_renameat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + print_dirfd(tcp, tcp->u_arg[2]); + printpath(tcp, tcp->u_arg[3]); + } + return 0; +} + +int +sys_chown(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + printuid(", ", tcp->u_arg[1]); + printuid(", ", tcp->u_arg[2]); + } + return 0; +} + +int +sys_fchownat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + printpath(tcp, tcp->u_arg[1]); + printuid(", ", tcp->u_arg[2]); + printuid(", ", tcp->u_arg[3]); + tprints(", "); + printflags(at_flags, tcp->u_arg[4], "AT_???"); + } + return 0; +} + +int +sys_fchown(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + printuid(", ", tcp->u_arg[1]); + printuid(", ", tcp->u_arg[2]); + } + return 0; +} + +static int +decode_chmod(struct tcb *tcp, int offset) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprintf(", %#lo", tcp->u_arg[offset + 1]); + } + return 0; +} + +int +sys_chmod(struct tcb *tcp) +{ + return decode_chmod(tcp, 0); +} + +int +sys_fchmodat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_chmod(tcp, 1); +} + +int +sys_fchmod(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprintf(", %#lo", tcp->u_arg[1]); + } + return 0; +} + +#ifdef ALPHA +int +sys_osf_utimes(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0); + } + return 0; +} +#endif + +static int +decode_utimes(struct tcb *tcp, int offset, int special) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + if (tcp->u_arg[offset + 1] == 0) + tprints("NULL"); + else { + tprints("{"); + printtv_bitness(tcp, tcp->u_arg[offset + 1], + BITNESS_CURRENT, special); + tprints(", "); + printtv_bitness(tcp, tcp->u_arg[offset + 1] + + sizeof(struct timeval), + BITNESS_CURRENT, special); + tprints("}"); + } + } + return 0; +} + +int +sys_utimes(struct tcb *tcp) +{ + return decode_utimes(tcp, 0, 0); +} + +int +sys_futimesat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_utimes(tcp, 1, 0); +} + +int +sys_utimensat(struct tcb *tcp) +{ + if (entering(tcp)) { + print_dirfd(tcp, tcp->u_arg[0]); + decode_utimes(tcp, 1, 1); + tprints(", "); + printflags(at_flags, tcp->u_arg[3], "AT_???"); + } + return 0; +} + +int +sys_utime(struct tcb *tcp) +{ + union { + long utl[2]; + int uti[2]; + long paranoia_for_huge_wordsize[4]; + } u; + unsigned wordsize; + + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + + wordsize = current_wordsize; + if (!tcp->u_arg[1]) + tprints("NULL"); + else if (!verbose(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else if (umoven(tcp, tcp->u_arg[1], 2 * wordsize, (char *) &u) < 0) + tprints("[?, ?]"); + else if (wordsize == sizeof u.utl[0]) { + tprintf("[%s,", sprinttime(u.utl[0])); + tprintf(" %s]", sprinttime(u.utl[1])); + } + else if (wordsize == sizeof u.uti[0]) { + tprintf("[%s,", sprinttime(u.uti[0])); + tprintf(" %s]", sprinttime(u.uti[1])); + } + else + tprintf("", + wordsize); + } + return 0; +} + +static int +decode_mknod(struct tcb *tcp, int offset) +{ + int mode = tcp->u_arg[offset + 1]; + + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[offset]); + tprintf(", %s", sprintmode(mode)); + switch (mode & S_IFMT) { + case S_IFCHR: + case S_IFBLK: +#if defined(SPARC) || defined(SPARC64) + if (current_personality == 1) + tprintf(", makedev(%lu, %lu)", + (unsigned long) ((tcp->u_arg[offset + 2] >> 18) & 0x3fff), + (unsigned long) (tcp->u_arg[offset + 2] & 0x3ffff)); + else +#endif + tprintf(", makedev(%lu, %lu)", + (unsigned long) major(tcp->u_arg[offset + 2]), + (unsigned long) minor(tcp->u_arg[offset + 2])); + break; + default: + break; + } + } + return 0; +} + +int +sys_mknod(struct tcb *tcp) +{ + return decode_mknod(tcp, 0); +} + +int +sys_mknodat(struct tcb *tcp) +{ + if (entering(tcp)) + print_dirfd(tcp, tcp->u_arg[0]); + return decode_mknod(tcp, 1); +} + +static void +print_old_dirent(struct tcb *tcp, long addr) +{ +#ifdef SH64 + typedef struct kernel_dirent old_dirent_t; +#else + typedef struct { + uint32_t d_ino; + uint32_t d_off; + unsigned short d_reclen; + char d_name[1]; + } old_dirent_t; +#endif + old_dirent_t d; + + if (!verbose(tcp) || umove(tcp, addr, &d) < 0) { + tprintf("%#lx", addr); + return; + } + + tprintf("{d_ino=%lu, d_off=%lu, d_reclen=%u, d_name=\"", + (unsigned long) d.d_ino, (unsigned long) d.d_off, d.d_reclen); + if (d.d_reclen > 256) + d.d_reclen = 256; + printpathn(tcp, addr + offsetof(old_dirent_t, d_name), d.d_reclen); + tprints("\"}"); +} + +int +sys_readdir(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp) || tcp->u_rval == 0 || !verbose(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + 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]); + } + return 0; +} + +static const struct xlat direnttypes[] = { + { DT_UNKNOWN, "DT_UNKNOWN" }, + { DT_FIFO, "DT_FIFO" }, + { DT_CHR, "DT_CHR" }, + { DT_DIR, "DT_DIR" }, + { DT_BLK, "DT_BLK" }, + { DT_REG, "DT_REG" }, + { DT_LNK, "DT_LNK" }, + { DT_SOCK, "DT_SOCK" }, + { DT_WHT, "DT_WHT" }, + { 0, NULL }, +}; + +int +sys_getdents(struct tcb *tcp) +{ + int i, len, dents = 0; + char *buf; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + return 0; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); + return 0; + } + len = tcp->u_rval; + /* Beware of insanely large or negative values in tcp->u_rval */ + if (tcp->u_rval > 1024*1024) + len = 1024*1024; + if (tcp->u_rval < 0) + len = 0; + buf = len ? malloc(len) : NULL; + if (len && !buf) + die_out_of_memory(); + if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) { + tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); + free(buf); + return 0; + } + if (!abbrev(tcp)) + tprints("{"); + for (i = 0; i < len;) { + struct kernel_dirent *d = (struct kernel_dirent *) &buf[i]; + if (!abbrev(tcp)) { + tprintf("%s{d_ino=%lu, d_off=%lu, ", + i ? " " : "", d->d_ino, d->d_off); + tprintf("d_reclen=%u, d_name=\"%s\", d_type=", + d->d_reclen, d->d_name); + printxval(direnttypes, buf[i + d->d_reclen - 1], "DT_???"); + tprints("}"); + } + if (!d->d_reclen) { + tprints("/* d_reclen == 0, problem here */"); + break; + } + i += d->d_reclen; + dents++; + } + if (!abbrev(tcp)) + tprints("}"); + else + tprintf("/* %u entries */", dents); + tprintf(", %lu", tcp->u_arg[2]); + free(buf); + return 0; +} + +#if _LFS64_LARGEFILE +int +sys_getdents64(struct tcb *tcp) +{ + int i, len, dents = 0; + char *buf; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + return 0; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); + return 0; + } + + len = tcp->u_rval; + /* Beware of insanely large or negative tcp->u_rval */ + if (tcp->u_rval > 1024*1024) + len = 1024*1024; + if (tcp->u_rval < 0) + len = 0; + buf = len ? malloc(len) : NULL; + if (len && !buf) + die_out_of_memory(); + + if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) { + tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); + free(buf); + return 0; + } + if (!abbrev(tcp)) + tprints("{"); + for (i = 0; i < len;) { + struct dirent64 *d = (struct dirent64 *) &buf[i]; + if (!abbrev(tcp)) { + tprintf("%s{d_ino=%" PRIu64 ", d_off=%" PRId64 ", ", + i ? " " : "", + d->d_ino, + d->d_off); + tprints("d_type="); + printxval(direnttypes, d->d_type, "DT_???"); + tprints(", "); + tprintf("d_reclen=%u, d_name=\"%s\"}", + d->d_reclen, d->d_name); + } + if (!d->d_reclen) { + tprints("/* d_reclen == 0, problem here */"); + break; + } + i += d->d_reclen; + dents++; + } + if (!abbrev(tcp)) + tprints("}"); + else + tprintf("/* %u entries */", dents); + tprintf(", %lu", tcp->u_arg[2]); + free(buf); + return 0; +} +#endif + +int +sys_getcwd(struct tcb *tcp) +{ + if (exiting(tcp)) { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else + printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +#ifdef HAVE_SYS_ASYNCH_H + +int +sys_aioread(struct tcb *tcp) +{ + struct aio_result_t res; + + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, %lu, ", tcp->u_arg[2], tcp->u_arg[3]); + printxval(whence, tcp->u_arg[4], "L_???"); + if (syserror(tcp) || tcp->u_arg[5] == 0 + || umove(tcp, tcp->u_arg[5], &res) < 0) + tprintf(", %#lx", tcp->u_arg[5]); + else + tprintf(", {aio_return %d aio_errno %d}", + res.aio_return, res.aio_errno); + } + return 0; +} + +int +sys_aiowrite(struct tcb *tcp) +{ + struct aio_result_t res; + + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, %lu, ", tcp->u_arg[2], tcp->u_arg[3]); + printxval(whence, tcp->u_arg[4], "L_???"); + } + else { + if (tcp->u_arg[5] == 0) + tprints(", NULL"); + else if (syserror(tcp) + || umove(tcp, tcp->u_arg[5], &res) < 0) + tprintf(", %#lx", tcp->u_arg[5]); + else + tprintf(", {aio_return %d aio_errno %d}", + res.aio_return, res.aio_errno); + } + return 0; +} + +int +sys_aiowait(struct tcb *tcp) +{ + if (entering(tcp)) + printtv(tcp, tcp->u_arg[0]); + return 0; +} + +int +sys_aiocancel(struct tcb *tcp) +{ + struct aio_result_t res; + + if (exiting(tcp)) { + if (tcp->u_arg[0] == 0) + tprints("NULL"); + else if (syserror(tcp) + || umove(tcp, tcp->u_arg[0], &res) < 0) + tprintf("%#lx", tcp->u_arg[0]); + else + tprintf("{aio_return %d aio_errno %d}", + res.aio_return, res.aio_errno); + } + return 0; +} + +#endif /* HAVE_SYS_ASYNCH_H */ + +static const struct xlat xattrflags[] = { +#ifdef XATTR_CREATE + { XATTR_CREATE, "XATTR_CREATE" }, + { XATTR_REPLACE, "XATTR_REPLACE" }, +#endif + { 0, NULL } +}; + +static void +print_xattr_val(struct tcb *tcp, int failed, + unsigned long arg, + unsigned long insize, + unsigned long size) +{ + if (insize == 0) + failed = 1; + if (!failed) { + unsigned long capacity = 4 * size + 1; + unsigned char *buf = (capacity < size) ? NULL : malloc(capacity); + if (buf == NULL || /* probably a bogus size argument */ + umoven(tcp, arg, size, (char *) &buf[3 * size]) < 0) { + failed = 1; + } + else { + unsigned char *out = buf; + unsigned char *in = &buf[3 * size]; + size_t i; + for (i = 0; i < size; ++i) { + if (in[i] >= ' ' && in[i] <= 0x7e) + *out++ = in[i]; + else { +#define tohex(n) "0123456789abcdef"[n] + *out++ = '\\'; + *out++ = 'x'; + *out++ = tohex(in[i] / 16); + *out++ = tohex(in[i] % 16); + } + } + /* Don't print terminating NUL if there is one. */ + if (i > 0 && in[i - 1] == '\0') + out -= 4; + *out = '\0'; + tprintf(", \"%s\", %ld", buf, insize); + } + free(buf); + } + if (failed) + tprintf(", 0x%lx, %ld", arg, insize); +} + +int +sys_setxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]); + tprints(", "); + printflags(xattrflags, tcp->u_arg[4], "XATTR_???"); + } + return 0; +} + +int +sys_fsetxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]); + tprints(", "); + printflags(xattrflags, tcp->u_arg[4], "XATTR_???"); + } + return 0; +} + +int +sys_getxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + } else { + print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3], + tcp->u_rval); + } + return 0; +} + +int +sys_fgetxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + } else { + print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3], + tcp->u_rval); + } + return 0; +} + +static void +print_xattr_list(struct tcb *tcp, unsigned long addr, unsigned long size) +{ + if (syserror(tcp)) { + tprintf("%#lx", addr); + } else { + if (!addr) { + tprints("NULL"); + } else { + unsigned long len = + (size < tcp->u_rval) ? size : tcp->u_rval; + printstr(tcp, addr, len); + } + } + tprintf(", %lu", size); +} + +int +sys_listxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + print_xattr_list(tcp, tcp->u_arg[1], tcp->u_arg[2]); + } + return 0; +} + +int +sys_flistxattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + print_xattr_list(tcp, tcp->u_arg[1], tcp->u_arg[2]); + } + return 0; +} + +int +sys_removexattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + } + return 0; +} + +int +sys_fremovexattr(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], -1); + } + return 0; +} + +static const struct xlat advise[] = { + { POSIX_FADV_NORMAL, "POSIX_FADV_NORMAL" }, + { POSIX_FADV_RANDOM, "POSIX_FADV_RANDOM" }, + { POSIX_FADV_SEQUENTIAL, "POSIX_FADV_SEQUENTIAL" }, + { POSIX_FADV_WILLNEED, "POSIX_FADV_WILLNEED" }, + { POSIX_FADV_DONTNEED, "POSIX_FADV_DONTNEED" }, + { POSIX_FADV_NOREUSE, "POSIX_FADV_NOREUSE" }, + { 0, NULL } +}; + +int +sys_fadvise64(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); + argn = printllval(tcp, ", %lld", 1); + tprintf(", %ld, ", tcp->u_arg[argn++]); + printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); + } + return 0; +} + +int +sys_fadvise64_64(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); + argn = printllval(tcp, ", %lld, ", 1); + argn = printllval(tcp, "%lld, ", argn); +#if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA + printxval(advise, tcp->u_arg[1], "POSIX_FADV_???"); +#else + printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); +#endif + } + return 0; +} + +static const struct xlat inotify_modes[] = { + { 0x00000001, "IN_ACCESS" }, + { 0x00000002, "IN_MODIFY" }, + { 0x00000004, "IN_ATTRIB" }, + { 0x00000008, "IN_CLOSE_WRITE"}, + { 0x00000010, "IN_CLOSE_NOWRITE"}, + { 0x00000020, "IN_OPEN" }, + { 0x00000040, "IN_MOVED_FROM" }, + { 0x00000080, "IN_MOVED_TO" }, + { 0x00000100, "IN_CREATE" }, + { 0x00000200, "IN_DELETE" }, + { 0x00000400, "IN_DELETE_SELF"}, + { 0x00000800, "IN_MOVE_SELF" }, + { 0x00002000, "IN_UNMOUNT" }, + { 0x00004000, "IN_Q_OVERFLOW" }, + { 0x00008000, "IN_IGNORED" }, + { 0x01000000, "IN_ONLYDIR" }, + { 0x02000000, "IN_DONT_FOLLOW"}, + { 0x20000000, "IN_MASK_ADD" }, + { 0x40000000, "IN_ISDIR" }, + { 0x80000000, "IN_ONESHOT" }, + { 0, NULL } +}; + +static const struct xlat inotify_init_flags[] = { + { 0x00000800, "IN_NONBLOCK" }, + { 0x00080000, "IN_CLOEXEC" }, + { 0, NULL } +}; + +int +sys_inotify_add_watch(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + printflags(inotify_modes, tcp->u_arg[2], "IN_???"); + } + return 0; +} + +int +sys_inotify_rm_watch(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprintf(", %d", (int) tcp->u_arg[1]); + } + return 0; +} + +int +sys_inotify_init1(struct tcb *tcp) +{ + if (entering(tcp)) + printflags(inotify_init_flags, tcp->u_arg[0], "IN_???"); + return 0; +} + +int +sys_fallocate(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); /* fd */ + tprintf(", %#lo, ", tcp->u_arg[1]); /* mode */ + argn = printllval(tcp, "%llu, ", 2); /* offset */ + printllval(tcp, "%llu", argn); /* len */ + } + return 0; +} + +#ifndef SWAP_FLAG_PREFER +# define SWAP_FLAG_PREFER 0x8000 +#endif +#ifndef SWAP_FLAG_DISCARD +# define SWAP_FLAG_DISCARD 0x10000 +#endif +static const struct xlat swap_flags[] = { + { SWAP_FLAG_PREFER, "SWAP_FLAG_PREFER" }, + { SWAP_FLAG_DISCARD, "SWAP_FLAG_DISCARD" }, + { 0, NULL } +}; + +int +sys_swapon(struct tcb *tcp) +{ + if (entering(tcp)) { + int flags = tcp->u_arg[1]; + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printflags(swap_flags, flags & ~SWAP_FLAG_PRIO_MASK, + "SWAP_FLAG_???"); + if (flags & SWAP_FLAG_PREFER) + tprintf("|%d", flags & SWAP_FLAG_PRIO_MASK); + } + return 0; +} diff --git a/alice-strace/install-sh b/alice-strace/install-sh new file mode 100755 index 0000000..a9244eb --- /dev/null +++ b/alice-strace/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-01-19.21; # 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-writeable 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/alice-strace/io.c b/alice-strace/io.c new file mode 100644 index 0000000..22a0ece --- /dev/null +++ b/alice-strace/io.c @@ -0,0 +1,476 @@ +/* + * 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 +#include +#if HAVE_SYS_UIO_H +# include +#endif + +int +sys_read(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_rval); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +int +sys_write(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + dump_bytes(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +#if HAVE_SYS_UIO_H +/* + * data_size limits the cumulative size of printed data. + * Example: recvmsg returing a short read. + */ +void +tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov, unsigned long data_size) +{ +#if SUPPORTED_PERSONALITIES > 1 + union { + struct { u_int32_t base; u_int32_t len; } iov32; + struct { u_int64_t base; u_int64_t len; } iov64; + } iov; +#define sizeof_iov \ + (current_wordsize == 4 ? sizeof(iov.iov32) : sizeof(iov.iov64)) +#define iov_iov_base \ + (current_wordsize == 4 ? (uint64_t) iov.iov32.base : iov.iov64.base) +#define iov_iov_len \ + (current_wordsize == 4 ? (uint64_t) iov.iov32.len : iov.iov64.len) +#else + struct iovec iov; +#define sizeof_iov sizeof(iov) +#define iov_iov_base iov.iov_base +#define iov_iov_len iov.iov_len +#endif + unsigned long size, cur, end, abbrev_end; + int failed = 0; + + if (!len) { + tprints("[]"); + return; + } + size = len * sizeof_iov; + end = addr + size; + if (!verbose(tcp) || size / sizeof_iov != len || end < addr) { + tprintf("%#lx", addr); + return; + } + if (abbrev(tcp)) { + abbrev_end = addr + max_strlen * sizeof_iov; + if (abbrev_end < addr) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = addr; cur < end; cur += sizeof_iov) { + if (cur > addr) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof_iov, (char *) &iov) < 0) { + tprints("?"); + failed = 1; + break; + } + tprints("{"); + if (decode_iov) { + unsigned long len = iov_iov_len; + if (len > data_size) + len = data_size; + data_size -= len; + printstr(tcp, (long) iov_iov_base, len); + } else + tprintf("%#lx", (long) iov_iov_base); + tprintf(", %lu}", (unsigned long)iov_iov_len); + } + tprints("]"); + if (failed) + tprintf(" %#lx", addr); +#undef sizeof_iov +#undef iov_iov_base +#undef iov_iov_len +} + +void +tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov) +{ + tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L); +} + + +/* Returns the total bytes dumped */ +unsigned long +dump_iov(struct tcb *tcp, unsigned long len, unsigned long addr) +{ + unsigned long toret = 0; +#if SUPPORTED_PERSONALITIES > 1 + union { + struct { u_int32_t base; u_int32_t len; } iov32; + struct { u_int64_t base; u_int64_t len; } iov64; + } iov; +#define sizeof_iov \ + (current_wordsize == 4 ? sizeof(iov.iov32) : sizeof(iov.iov64)) +#define iov_iov_base \ + (current_wordsize == 4 ? (uint64_t) iov.iov32.base : iov.iov64.base) +#define iov_iov_len \ + (current_wordsize == 4 ? (uint64_t) iov.iov32.len : iov.iov64.len) +#else + struct iovec iov; +#define sizeof_iov sizeof(iov) +#define iov_iov_base iov.iov_base +#define iov_iov_len iov.iov_len +#endif + unsigned long size, cur, end; + + if (!len) { + return 0; + } + + size = len * sizeof_iov; + end = addr + size; + + if (size / sizeof_iov != len || end < addr) { + assert(0); + } + + for (cur = addr; cur < end; cur += sizeof_iov) { + if (umoven(tcp, cur, sizeof_iov, (char *) &iov) < 0) { + assert(0); + } + unsigned long len = iov_iov_len; + dump_bytes(tcp, (long) iov_iov_base, len); + toret += len; + } +#undef sizeof_iov +#undef iov_iov_base +#undef iov_iov_len + return toret; +} + +int +sys_readv(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) { + tprintf("%#lx, %lu", + tcp->u_arg[1], tcp->u_arg[2]); + return 0; + } + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +int +sys_writev(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + unsigned long total_size = dump_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %lu", total_size); + } + return 0; +} +#endif + +/* The SH4 ABI does allow long longs in odd-numbered registers, but + does not allow them to be split between registers and memory - and + there are only four argument registers for normal functions. As a + result pread takes an extra padding argument before the offset. This + was changed late in the 2.4 series (around 2.4.20). */ +#if defined(SH) +#define PREAD_OFFSET_ARG 4 +#else +#define PREAD_OFFSET_ARG 3 +#endif + +int +sys_pread(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_rval); + tprintf(", %lu, ", tcp->u_arg[2]); + printllval(tcp, "%llu", PREAD_OFFSET_ARG); + } + return 0; +} + +int +sys_pwrite(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + dump_bytes(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, ", tcp->u_arg[2]); + printllval(tcp, "%llu", PREAD_OFFSET_ARG); + } + return 0; +} + +#if HAVE_SYS_UIO_H +int +sys_preadv(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) { + tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); + return 0; + } + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + tprintf(", %lu, ", tcp->u_arg[2]); + printllval(tcp, "%llu", PREAD_OFFSET_ARG); + } + return 0; +} + +int +sys_pwritev(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + unsigned long total_size = dump_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + tprintf(", %lu, ", tcp->u_arg[2]); + printllval(tcp, "%llu", PREAD_OFFSET_ARG); + tprintf(", %lu", total_size); + } + return 0; +} +#endif /* HAVE_SYS_UIO_H */ + +static void +print_off_t(struct tcb *tcp, long addr) +{ + unsigned long offset; + + if (!addr) { + tprints("NULL"); + return; + } + +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize == 4) { + uint32_t off; + + if (umove(tcp, addr, &off) < 0) + tprintf("%#lx", addr); + else + tprintf("[%u]", off); + } else +#endif + if (umove(tcp, addr, &offset) < 0) + tprintf("%#lx", addr); + else + tprintf("[%lu]", offset); +} + +int +sys_sendfile(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printfd(tcp, tcp->u_arg[1]); + tprints(", "); + print_off_t(tcp, tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} + +void +print_loff_t(struct tcb *tcp, long addr) +{ + loff_t offset; + + if (!addr) + tprints("NULL"); + else if (umove(tcp, addr, &offset) < 0) + tprintf("%#lx", addr); + else + tprintf("[%llu]", (unsigned long long int) offset); +} + +int +sys_sendfile64(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printfd(tcp, tcp->u_arg[1]); + tprints(", "); + print_loff_t(tcp, tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} + +static const struct xlat splice_flags[] = { +#ifdef SPLICE_F_MOVE + { SPLICE_F_MOVE, "SPLICE_F_MOVE" }, +#endif +#ifdef SPLICE_F_NONBLOCK + { SPLICE_F_NONBLOCK, "SPLICE_F_NONBLOCK" }, +#endif +#ifdef SPLICE_F_MORE + { SPLICE_F_MORE, "SPLICE_F_MORE" }, +#endif +#ifdef SPLICE_F_GIFT + { SPLICE_F_GIFT, "SPLICE_F_GIFT" }, +#endif + { 0, NULL }, +}; + +int +sys_tee(struct tcb *tcp) +{ + if (entering(tcp)) { + /* int fd_in */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* int fd_out */ + printfd(tcp, tcp->u_arg[1]); + tprints(", "); + /* size_t len */ + tprintf("%lu, ", tcp->u_arg[2]); + /* unsigned int flags */ + printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???"); + } + return 0; +} + +int +sys_splice(struct tcb *tcp) +{ + if (entering(tcp)) { + /* int fd_in */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* loff_t *off_in */ + print_loff_t(tcp, tcp->u_arg[1]); + tprints(", "); + /* int fd_out */ + printfd(tcp, tcp->u_arg[2]); + tprints(", "); + /* loff_t *off_out */ + print_loff_t(tcp, tcp->u_arg[3]); + tprints(", "); + /* size_t len */ + tprintf("%lu, ", tcp->u_arg[4]); + /* unsigned int flags */ + printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???"); + } + return 0; +} + +int +sys_vmsplice(struct tcb *tcp) +{ + if (entering(tcp)) { + /* int fd */ + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + /* const struct iovec *iov, unsigned long nr_segs */ + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + tprintf(", %lu, ", tcp->u_arg[2]); + /* unsigned int flags */ + printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???"); + } + return 0; +} + +int +sys_ioctl(struct tcb *tcp) +{ + const struct_ioctlent *iop; + + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + iop = ioctl_lookup(tcp->u_arg[1]); + if (iop) { + tprints(iop->symbol); + while ((iop = ioctl_next_match(iop))) + tprintf(" or %s", iop->symbol); + } else + tprintf("%#lx", tcp->u_arg[1]); + ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]); + } + else { + int ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]); + if (!ret) + tprintf(", %#lx", tcp->u_arg[2]); + else + return ret - 1; + } + return 0; +} diff --git a/alice-strace/ioctl.c b/alice-strace/ioctl.c new file mode 100644 index 0000000..2280439 --- /dev/null +++ b/alice-strace/ioctl.c @@ -0,0 +1,150 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-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. + */ + +#include "defs.h" +#include + +static int +compare(const void *a, const void *b) +{ + unsigned long code1 = (long) a; + unsigned long code2 = ((struct_ioctlent *) b)->code; + return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0; +} + +const struct_ioctlent * +ioctl_lookup(long code) +{ + struct_ioctlent *iop; + + code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT); + iop = bsearch((void*)code, ioctlent, + nioctlents, sizeof(ioctlent[0]), compare); + while (iop > ioctlent) { + iop--; + if (iop->code != code) { + iop++; + break; + } + } + return iop; +} + +const struct_ioctlent * +ioctl_next_match(const struct_ioctlent *iop) +{ + long code; + + code = iop->code; + iop++; + if (iop < ioctlent + nioctlents && iop->code == code) + return iop; + return NULL; +} + +int +ioctl_decode(struct tcb *tcp, long code, long arg) +{ + switch ((code >> 8) & 0xff) { +#if defined(ALPHA) || defined(POWERPC) + case 'f': case 't': case 'T': +#else /* !ALPHA */ + case 0x54: +#endif /* !ALPHA */ + return term_ioctl(tcp, code, arg); + case 0x89: + return sock_ioctl(tcp, code, arg); + case 'p': + return rtc_ioctl(tcp, code, arg); + case 0x03: + case 0x12: + return block_ioctl(tcp, code, arg); + case 0x22: + return scsi_ioctl(tcp, code, arg); + case 'L': + return loop_ioctl(tcp, code, arg); + case 'M': + return mtd_ioctl(tcp, code, arg); + case 'o': + case 'O': + return ubi_ioctl(tcp, code, arg); + default: + break; + } + return 0; +} + +/* + * Registry of ioctl characters, culled from + * @(#)ioccom.h 1.7 89/06/16 SMI; from UCB ioctl.h 7.1 6/4/86 + * + * char file where defined notes + * ---- ------------------ ----- + * F sun/fbio.h + * G sun/gpio.h + * H vaxif/if_hy.h + * M sundev/mcpcmd.h *overlap* + * M sys/modem.h *overlap* + * S sys/stropts.h + * T sys/termio.h -no overlap- + * T sys/termios.h -no overlap- + * V sundev/mdreg.h + * a vaxuba/adreg.h + * d sun/dkio.h -no overlap with sys/des.h- + * d sys/des.h (possible overlap) + * d vax/dkio.h (possible overlap) + * d vaxuba/rxreg.h (possible overlap) + * f sys/filio.h + * g sunwindow/win_ioctl.h -no overlap- + * g sunwindowdev/winioctl.c !no manifest constant! -no overlap- + * h sundev/hrc_common.h + * i sys/sockio.h *overlap* + * i vaxuba/ikreg.h *overlap* + * k sundev/kbio.h + * m sundev/msio.h (possible overlap) + * m sundev/msreg.h (possible overlap) + * m sys/mtio.h (possible overlap) + * n sun/ndio.h + * p net/nit_buf.h (possible overlap) + * p net/nit_if.h (possible overlap) + * p net/nit_pf.h (possible overlap) + * p sundev/fpareg.h (possible overlap) + * p sys/sockio.h (possible overlap) + * p vaxuba/psreg.h (possible overlap) + * q sun/sqz.h + * r sys/sockio.h + * s sys/sockio.h + * t sys/ttold.h (possible overlap) + * t sys/ttycom.h (possible overlap) + * v sundev/vuid_event.h *overlap* + * v sys/vcmd.h *overlap* + * + * End of Registry + */ diff --git a/alice-strace/ioctlsort.c b/alice-strace/ioctlsort.c new file mode 100644 index 0000000..0e6608e --- /dev/null +++ b/alice-strace/ioctlsort.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993, 1994, 1995 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 +#ifdef STDC_HEADERS +# include +#endif + +struct ioctlent { + const char *doth; + const char *symbol; + unsigned long code; +}; + +#include "ioctlent.raw" + +int nioctlents = sizeof ioctlent / sizeof ioctlent[0]; + +int +compare(const void *a, const void *b) +{ + unsigned long code1 = ((struct ioctlent *) a)->code; + unsigned long code2 = ((struct ioctlent *) b)->code; + return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0; +} + +int +main(int argc, const char *argv[]) +{ + int i; + + qsort(ioctlent, nioctlents, sizeof ioctlent[0], compare); + for (i = 0; i < nioctlents; i++) { + printf("{\"%s\", \"%s\", %#lx},\n", + ioctlent[i].doth, ioctlent[i].symbol, ioctlent[i].code); + } + return 0; +} diff --git a/alice-strace/ipc.c b/alice-strace/ipc.c new file mode 100644 index 0000000..0b91a52 --- /dev/null +++ b/alice-strace/ipc.c @@ -0,0 +1,534 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * 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" +#ifdef HAVE_MQUEUE_H +# include +#endif +#include +#include +#include +#include +#include + +#ifndef MSG_STAT +#define MSG_STAT 11 +#endif +#ifndef MSG_INFO +#define MSG_INFO 12 +#endif +#ifndef SHM_STAT +#define SHM_STAT 13 +#endif +#ifndef SHM_INFO +#define SHM_INFO 14 +#endif +#ifndef SEM_STAT +#define SEM_STAT 18 +#endif +#ifndef SEM_INFO +#define SEM_INFO 19 +#endif + +#if !defined IPC_64 +# define IPC_64 0x100 +#endif + +extern void printsigevent(struct tcb *tcp, long arg); + +static const struct xlat msgctl_flags[] = { + { IPC_RMID, "IPC_RMID" }, + { IPC_SET, "IPC_SET" }, + { IPC_STAT, "IPC_STAT" }, + { IPC_INFO, "IPC_INFO" }, + { MSG_STAT, "MSG_STAT" }, + { MSG_INFO, "MSG_INFO" }, + { 0, NULL }, +}; + +static const struct xlat semctl_flags[] = { + { IPC_RMID, "IPC_RMID" }, + { IPC_SET, "IPC_SET" }, + { IPC_STAT, "IPC_STAT" }, + { IPC_INFO, "IPC_INFO" }, + { SEM_STAT, "SEM_STAT" }, + { SEM_INFO, "SEM_INFO" }, + { GETPID, "GETPID" }, + { GETVAL, "GETVAL" }, + { GETALL, "GETALL" }, + { GETNCNT, "GETNCNT" }, + { GETZCNT, "GETZCNT" }, + { SETVAL, "SETVAL" }, + { SETALL, "SETALL" }, + { 0, NULL }, +}; + +static const struct xlat shmctl_flags[] = { + { IPC_RMID, "IPC_RMID" }, + { IPC_SET, "IPC_SET" }, + { IPC_STAT, "IPC_STAT" }, + { IPC_INFO, "IPC_INFO" }, + { SHM_STAT, "SHM_STAT" }, + { SHM_INFO, "SHM_INFO" }, +#ifdef SHM_LOCK + { SHM_LOCK, "SHM_LOCK" }, +#endif +#ifdef SHM_UNLOCK + { SHM_UNLOCK, "SHM_UNLOCK" }, +#endif + { 0, NULL }, +}; + +static const struct xlat resource_flags[] = { + { IPC_CREAT, "IPC_CREAT" }, + { IPC_EXCL, "IPC_EXCL" }, + { IPC_NOWAIT, "IPC_NOWAIT" }, + { 0, NULL }, +}; + +static const struct xlat shm_resource_flags[] = { + { IPC_CREAT, "IPC_CREAT" }, + { IPC_EXCL, "IPC_EXCL" }, +#ifdef SHM_HUGETLB + { SHM_HUGETLB, "SHM_HUGETLB" }, +#endif + { 0, NULL }, +}; + +static const struct xlat shm_flags[] = { + { SHM_REMAP, "SHM_REMAP" }, + { SHM_RDONLY, "SHM_RDONLY" }, + { SHM_RND, "SHM_RND" }, + { 0, NULL }, +}; + +static const struct xlat msg_flags[] = { + { MSG_NOERROR, "MSG_NOERROR" }, + { MSG_EXCEPT, "MSG_EXCEPT" }, + { IPC_NOWAIT, "IPC_NOWAIT" }, + { 0, NULL }, +}; + +static const struct xlat semop_flags[] = { + { SEM_UNDO, "SEM_UNDO" }, + { IPC_NOWAIT, "IPC_NOWAIT" }, + { 0, NULL }, +}; + +int sys_msgget(struct tcb *tcp) +{ + if (entering(tcp)) { + if (tcp->u_arg[0]) + tprintf("%#lx, ", tcp->u_arg[0]); + else + tprints("IPC_PRIVATE, "); + if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0) + tprints("|"); + tprintf("%#lo", tcp->u_arg[1] & 0777); + } + return 0; +} + +#ifdef IPC_64 +# define PRINTCTL(flagset, arg, dflt) \ + if ((arg) & IPC_64) tprints("IPC_64|"); \ + printxval((flagset), (arg) &~ IPC_64, dflt) +#else +# define PRINTCTL printxval +#endif + +static int +indirect_ipccall(struct tcb *tcp) +{ +#ifdef X86_64 + return current_personality == 1; +#endif +#if defined IA64 + return tcp->scno < 1024; /* ia32 emulation syscalls are low */ +#endif +#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__) || defined(AARCH64) + return 0; +#endif + return 1; +} + +int sys_msgctl(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + PRINTCTL(msgctl_flags, tcp->u_arg[1], "MSG_???"); + tprintf(", %#lx", tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2]); + } + return 0; +} + +static void +tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count, + unsigned long flags) +{ + long mtype; + + if (umove(tcp, addr, &mtype) < 0) { + tprintf("%#lx", addr); + } else { + tprintf("{%lu, ", mtype); + printstr(tcp, addr + sizeof(mtype), count); + tprints("}"); + } + tprintf(", %lu, ", count); + printflags(msg_flags, flags, "MSG_???"); +} + +int sys_msgsnd(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%d, ", (int) tcp->u_arg[0]); + if (indirect_ipccall(tcp)) { + tprint_msgsnd(tcp, tcp->u_arg[3], tcp->u_arg[1], + tcp->u_arg[2]); + } else { + tprint_msgsnd(tcp, tcp->u_arg[1], tcp->u_arg[2], + tcp->u_arg[3]); + } + } + return 0; +} + +static void +tprint_msgrcv(struct tcb *tcp, long addr, unsigned long count, long msgtyp) +{ + long mtype; + + if (syserror(tcp) || umove(tcp, addr, &mtype) < 0) { + tprintf("%#lx", addr); + } else { + tprintf("{%lu, ", mtype); + printstr(tcp, addr + sizeof(mtype), count); + tprints("}"); + } + tprintf(", %lu, %ld, ", count, msgtyp); +} + +int sys_msgrcv(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%d, ", (int) tcp->u_arg[0]); + } else { + if (indirect_ipccall(tcp)) { + struct ipc_wrapper { + struct msgbuf *msgp; + long msgtyp; + } tmp; + + if (umove(tcp, tcp->u_arg[3], &tmp) < 0) { + tprintf("%#lx, %lu, ", + tcp->u_arg[3], tcp->u_arg[1]); + } else { + tprint_msgrcv(tcp, (long) tmp.msgp, + tcp->u_arg[1], tmp.msgtyp); + } + printflags(msg_flags, tcp->u_arg[2], "MSG_???"); + } else { + tprint_msgrcv(tcp, tcp->u_arg[1], + tcp->u_arg[2], tcp->u_arg[3]); + printflags(msg_flags, tcp->u_arg[4], "MSG_???"); + } + } + return 0; +} + +static void +tprint_sembuf(struct tcb *tcp, long addr, unsigned long count) +{ + unsigned long i, max_count; + + if (abbrev(tcp)) + max_count = (max_strlen < count) ? max_strlen : count; + else + max_count = count; + + if (!max_count) { + tprintf("%#lx, %lu", addr, count); + return; + } + + for (i = 0; i < max_count; ++i) { + struct sembuf sb; + if (i) + tprints(", "); + if (umove(tcp, addr + i * sizeof(struct sembuf), &sb) < 0) { + if (i) { + tprints("{???}"); + break; + } else { + tprintf("%#lx, %lu", addr, count); + return; + } + } else { + if (!i) + tprints("{"); + tprintf("{%u, %d, ", sb.sem_num, sb.sem_op); + printflags(semop_flags, sb.sem_flg, "SEM_???"); + tprints("}"); + } + } + + if (i < max_count || max_count < count) + tprints(", ..."); + + tprintf("}, %lu", count); +} + +int sys_semop(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + if (indirect_ipccall(tcp)) { + tprint_sembuf(tcp, tcp->u_arg[3], tcp->u_arg[1]); + } else { + tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]); + } + } + return 0; +} + +int sys_semtimedop(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + if (indirect_ipccall(tcp)) { + tprint_sembuf(tcp, tcp->u_arg[3], tcp->u_arg[1]); + tprints(", "); +#if defined(S390) || defined(S390X) + printtv(tcp, tcp->u_arg[2]); +#else + printtv(tcp, tcp->u_arg[4]); +#endif + } else { + tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprints(", "); + printtv(tcp, tcp->u_arg[3]); + } + } + return 0; +} + +int sys_semget(struct tcb *tcp) +{ + if (entering(tcp)) { + if (tcp->u_arg[0]) + tprintf("%#lx", tcp->u_arg[0]); + else + tprints("IPC_PRIVATE"); + tprintf(", %lu, ", tcp->u_arg[1]); + if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0) + tprints("|"); + tprintf("%#lo", tcp->u_arg[2] & 0777); + } + return 0; +} + +int sys_semctl(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + PRINTCTL(semctl_flags, tcp->u_arg[2], "SEM_???"); + tprintf(", %#lx", tcp->u_arg[3]); + } + return 0; +} + +int sys_shmget(struct tcb *tcp) +{ + if (entering(tcp)) { + if (tcp->u_arg[0]) + tprintf("%#lx", tcp->u_arg[0]); + else + tprints("IPC_PRIVATE"); + tprintf(", %lu, ", tcp->u_arg[1]); + if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0) + tprints("|"); + tprintf("%#lo", tcp->u_arg[2] & 0777); + } + return 0; +} + +int sys_shmctl(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???"); + if (indirect_ipccall(tcp)) { + tprintf(", %#lx", tcp->u_arg[3]); + } else { + tprintf(", %#lx", tcp->u_arg[2]); + } + } + return 0; +} + +int sys_shmat(struct tcb *tcp) +{ + if (exiting(tcp)) { + tprintf("%lu", tcp->u_arg[0]); + if (indirect_ipccall(tcp)) { + tprintf(", %#lx, ", tcp->u_arg[3]); + printflags(shm_flags, tcp->u_arg[1], "SHM_???"); + } else { + tprintf(", %#lx, ", tcp->u_arg[1]); + printflags(shm_flags, tcp->u_arg[2], "SHM_???"); + } + if (syserror(tcp)) + return 0; + if (indirect_ipccall(tcp)) { + unsigned long raddr; + if (umove(tcp, tcp->u_arg[2], &raddr) < 0) + return RVAL_NONE; + tcp->u_rval = raddr; + } + return RVAL_HEX; + } + return 0; +} + +int sys_shmdt(struct tcb *tcp) +{ + if (entering(tcp)) { + if (indirect_ipccall(tcp)) { + tprintf("%#lx", tcp->u_arg[3]); + } else { + tprintf("%#lx", tcp->u_arg[0]); + } + } + return 0; +} + +int +sys_mq_open(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + /* flags */ + tprint_open_modes(tcp->u_arg[1]); + if (tcp->u_arg[1] & O_CREAT) { +# ifndef HAVE_MQUEUE_H + tprintf(", %lx", tcp->u_arg[2]); +# else + struct mq_attr attr; + /* mode */ + tprintf(", %#lo, ", tcp->u_arg[2]); + if (umove(tcp, tcp->u_arg[3], &attr) < 0) + tprints("{???}"); + else + tprintf("{mq_maxmsg=%ld, mq_msgsize=%ld}", + (long) attr.mq_maxmsg, + (long) attr.mq_msgsize); +# endif + } + } + return 0; +} + +int +sys_mq_timedsend(struct tcb *tcp) +{ + if (entering(tcp)) { + 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]); + printtv(tcp, tcp->u_arg[4]); + } + return 0; +} + +int +sys_mq_timedreceive(struct tcb *tcp) +{ + 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]); + printtv(tcp, tcp->u_arg[4]); + } + return 0; +} + +int +sys_mq_notify(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printsigevent(tcp, tcp->u_arg[1]); + } + return 0; +} + +static void +printmqattr(struct tcb *tcp, long addr) +{ + if (addr == 0) + tprints("NULL"); + else { +# ifndef HAVE_MQUEUE_H + tprintf("%#lx", addr); +# else + struct mq_attr attr; + if (umove(tcp, addr, &attr) < 0) { + tprints("{...}"); + 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); +# endif + } +} + +int +sys_mq_getsetattr(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printmqattr(tcp, tcp->u_arg[1]); + tprints(", "); + } else + printmqattr(tcp, tcp->u_arg[2]); + return 0; +} + +int +sys_ipc(struct tcb *tcp) +{ + return printargs(tcp); +} diff --git a/alice-strace/linux/aarch64/errnoent1.h b/alice-strace/linux/aarch64/errnoent1.h new file mode 100644 index 0000000..e1cbe33 --- /dev/null +++ b/alice-strace/linux/aarch64/errnoent1.h @@ -0,0 +1,2 @@ +/* Native AArch64 */ +#include "../errnoent.h" diff --git a/alice-strace/linux/aarch64/ioctlent.h.in b/alice-strace/linux/aarch64/ioctlent.h.in new file mode 100644 index 0000000..83e6eb2 --- /dev/null +++ b/alice-strace/linux/aarch64/ioctlent.h.in @@ -0,0 +1 @@ +#include "../arm/ioctlent.h.in" diff --git a/alice-strace/linux/aarch64/ioctlent1.h b/alice-strace/linux/aarch64/ioctlent1.h new file mode 100644 index 0000000..72eeaf1 --- /dev/null +++ b/alice-strace/linux/aarch64/ioctlent1.h @@ -0,0 +1 @@ +#include "ioctlent.h" diff --git a/alice-strace/linux/aarch64/signalent1.h b/alice-strace/linux/aarch64/signalent1.h new file mode 100644 index 0000000..d31e6a4 --- /dev/null +++ b/alice-strace/linux/aarch64/signalent1.h @@ -0,0 +1 @@ +#include "../signalent.h" diff --git a/alice-strace/linux/aarch64/syscallent.h b/alice-strace/linux/aarch64/syscallent.h new file mode 100644 index 0000000..1b892be --- /dev/null +++ b/alice-strace/linux/aarch64/syscallent.h @@ -0,0 +1 @@ +#include "../arm/syscallent.h" diff --git a/alice-strace/linux/aarch64/syscallent1.h b/alice-strace/linux/aarch64/syscallent1.h new file mode 100644 index 0000000..e772a5e --- /dev/null +++ b/alice-strace/linux/aarch64/syscallent1.h @@ -0,0 +1,330 @@ + { 2, 0, sys_io_setup, "io_setup" }, /* 0 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 2 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 8 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 11 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 14 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 17 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */ + { 1, TD, sys_dup, "dup" }, /* 23 */ + { 3, TD, sys_dup3, "dup3" }, /* 24 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 25 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 29 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */ + { 2, TD, sys_flock, "flock" }, /* 32 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */ + { 2, TF, sys_umount2, "umount2" }, /* 39 */ + { 5, TF, sys_mount, "mount" }, /* 40 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */ + { 2, TF, sys_statfs, "statfs64" }, /* 43 */ + { 2, TD, sys_fstatfs, "fstatfs64" }, /* 44 */ + { 2, TF, sys_truncate, "truncate64" }, /* 45 */ + { 2, TD, sys_ftruncate, "ftruncate64" }, /* 46 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 47 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */ + { 1, TF, sys_chdir, "chdir" }, /* 49 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 50 */ + { 1, TF, sys_chroot, "chroot" }, /* 51 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */ + { 3, TD, sys_fchown, "fchown" }, /* 55 */ + { 4, TD|TF, sys_openat, "openat" }, /* 56 */ + { 1, TD, sys_close, "close" }, /* 57 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 58 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 59 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 60 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 61 */ + { 3, TD, sys_lseek, "lseek" }, /* 62 */ + { 3, TD, sys_read, "read" }, /* 63 */ + { 3, TD, sys_write, "write" }, /* 64 */ + { 3, TD, sys_readv, "readv" }, /* 65 */ + { 3, TD, sys_writev, "writev" }, /* 66 */ + { 4, TD, sys_pread, "pread64" }, /* 67 */ + { 4, TD, sys_pwrite, "pwrite64" }, /* 68 */ + { 4, TD, sys_preadv, "preadv" }, /* 69 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 70 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 72 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 73 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */ + { 6, TD, sys_splice, "splice" }, /* 76 */ + { 4, TD, sys_tee, "tee" }, /* 77 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 79 */ + { 2, TD, sys_fstat, "fstat" }, /* 80 */ + { 0, 0, sys_sync, "sync" }, /* 81 */ + { 1, TD, sys_fsync, "fsync" }, /* 82 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */ + { 1, TF, sys_acct, "acct" }, /* 89 */ + { 2, 0, sys_capget, "capget" }, /* 90 */ + { 2, 0, sys_capset, "capset" }, /* 91 */ + { 1, 0, sys_personality, "personality" }, /* 92 */ + { 1, TP, sys_exit, "exit" }, /* 93 */ + { 1, TP, sys_exit, "exit_group" }, /* 94 */ + { 5, TP, sys_waitid, "waitid" }, /* 95 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */ + { 1, TP, sys_unshare, "unshare" }, /* 97 */ + { 6, 0, sys_futex, "futex" }, /* 98 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 102 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 103 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */ + { 3, 0, sys_init_module, "init_module" }, /* 105 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 106 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 107 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */ + { 3, 0, sys_syslog, "syslog" }, /* 116 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 117 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */ + { 2, TS, sys_kill, "kill" }, /* 129 */ + { 2, TS, sys_kill, "tkill" }, /* 130 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 131 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 140 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 141 */ + { 4, 0, sys_reboot, "reboot" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 1, 0, sys_setgid, "setgid" }, /* 144 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 145 */ + { 1, 0, sys_setuid, "setuid" }, /* 146 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 147 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 148 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 149 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 150 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */ + { 1, 0, sys_times, "times" }, /* 153 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 154 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 155 */ + { 1, 0, sys_getsid, "getsid" }, /* 156 */ + { 0, 0, sys_setsid, "setsid" }, /* 157 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 158 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 159 */ + { 1, 0, sys_uname, "uname" }, /* 160 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 161 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 165 */ + { 1, 0, sys_umask, "umask" }, /* 166 */ + { 5, 0, sys_prctl, "prctl" }, /* 167 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 168 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */ + { 0, 0, sys_getpid, "getpid" }, /* 172 */ + { 0, 0, sys_getppid, "getppid" }, /* 173 */ + { 0, NF, sys_getuid, "getuid" }, /* 174 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 175 */ + { 0, NF, sys_getgid, "getgid" }, /* 176 */ + { 0, NF, sys_getegid, "getegid" }, /* 177 */ + { 0, 0, sys_gettid, "gettid" }, /* 178 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 180 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */ + { 4, TI, sys_msgget, "msgget" }, /* 186 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 187 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */ + { 4, TI, sys_semget, "semget" }, /* 190 */ + { 4, TI, sys_semctl, "semctl" }, /* 191 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */ + { 4, TI, sys_semop, "semop" }, /* 193 */ + { 4, TI, sys_shmget, "shmget" }, /* 194 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 4, TI, sys_shmat, "shmat" }, /* 196 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 197 */ + { 3, TN, sys_socket, "socket" }, /* 198 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 199 */ + { 3, TN, sys_bind, "bind" }, /* 200 */ + { 2, TN, sys_listen, "listen" }, /* 201 */ + { 3, TN, sys_accept, "accept" }, /* 202 */ + { 3, TN, sys_connect, "connect" }, /* 203 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 204 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 205 */ + { 6, TN, sys_sendto, "sendto" }, /* 206 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 210 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */ + { 3, TD, sys_readahead, "readahead" }, /* 213 */ + { 1, TM, sys_brk, "brk" }, /* 214 */ + { 2, TM, sys_munmap, "munmap" }, /* 215 */ + { 5, TM, sys_mremap, "mremap" }, /* 216 */ + { 5, 0, sys_add_key, "add_key" }, /* 217 */ + { 4, 0, sys_request_key, "request_key" }, /* 218 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 219 */ + { 5, TP, sys_clone, "clone" }, /* 220 */ + { 3, TF|TP, sys_execve, "execve" }, /* 221 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */ + { 2, TF, sys_swapon, "swapon" }, /* 224 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ + { 3, TM, sys_msync, "msync" }, /* 227 */ + { 3, TM, sys_msync, "msync" }, /* 228 */ + { 2, TM, sys_munlock, "munlock" }, /* 229 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 230 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 231 */ + { 3, TM, sys_mincore, "mincore" }, /* 232 */ + { 3, TM, sys_madvise, "madvise" }, /* 233 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */ + { 6, TM, sys_mbind, "mbind" }, /* 235 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 239 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */ + { 4, TN, sys_accept4, "accept4" }, /* 242 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */ + + /* Arch-specific block, not used on AArch64 */ + [244 ... 259] = { }, + + { 4, TP, sys_wait4, "wait4" }, /* 260 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 267 */ + { 2, TD, sys_setns, "setns" }, /* 268 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */ + + /* Blank down to 1023 */ + [272 ... 1023] = { }, + + /* Quote from asm-generic/unistd.h: + * + * All syscalls below here should go away really, + * these are provided for both review and as a porting + * help for the C library version. + * + * Last chance: are any of these important enough to + * enable by default? + */ + + { 3, TD|TF, sys_open, "open" }, /* 1024 */ + { 2, TF, sys_link, "link" }, /* 1025 */ + { 1, TF, sys_unlink, "unlink" }, /* 1026 */ + { 3, TF, sys_mknod, "mknod" }, /* 1027 */ + { 2, TF, sys_chmod, "chmod" }, /* 1028 */ + { 3, TF, sys_chown, "chown" }, /* 1029 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 1030 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 1031 */ + { 3, TF, sys_chown, "lchown" }, /* 1032 */ + { 2, TF, sys_access, "access" }, /* 1033 */ + { 2, TF, sys_rename, "rename" }, /* 1034 */ + { 3, TF, sys_readlink, "readlink" }, /* 1035 */ + { 2, TF, sys_symlink, "symlink" }, /* 1036 */ + { 2, TF, sys_utimes, "utimes" }, /* 1037 */ + { 2, TF, sys_stat, "stat" }, /* 1038 */ + { 2, TF, sys_lstat, "lstat" }, /* 1039 */ + { 1, TD, sys_pipe, "pipe" }, /* 1040 */ + { 2, TD, sys_dup2, "dup2" }, /* 1041 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 1042 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 1043 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 1044 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1045 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 1046 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 1047 */ + { 2, TF, sys_truncate, "truncate" }, /* 1048 */ + { 2, TF, sys_stat, "stat" }, /* 1049 */ + { 2, TF, sys_lstat, "lstat" }, /* 1050 */ + { 2, TD, sys_fstat, "fstat" }, /* 1051 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 1052 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 1053 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1054 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 1055 */ + { 2, TF, sys_statfs, "statfs" }, /* 1056 */ + { 3, TD, sys_lseek, "lseek" }, /* 1057 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 1058 */ + { 1, 0, sys_alarm, "alarm" }, /* 1059 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 1060 */ + { 0, TS, sys_pause, "pause" }, /* 1061 */ + { 1, 0, sys_time, "time" }, /* 1062 */ + { 2, TF, sys_utime, "utime" }, /* 1063 */ + { 2, TD|TF, sys_creat, "creat" }, /* 1064 */ + { 3, TD, sys_getdents, "getdents" }, /* 1065 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1066 */ + { 5, TD, sys_select, "select" }, /* 1067 */ + { 3, TD, sys_poll, "poll" }, /* 1068 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1069 */ + { 2, 0, sys_ustat, "ustat" }, /* 1070 */ + { 0, TP, sys_vfork, "vfork" }, /* 1071 */ + { 4, TP, sys_wait4, "wait4" }, /* 1072 */ + { 6, TN, sys_recv, "recv" }, /* 1073 */ + { 4, TN, sys_send, "send" }, /* 1074 */ + { 2, 0, sys_bdflush, "bdflush" }, /* 1075 */ + { 2, TF, sys_umount, "umount" }, /* 1076 */ + { 1, TF, sys_uselib, "uselib" }, /* 1077 */ + { 1, 0, sys_sysctl, "sysctl" }, /* 1078 */ + { 0, TP, sys_fork, "fork" }, /* 1079 */ diff --git a/alice-strace/linux/alpha/errnoent.h b/alice-strace/linux/alpha/errnoent.h new file mode 100644 index 0000000..4ffaff9 --- /dev/null +++ b/alice-strace/linux/alpha/errnoent.h @@ -0,0 +1,516 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EDEADLK", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "EAGAIN", /* 35 */ + "EINPROGRESS", /* 36 */ + "EALREADY", /* 37 */ + "ENOTSOCK", /* 38 */ + "EDESTADDRREQ", /* 39 */ + "EMSGSIZE", /* 40 */ + "EPROTOTYPE", /* 41 */ + "ENOPROTOOPT", /* 42 */ + "EPROTONOSUPPORT", /* 43 */ + "ESOCKTNOSUPPORT", /* 44 */ + "EOPNOTSUPP", /* 45 */ + "EPFNOSUPPORT", /* 46 */ + "EAFNOSUPPORT", /* 47 */ + "EADDRINUSE", /* 48 */ + "EADDRNOTAVAIL", /* 49 */ + "ENETDOWN", /* 50 */ + "ENETUNREACH", /* 51 */ + "ENETRESET", /* 52 */ + "ECONNABORTED", /* 53 */ + "ECONNRESET", /* 54 */ + "ENOBUFS", /* 55 */ + "EISCONN", /* 56 */ + "ENOTCONN", /* 57 */ + "ESHUTDOWN", /* 58 */ + "ETOOMANYREFS", /* 59 */ + "ETIMEDOUT", /* 60 */ + "ECONNREFUSED", /* 61 */ + "ELOOP", /* 62 */ + "ENAMETOOLONG", /* 63 */ + "EHOSTDOWN", /* 64 */ + "EHOSTUNREACH", /* 65 */ + "ENOTEMPTY", /* 66 */ + "ERRNO_67", /* 67 */ + "EUSERS", /* 68 */ + "EDQUOT", /* 69 */ + "ESTALE", /* 70 */ + "EREMOTE", /* 71 */ + "ERRNO_72", /* 72 */ + "ERRNO_73", /* 73 */ + "ERRNO_74", /* 74 */ + "ERRNO_75", /* 75 */ + "ERRNO_76", /* 76 */ + "ENOLCK", /* 77 */ + "ENOSYS", /* 78 */ + "ERRNO_79", /* 79 */ + "ENOMSG", /* 80 */ + "EIDRM", /* 81 */ + "ENOSR", /* 82 */ + "ETIME", /* 83 */ + "EBADMSG", /* 84 */ + "EPROTO", /* 85 */ + "ENODATA", /* 86 */ + "ENOSTR", /* 87 */ + "ECHRNG", /* 88 */ + "EL2NSYNC", /* 89 */ + "EL3HLT", /* 90 */ + "EL3RST", /* 91 */ + "ENOPKG", /* 92 */ + "ELNRNG", /* 93 */ + "EUNATCH", /* 94 */ + "ENOCSI", /* 95 */ + "EL2HLT", /* 96 */ + "EBADE", /* 97 */ + "EBADR", /* 98 */ + "EXFULL", /* 99 */ + "ENOANO", /* 100 */ + "EBADRQC", /* 101 */ + "EBADSLT", /* 102 */ + "EDEADLOCK", /* 103 */ + "EBFONT", /* 104 */ + "ENONET", /* 105 */ + "ENOLINK", /* 106 */ + "EADV", /* 107 */ + "ESRMNT", /* 108 */ + "ECOMM", /* 109 */ + "EMULTIHOP", /* 110 */ + "EDOTDOT", /* 111 */ + "EOVERFLOW", /* 112 */ + "ENOTUNIQ", /* 113 */ + "EBADFD", /* 114 */ + "EREMCHG", /* 115 */ + "EILSEQ", /* 116 */ + "EUCLEAN", /* 117 */ + "ENOTNAM", /* 118 */ + "ENAVAIL", /* 119 */ + "EISNAM", /* 120 */ + "EREMOTEIO", /* 121 */ + "ELIBACC", /* 122 */ + "ELIBBAD", /* 123 */ + "ELIBSCN", /* 124 */ + "ELIBMAX", /* 125 */ + "ELIBEXEC", /* 126 */ + "ERESTART", /* 127 */ + "ESTRPIPE", /* 128 */ + "ERRNO_129", /* 129 */ + "ERRNO_130", /* 130 */ + "ERRNO_131", /* 131 */ + "ERRNO_132", /* 132 */ + "ERRNO_133", /* 133 */ + "ERRNO_134", /* 134 */ + "ERRNO_135", /* 135 */ + "ERRNO_136", /* 136 */ + "ERRNO_137", /* 137 */ + "ERRNO_138", /* 138 */ + "ERRNO_139", /* 139 */ + "ERRNO_140", /* 140 */ + "ERRNO_141", /* 141 */ + "ERRNO_142", /* 142 */ + "ERRNO_143", /* 143 */ + "ERRNO_144", /* 144 */ + "ERRNO_145", /* 145 */ + "ERRNO_146", /* 146 */ + "ERRNO_147", /* 147 */ + "ERRNO_148", /* 148 */ + "ERRNO_149", /* 149 */ + "ERRNO_150", /* 150 */ + "ERRNO_151", /* 151 */ + "ERRNO_152", /* 152 */ + "ERRNO_153", /* 153 */ + "ERRNO_154", /* 154 */ + "ERRNO_155", /* 155 */ + "ERRNO_156", /* 156 */ + "ERRNO_157", /* 157 */ + "ERRNO_158", /* 158 */ + "ERRNO_159", /* 159 */ + "ERRNO_160", /* 160 */ + "ERRNO_161", /* 161 */ + "ERRNO_162", /* 162 */ + "ERRNO_163", /* 163 */ + "ERRNO_164", /* 164 */ + "ERRNO_165", /* 165 */ + "ERRNO_166", /* 166 */ + "ERRNO_167", /* 167 */ + "ERRNO_168", /* 168 */ + "ERRNO_169", /* 169 */ + "ERRNO_170", /* 170 */ + "ERRNO_171", /* 171 */ + "ERRNO_172", /* 172 */ + "ERRNO_173", /* 173 */ + "ERRNO_174", /* 174 */ + "ERRNO_175", /* 175 */ + "ERRNO_176", /* 176 */ + "ERRNO_177", /* 177 */ + "ERRNO_178", /* 178 */ + "ERRNO_179", /* 179 */ + "ERRNO_180", /* 180 */ + "ERRNO_181", /* 181 */ + "ERRNO_182", /* 182 */ + "ERRNO_183", /* 183 */ + "ERRNO_184", /* 184 */ + "ERRNO_185", /* 185 */ + "ERRNO_186", /* 186 */ + "ERRNO_187", /* 187 */ + "ERRNO_188", /* 188 */ + "ERRNO_189", /* 189 */ + "ERRNO_190", /* 190 */ + "ERRNO_191", /* 191 */ + "ERRNO_192", /* 192 */ + "ERRNO_193", /* 193 */ + "ERRNO_194", /* 194 */ + "ERRNO_195", /* 195 */ + "ERRNO_196", /* 196 */ + "ERRNO_197", /* 197 */ + "ERRNO_198", /* 198 */ + "ERRNO_199", /* 199 */ + "ERRNO_200", /* 200 */ + "ERRNO_201", /* 201 */ + "ERRNO_202", /* 202 */ + "ERRNO_203", /* 203 */ + "ERRNO_204", /* 204 */ + "ERRNO_205", /* 205 */ + "ERRNO_206", /* 206 */ + "ERRNO_207", /* 207 */ + "ERRNO_208", /* 208 */ + "ERRNO_209", /* 209 */ + "ERRNO_210", /* 210 */ + "ERRNO_211", /* 211 */ + "ERRNO_212", /* 212 */ + "ERRNO_213", /* 213 */ + "ERRNO_214", /* 214 */ + "ERRNO_215", /* 215 */ + "ERRNO_216", /* 216 */ + "ERRNO_217", /* 217 */ + "ERRNO_218", /* 218 */ + "ERRNO_219", /* 219 */ + "ERRNO_220", /* 220 */ + "ERRNO_221", /* 221 */ + "ERRNO_222", /* 222 */ + "ERRNO_223", /* 223 */ + "ERRNO_224", /* 224 */ + "ERRNO_225", /* 225 */ + "ERRNO_226", /* 226 */ + "ERRNO_227", /* 227 */ + "ERRNO_228", /* 228 */ + "ERRNO_229", /* 229 */ + "ERRNO_230", /* 230 */ + "ERRNO_231", /* 231 */ + "ERRNO_232", /* 232 */ + "ERRNO_233", /* 233 */ + "ERRNO_234", /* 234 */ + "ERRNO_235", /* 235 */ + "ERRNO_236", /* 236 */ + "ERRNO_237", /* 237 */ + "ERRNO_238", /* 238 */ + "ERRNO_239", /* 239 */ + "ERRNO_240", /* 240 */ + "ERRNO_241", /* 241 */ + "ERRNO_242", /* 242 */ + "ERRNO_243", /* 243 */ + "ERRNO_244", /* 244 */ + "ERRNO_245", /* 245 */ + "ERRNO_246", /* 246 */ + "ERRNO_247", /* 247 */ + "ERRNO_248", /* 248 */ + "ERRNO_249", /* 249 */ + "ERRNO_250", /* 250 */ + "ERRNO_251", /* 251 */ + "ERRNO_252", /* 252 */ + "ERRNO_253", /* 253 */ + "ERRNO_254", /* 254 */ + "ERRNO_255", /* 255 */ + "ERRNO_256", /* 256 */ + "ERRNO_257", /* 257 */ + "ERRNO_258", /* 258 */ + "ERRNO_259", /* 259 */ + "ERRNO_260", /* 260 */ + "ERRNO_261", /* 261 */ + "ERRNO_262", /* 262 */ + "ERRNO_263", /* 263 */ + "ERRNO_264", /* 264 */ + "ERRNO_265", /* 265 */ + "ERRNO_266", /* 266 */ + "ERRNO_267", /* 267 */ + "ERRNO_268", /* 268 */ + "ERRNO_269", /* 269 */ + "ERRNO_270", /* 270 */ + "ERRNO_271", /* 271 */ + "ERRNO_272", /* 272 */ + "ERRNO_273", /* 273 */ + "ERRNO_274", /* 274 */ + "ERRNO_275", /* 275 */ + "ERRNO_276", /* 276 */ + "ERRNO_277", /* 277 */ + "ERRNO_278", /* 278 */ + "ERRNO_279", /* 279 */ + "ERRNO_280", /* 280 */ + "ERRNO_281", /* 281 */ + "ERRNO_282", /* 282 */ + "ERRNO_283", /* 283 */ + "ERRNO_284", /* 284 */ + "ERRNO_285", /* 285 */ + "ERRNO_286", /* 286 */ + "ERRNO_287", /* 287 */ + "ERRNO_288", /* 288 */ + "ERRNO_289", /* 289 */ + "ERRNO_290", /* 290 */ + "ERRNO_291", /* 291 */ + "ERRNO_292", /* 292 */ + "ERRNO_293", /* 293 */ + "ERRNO_294", /* 294 */ + "ERRNO_295", /* 295 */ + "ERRNO_296", /* 296 */ + "ERRNO_297", /* 297 */ + "ERRNO_298", /* 298 */ + "ERRNO_299", /* 299 */ + "ERRNO_300", /* 300 */ + "ERRNO_301", /* 301 */ + "ERRNO_302", /* 302 */ + "ERRNO_303", /* 303 */ + "ERRNO_304", /* 304 */ + "ERRNO_305", /* 305 */ + "ERRNO_306", /* 306 */ + "ERRNO_307", /* 307 */ + "ERRNO_308", /* 308 */ + "ERRNO_309", /* 309 */ + "ERRNO_310", /* 310 */ + "ERRNO_311", /* 311 */ + "ERRNO_312", /* 312 */ + "ERRNO_313", /* 313 */ + "ERRNO_314", /* 314 */ + "ERRNO_315", /* 315 */ + "ERRNO_316", /* 316 */ + "ERRNO_317", /* 317 */ + "ERRNO_318", /* 318 */ + "ERRNO_319", /* 319 */ + "ERRNO_320", /* 320 */ + "ERRNO_321", /* 321 */ + "ERRNO_322", /* 322 */ + "ERRNO_323", /* 323 */ + "ERRNO_324", /* 324 */ + "ERRNO_325", /* 325 */ + "ERRNO_326", /* 326 */ + "ERRNO_327", /* 327 */ + "ERRNO_328", /* 328 */ + "ERRNO_329", /* 329 */ + "ERRNO_330", /* 330 */ + "ERRNO_331", /* 331 */ + "ERRNO_332", /* 332 */ + "ERRNO_333", /* 333 */ + "ERRNO_334", /* 334 */ + "ERRNO_335", /* 335 */ + "ERRNO_336", /* 336 */ + "ERRNO_337", /* 337 */ + "ERRNO_338", /* 338 */ + "ERRNO_339", /* 339 */ + "ERRNO_340", /* 340 */ + "ERRNO_341", /* 341 */ + "ERRNO_342", /* 342 */ + "ERRNO_343", /* 343 */ + "ERRNO_344", /* 344 */ + "ERRNO_345", /* 345 */ + "ERRNO_346", /* 346 */ + "ERRNO_347", /* 347 */ + "ERRNO_348", /* 348 */ + "ERRNO_349", /* 349 */ + "ERRNO_350", /* 350 */ + "ERRNO_351", /* 351 */ + "ERRNO_352", /* 352 */ + "ERRNO_353", /* 353 */ + "ERRNO_354", /* 354 */ + "ERRNO_355", /* 355 */ + "ERRNO_356", /* 356 */ + "ERRNO_357", /* 357 */ + "ERRNO_358", /* 358 */ + "ERRNO_359", /* 359 */ + "ERRNO_360", /* 360 */ + "ERRNO_361", /* 361 */ + "ERRNO_362", /* 362 */ + "ERRNO_363", /* 363 */ + "ERRNO_364", /* 364 */ + "ERRNO_365", /* 365 */ + "ERRNO_366", /* 366 */ + "ERRNO_367", /* 367 */ + "ERRNO_368", /* 368 */ + "ERRNO_369", /* 369 */ + "ERRNO_370", /* 370 */ + "ERRNO_371", /* 371 */ + "ERRNO_372", /* 372 */ + "ERRNO_373", /* 373 */ + "ERRNO_374", /* 374 */ + "ERRNO_375", /* 375 */ + "ERRNO_376", /* 376 */ + "ERRNO_377", /* 377 */ + "ERRNO_378", /* 378 */ + "ERRNO_379", /* 379 */ + "ERRNO_380", /* 380 */ + "ERRNO_381", /* 381 */ + "ERRNO_382", /* 382 */ + "ERRNO_383", /* 383 */ + "ERRNO_384", /* 384 */ + "ERRNO_385", /* 385 */ + "ERRNO_386", /* 386 */ + "ERRNO_387", /* 387 */ + "ERRNO_388", /* 388 */ + "ERRNO_389", /* 389 */ + "ERRNO_390", /* 390 */ + "ERRNO_391", /* 391 */ + "ERRNO_392", /* 392 */ + "ERRNO_393", /* 393 */ + "ERRNO_394", /* 394 */ + "ERRNO_395", /* 395 */ + "ERRNO_396", /* 396 */ + "ERRNO_397", /* 397 */ + "ERRNO_398", /* 398 */ + "ERRNO_399", /* 399 */ + "ERRNO_400", /* 400 */ + "ERRNO_401", /* 401 */ + "ERRNO_402", /* 402 */ + "ERRNO_403", /* 403 */ + "ERRNO_404", /* 404 */ + "ERRNO_405", /* 405 */ + "ERRNO_406", /* 406 */ + "ERRNO_407", /* 407 */ + "ERRNO_408", /* 408 */ + "ERRNO_409", /* 409 */ + "ERRNO_410", /* 410 */ + "ERRNO_411", /* 411 */ + "ERRNO_412", /* 412 */ + "ERRNO_413", /* 413 */ + "ERRNO_414", /* 414 */ + "ERRNO_415", /* 415 */ + "ERRNO_416", /* 416 */ + "ERRNO_417", /* 417 */ + "ERRNO_418", /* 418 */ + "ERRNO_419", /* 419 */ + "ERRNO_420", /* 420 */ + "ERRNO_421", /* 421 */ + "ERRNO_422", /* 422 */ + "ERRNO_423", /* 423 */ + "ERRNO_424", /* 424 */ + "ERRNO_425", /* 425 */ + "ERRNO_426", /* 426 */ + "ERRNO_427", /* 427 */ + "ERRNO_428", /* 428 */ + "ERRNO_429", /* 429 */ + "ERRNO_430", /* 430 */ + "ERRNO_431", /* 431 */ + "ERRNO_432", /* 432 */ + "ERRNO_433", /* 433 */ + "ERRNO_434", /* 434 */ + "ERRNO_435", /* 435 */ + "ERRNO_436", /* 436 */ + "ERRNO_437", /* 437 */ + "ERRNO_438", /* 438 */ + "ERRNO_439", /* 439 */ + "ERRNO_440", /* 440 */ + "ERRNO_441", /* 441 */ + "ERRNO_442", /* 442 */ + "ERRNO_443", /* 443 */ + "ERRNO_444", /* 444 */ + "ERRNO_445", /* 445 */ + "ERRNO_446", /* 446 */ + "ERRNO_447", /* 447 */ + "ERRNO_448", /* 448 */ + "ERRNO_449", /* 449 */ + "ERRNO_450", /* 450 */ + "ERRNO_451", /* 451 */ + "ERRNO_452", /* 452 */ + "ERRNO_453", /* 453 */ + "ERRNO_454", /* 454 */ + "ERRNO_455", /* 455 */ + "ERRNO_456", /* 456 */ + "ERRNO_457", /* 457 */ + "ERRNO_458", /* 458 */ + "ERRNO_459", /* 459 */ + "ERRNO_460", /* 460 */ + "ERRNO_461", /* 461 */ + "ERRNO_462", /* 462 */ + "ERRNO_463", /* 463 */ + "ERRNO_464", /* 464 */ + "ERRNO_465", /* 465 */ + "ERRNO_466", /* 466 */ + "ERRNO_467", /* 467 */ + "ERRNO_468", /* 468 */ + "ERRNO_469", /* 469 */ + "ERRNO_470", /* 470 */ + "ERRNO_471", /* 471 */ + "ERRNO_472", /* 472 */ + "ERRNO_473", /* 473 */ + "ERRNO_474", /* 474 */ + "ERRNO_475", /* 475 */ + "ERRNO_476", /* 476 */ + "ERRNO_477", /* 477 */ + "ERRNO_478", /* 478 */ + "ERRNO_479", /* 479 */ + "ERRNO_480", /* 480 */ + "ERRNO_481", /* 481 */ + "ERRNO_482", /* 482 */ + "ERRNO_483", /* 483 */ + "ERRNO_484", /* 484 */ + "ERRNO_485", /* 485 */ + "ERRNO_486", /* 486 */ + "ERRNO_487", /* 487 */ + "ERRNO_488", /* 488 */ + "ERRNO_489", /* 489 */ + "ERRNO_490", /* 490 */ + "ERRNO_491", /* 491 */ + "ERRNO_492", /* 492 */ + "ERRNO_493", /* 493 */ + "ERRNO_494", /* 494 */ + "ERRNO_495", /* 495 */ + "ERRNO_496", /* 496 */ + "ERRNO_497", /* 497 */ + "ERRNO_498", /* 498 */ + "ERRNO_499", /* 499 */ + "ERRNO_500", /* 500 */ + "ERRNO_501", /* 501 */ + "ERRNO_502", /* 502 */ + "ERRNO_503", /* 503 */ + "ERRNO_504", /* 504 */ + "ERRNO_505", /* 505 */ + "ERRNO_506", /* 506 */ + "ERRNO_507", /* 507 */ + "ERRNO_508", /* 508 */ + "ERRNO_509", /* 509 */ + "ERRNO_510", /* 510 */ + "ERRNO_511", /* 511 */ + "ERESTARTSYS", /* 512 */ + "ERESTARTNOINTR", /* 513 */ + "ERESTARTNOHAND", /* 514 */ + "ENOIOCTLCMD", /* 515 */ diff --git a/alice-strace/linux/alpha/ioctlent.h.in b/alice-strace/linux/alpha/ioctlent.h.in new file mode 100644 index 0000000..db7d328 --- /dev/null +++ b/alice-strace/linux/alpha/ioctlent.h.in @@ -0,0 +1,73 @@ + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e}, + {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f}, + {"asm/ioctls.h", "FIOCLEX", 0x6601}, + {"asm/ioctls.h", "FIONCLEX", 0x6602}, + {"asm/sockios.h", "FIOGETOWN", 0x667b}, + {"asm/sockios.h", "FIOSETOWN", 0x667c}, + {"asm/ioctls.h", "FIOASYNC", 0x667d}, + {"asm/ioctls.h", "FIONBIO", 0x667e}, + {"asm/ioctls.h", "FIONREAD", 0x667f}, + {"asm/sockios.h", "SIOCATMARK", 0x7307}, + {"asm/sockios.h", "SIOCSPGRP", 0x7308}, + {"asm/sockios.h", "SIOCGPGRP", 0x7309}, + {"asm/ioctls.h", "TIOCGETP", 0x7408}, + {"asm/ioctls.h", "TIOCSETP", 0x7409}, + {"asm/ioctls.h", "TIOCSETN", 0x740a}, + {"asm/ioctls.h", "TIOCSETC", 0x7411}, + {"asm/ioctls.h", "TIOCGETC", 0x7412}, + {"asm/ioctls.h", "TCGETS", 0x7413}, + {"asm/ioctls.h", "TCSETS", 0x7414}, + {"asm/ioctls.h", "TCSETSW", 0x7415}, + {"asm/ioctls.h", "TCSETSF", 0x7416}, + {"asm/ioctls.h", "TCGETA", 0x7417}, + {"asm/ioctls.h", "TCSETA", 0x7418}, + {"asm/ioctls.h", "TCSETAW", 0x7419}, + {"asm/ioctls.h", "TCSETAF", 0x741c}, + {"asm/ioctls.h", "TCSBRK", 0x741d}, + {"asm/ioctls.h", "TCXONC", 0x741e}, + {"asm/ioctls.h", "TCFLSH", 0x741f}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x7467}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x7468}, + {"asm/ioctls.h", "TIOCSTART", 0x746e}, + {"asm/ioctls.h", "TIOCSTOP", 0x746f}, + {"asm/ioctls.h", "TIOCOUTQ", 0x7473}, + {"asm/ioctls.h", "TIOCGLTC", 0x7474}, + {"asm/ioctls.h", "TIOCSLTC", 0x7475}, + {"asm/ioctls.h", "TIOCSPGRP", 0x7476}, + {"asm/ioctls.h", "TIOCGPGRP", 0x7477}, diff --git a/alice-strace/linux/alpha/signalent.h b/alice-strace/linux/alpha/signalent.h new file mode 100644 index 0000000..2b507e3 --- /dev/null +++ b/alice-strace/linux/alpha/signalent.h @@ -0,0 +1,32 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGURG", /* 16 */ + "SIGSTOP", /* 17 */ + "SIGTSTP", /* 18 */ + "SIGCONT", /* 19 */ + "SIGCHLD", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGIO", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGINFO", /* 29 */ + "SIGUSR1", /* 30 */ + "SIGUSR2", /* 31 */ diff --git a/alice-strace/linux/alpha/syscallent.h b/alice-strace/linux/alpha/syscallent.h new file mode 100644 index 0000000..28e2eeb --- /dev/null +++ b/alice-strace/linux/alpha/syscallent.h @@ -0,0 +1,534 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */ + { 1, TP, sys_exit, "exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 5, 0, printargs, "osf_old_open" }, /* 5, not implemented */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 4, TP, sys_osf_wait4, "osf_wait4" }, /* 7 */ + { 5, 0, printargs, "osf_old_creat" }, /* 8, not implemented */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 5, 0, printargs, "osf_execve" }, /* 11, not implemented */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "chown" }, /* 16 */ + { 1, TM, sys_brk, "brk" }, /* 17 */ + { 5, 0, printargs, "osf_getfsstat" }, /* 18, not implemented */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getxpid" }, /* 20 */ + { 4, 0, printargs, "osf_mount" }, /* 21 */ + { 2, TF, sys_umount2, "umount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getxuid" }, /* 24 */ + { 5, 0, printargs, "exec_with_loader" }, /* 25, not implemented */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 5, 0, printargs, "osf_nrecvmsg" }, /* 27, not implemented */ + { 5, 0, printargs, "osf_nsendmsg" }, /* 28, not implemented */ + { 5, 0, printargs, "osf_nrecvfrom" }, /* 29, not implemented */ + { 5, 0, printargs, "osf_naccept" }, /* 30, not implemented */ + { 5, 0, printargs, "osf_ngetpeername" }, /* 31, not implemented */ + { 5, 0, printargs, "osf_ngetsockname" }, /* 32, not implemented */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 5, 0, printargs, "osf_chflags" }, /* 34, not implemented */ + { 5, 0, printargs, "osf_fchflags" }, /* 35, not implemented */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 5, 0, printargs, "osf_old_stat" }, /* 38, not implemented */ + { 2, 0, sys_setpgid, "setpgid" }, /* 39 */ + { 5, 0, printargs, "osf_old_lstat" }, /* 40, not implemented */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 5, 0, printargs, "osf_set_program_attributes" }, /* 43 */ + { 5, 0, printargs, "osf_profil" }, /* 44, not implemented */ + { 3, TD|TF, sys_open, "open" }, /* 45 */ + { 5, 0, printargs, "osf_old_sigaction" }, /* 46, not implemented */ + { 1, NF, sys_getgid, "getxgid" }, /* 47 */ + { 2, TS, sys_sigprocmask, "osf_sigprocmask" }, /* 48 */ + { 5, 0, printargs, "osf_getlogin" }, /* 49, not implemented */ + { 5, 0, printargs, "osf_setlogin" }, /* 50, not implemented */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 52 */ + { 5, 0, NULL, NULL }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 5, 0, printargs, "osf_reboot" }, /* 55, not implemented */ + { 5, 0, printargs, "osf_revoke" }, /* 56, not implemented */ + { 2, TF, sys_symlink, "symlink" }, /* 57 */ + { 3, TF, sys_readlink, "readlink" }, /* 58 */ + { 3, TF|TP, sys_execve, "execve" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 5, 0, printargs, "osf_old_fstat" }, /* 62, not implemented */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 63 */ + { 0, 0, sys_getpagesize, "getpagesize" }, /* 64 */ + { 5, TM, printargs, "osf_mremap" }, /* 65, not implemented */ + { 0, TP, sys_fork, "vfork" }, /* 66 */ + { 2, TF, sys_stat, "stat" }, /* 67 */ + { 2, TF, sys_lstat, "lstat" }, /* 68 */ + { 5, TM, printargs, "osf_sbrk" }, /* 69, not implemented */ + { 5, 0, printargs, "osf_sstk" }, /* 70, not implemented */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 71 */ + { 5, 0, printargs, "osf_old_vadvise" }, /* 72, not implemented */ + { 2, TM, sys_munmap, "munmap" }, /* 73 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 74 */ + { 3, TM, sys_madvise, "madvise" }, /* 75 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 76 */ + { 5, 0, printargs, "osf_kmodcall" }, /* 77, not implemented */ + { 5, TM, printargs, "osf_mincore" }, /* 78, not implemented */ + { 2, 0, sys_getgroups, "getgroups" }, /* 79 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 80 */ + { 5, 0, printargs, "osf_old_getpgrp" }, /* 81, not implemented */ + { 2, 0, sys_setpgrp, "setpgrp" }, /* 82 */ + { 3, 0, sys_osf_setitimer, "osf_setitimer" }, /* 83 */ + { 5, 0, printargs, "osf_old_wait" }, /* 84, not implemented */ + { 5, 0, printargs, "osf_table" }, /* 85, not implemented */ + { 2, 0, sys_osf_getitimer, "osf_getitimer" }, /* 86 */ + { 2, 0, sys_gethostname, "gethostname" }, /* 87 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 88 */ + { 0, 0, sys_getdtablesize, "getdtablesize" }, /* 89 */ + { 2, TD, sys_dup2, "dup2" }, /* 90 */ + { 2, TD, sys_fstat, "fstat" }, /* 91 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 92 */ + { 5, 0, sys_osf_select, "osf_select" }, /* 93 */ + { 3, TD, sys_poll, "poll" }, /* 94 */ + { 1, TD, sys_fsync, "fsync" }, /* 95 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 96 */ + { 3, TN, sys_socket, "socket" }, /* 97 */ + { 3, TN, sys_connect, "connect" }, /* 98 */ + { 3, TN, sys_accept, "accept" }, /* 99 */ + { 2, 0, sys_getpriority, "osf_getpriority" }, /* 100 */ + { 4, TN, sys_send, "send" }, /* 101 */ + { 4, TN, sys_recv, "recv" }, /* 102 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 103 */ + { 3, TN, sys_bind, "bind" }, /* 104 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */ + { 2, TN, sys_listen, "listen" }, /* 106 */ + { 5, 0, printargs, "osf_plock" }, /* 107, not implemented */ + { 5, 0, printargs, "osf_old_sigvec" }, /* 108, not implemented */ + { 5, 0, printargs, "osf_old_sigblock" }, /* 109, not implemented */ + { 5, 0, printargs, "osf_old_sigsetmask" }, /* 110, not implemented */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 111 */ + { 5, 0, printargs, "sigstack" }, /* 112 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */ + { 5, 0, printargs, "osf_old_vtrace" }, /* 115, not implemented */ + { 2, 0, sys_osf_gettimeofday, "osf_gettimeofday" }, /* 116 */ + { 2, 0, sys_osf_getrusage, "osf_getrusage" }, /* 117 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */ + { 5, 0, NULL, NULL }, /* 119 */ + { 3, TD, sys_readv, "readv" }, /* 120 */ + { 3, TD, sys_writev, "writev" }, /* 121 */ + { 2, 0, sys_osf_settimeofday, "osf_settimeofday" }, /* 122 */ + { 3, TD, sys_fchown, "fchown" }, /* 123 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 124 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 126 */ + { 2, 0, sys_setregid, "setregid" }, /* 127 */ + { 2, TF, sys_rename, "rename" }, /* 128 */ + { 2, TF, sys_truncate, "truncate" }, /* 129 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 130 */ + { 2, TD, sys_flock, "flock" }, /* 131 */ + { 1, 0, sys_setgid, "setgid" }, /* 132 */ + { 6, TN, sys_sendto, "sendto" }, /* 133 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 134 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 135 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 136 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 137 */ + { 2, 0, sys_osf_utimes, "osf_utimes" }, /* 138 */ + { 5, 0, printargs, "osf_old_sigreturn" }, /* 139 */ + { 5, 0, printargs, "osf_adjtime" }, /* 140, not implemented */ + { 3, TN, sys_getpeername, "getpeername" }, /* 141 */ + { 5, 0, printargs, "osf_gethostid" }, /* 142, not implemented */ + { 5, 0, printargs, "osf_sethostid" }, /* 143, not implemented */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */ + { 5, 0, printargs, "osf_old_killpg" }, /* 146, not implemented */ + { 0, 0, sys_setsid, "setsid" }, /* 147 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 148 */ + { 5, 0, printargs, "osf_oldquota" }, /* 149, not implemented */ + { 3, TN, sys_getsockname, "getsockname" }, /* 150 */ + { 5, 0, NULL, NULL }, /* 151 */ + { 5, 0, NULL, NULL }, /* 152 */ + { 5, 0, printargs, "osf_pid_block" }, /* 153, not implemented */ + { 5, 0, printargs, "osf_pid_unblock" }, /* 154, not implemented */ + { 5, 0, NULL, NULL }, /* 155 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 156 */ + { 5, 0, printargs, "osf_sigwaitprim" }, /* 157, not implemented */ + { 5, 0, printargs, "osf_nfssvc" }, /* 158, not implemented */ + { 4, 0, printargs, "osf_getdirentries" }, /* 159 */ + { 3, 0, osf_statfs, "osf_statfs" }, /* 160 */ + { 3, 0, osf_fstatfs, "osf_fstatfs" }, /* 161 */ + { 5, 0, NULL, NULL }, /* 162 */ + { 5, 0, printargs, "osf_asynch_daemon" }, /* 163, not implemented */ + { 5, 0, printargs, "osf_getfh" }, /* 164, not implemented */ + { 2, 0, printargs, "osf_getdomainname" }, /* 165 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 166 */ + { 5, 0, NULL, NULL }, /* 167 */ + { 5, 0, NULL, NULL }, /* 168 */ + { 5, 0, printargs, "osf_exportfs" }, /* 169, not implemented */ + { 5, 0, NULL, NULL }, /* 170 */ + { 5, 0, NULL, NULL }, /* 171 */ + { 5, 0, NULL, NULL }, /* 172 */ + { 5, 0, NULL, NULL }, /* 173 */ + { 5, 0, NULL, NULL }, /* 174 */ + { 5, 0, NULL, NULL }, /* 175 */ + { 5, 0, NULL, NULL }, /* 176 */ + { 5, 0, NULL, NULL }, /* 177 */ + { 5, 0, NULL, NULL }, /* 178 */ + { 5, 0, NULL, NULL }, /* 179 */ + { 5, 0, NULL, NULL }, /* 180 */ + { 5, 0, printargs, "osf_alt_plock" }, /* 181, not implemented */ + { 5, 0, NULL, NULL }, /* 182 */ + { 5, 0, NULL, NULL }, /* 183 */ + { 5, 0, printargs, "osf_getmnt" }, /* 184, not implemented */ + { 5, 0, NULL, NULL }, /* 185 */ + { 5, 0, NULL, NULL }, /* 186 */ + { 5, 0, printargs, "osf_alt_sigpending" }, /* 187, not implemented */ + { 5, 0, printargs, "osf_alt_setsid" }, /* 188, not implemented */ + { 5, 0, NULL, NULL }, /* 189 */ + { 5, 0, NULL, NULL }, /* 190 */ + { 5, 0, NULL, NULL }, /* 191 */ + { 5, 0, NULL, NULL }, /* 192 */ + { 5, 0, NULL, NULL }, /* 193 */ + { 5, 0, NULL, NULL }, /* 194 */ + { 5, 0, NULL, NULL }, /* 195 */ + { 5, 0, NULL, NULL }, /* 196 */ + { 5, 0, NULL, NULL }, /* 197 */ + { 5, 0, NULL, NULL }, /* 198 */ + { 4, 0, printargs, "osf_swapon" }, /* 199 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 200 */ + { 4, TI, sys_msgget, "msgget" }, /* 201 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 202 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 203 */ + { 4, TI, sys_semctl, "semctl" }, /* 204 */ + { 4, TI, sys_semget, "semget" }, /* 205 */ + { 4, TI, printargs, "semop" }, /* 206 */ + { 1, 0, printargs, "osf_utsname" }, /* 207 */ + { 3, TF, sys_chown, "lchown" }, /* 208 */ + { 3, TI, printargs, "osf_shmat" }, /* 209 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 210 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 211 */ + { 4, TI, sys_shmget, "shmget" }, /* 212 */ + { 5, 0, printargs, "osf_mvalid" }, /* 213, not implemented */ + { 5, 0, printargs, "osf_getaddressconf" }, /* 214, not implemented */ + { 5, 0, printargs, "osf_msleep" }, /* 215, not implemented */ + { 5, 0, printargs, "osf_mwakeup" }, /* 216, not implemented */ + { 3, TM, sys_msync, "msync" }, /* 217 */ + { 5, 0, printargs, "osf_signal" }, /* 218, not implemented */ + { 5, 0, printargs, "osf_utc_gettime" }, /* 219, not implemented */ + { 5, 0, printargs, "osf_utc_adjtime" }, /* 220, not implemented */ + { 5, 0, NULL, NULL }, /* 221 */ + { 5, 0, printargs, "osf_security" }, /* 222, not implemented */ + { 5, 0, printargs, "osf_kloadcall" }, /* 223, not implemented */ + { 5, 0, NULL, NULL }, /* 224 */ + { 5, 0, NULL, NULL }, /* 225 */ + { 5, 0, NULL, NULL }, /* 226 */ + { 5, 0, NULL, NULL }, /* 227 */ + { 5, 0, NULL, NULL }, /* 228 */ + { 5, 0, NULL, NULL }, /* 229 */ + { 5, 0, NULL, NULL }, /* 230 */ + { 5, 0, NULL, NULL }, /* 231 */ + { 5, 0, NULL, NULL }, /* 232 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 233 */ + { 1, 0, sys_getsid, "getsid" }, /* 234 */ + { 5, TS, sys_sigaltstack, "sigaltstack" }, /* 235 */ + { 5, 0, printargs, "osf_waitid" }, /* 236, not implemented */ + { 5, 0, printargs, "osf_priocntlset" }, /* 237, not implemented */ + { 5, 0, printargs, "osf_sigsendset" }, /* 238, not implemented */ + { 5, 0, printargs, "osf_set_speculative" }, /* 239, not implemented */ + { 5, 0, printargs, "osf_msfs_syscall" }, /* 240, not implemented */ + { 5, 0, printargs, "osf_sysinfo" }, /* 241 */ + { 5, 0, printargs, "osf_uadmin" }, /* 242, not implemented */ + { 5, 0, printargs, "osf_fuser" }, /* 243, not implemented */ + { 2, 0, printargs, "osf_proplist_syscall" }, /* 244 */ + { 5, 0, printargs, "osf_ntp_adjtime" }, /* 245, not implemented */ + { 5, 0, printargs, "osf_ntp_gettime" }, /* 246, not implemented */ + { 5, 0, printargs, "osf_pathconf" }, /* 247, not implemented */ + { 5, 0, printargs, "osf_fpathconf" }, /* 248, not implemented */ + { 5, 0, NULL, NULL }, /* 249 */ + { 5, 0, printargs, "osf_uswitch" }, /* 250, not implemented */ + { 2, 0, printargs, "osf_usleep_thread" }, /* 251 */ + { 5, 0, printargs, "osf_audcntl" }, /* 252, not implemented */ + { 5, 0, printargs, "osf_audgen" }, /* 253, not implemented */ + { 5, 0, sys_sysfs, "sysfs" }, /* 254 */ + { 5, 0, printargs, "osf_subsysinfo" }, /* 255, not implemented */ + { 5, 0, printargs, "osf_getsysinfo" }, /* 256 */ + { 5, 0, printargs, "osf_setsysinfo" }, /* 257 */ + { 5, 0, printargs, "osf_afs_syscall" }, /* 258, not implemented */ + { 5, 0, printargs, "osf_swapctl" }, /* 259, not implemented */ + { 5, 0, printargs, "osf_memcntl" }, /* 260, not implemented */ + { 5, 0, printargs, "osf_fdatasync" }, /* 261, not implemented */ + { 5, 0, NULL, NULL }, /* 262 */ + { 5, 0, NULL, NULL }, /* 263 */ + { 5, 0, NULL, NULL }, /* 264 */ + { 5, 0, NULL, NULL }, /* 265 */ + { 5, 0, NULL, NULL }, /* 266 */ + { 5, 0, NULL, NULL }, /* 267 */ + { 5, 0, NULL, NULL }, /* 268 */ + { 5, 0, NULL, NULL }, /* 269 */ + { 5, 0, NULL, NULL }, /* 270 */ + { 5, 0, NULL, NULL }, /* 271 */ + { 5, 0, NULL, NULL }, /* 272 */ + { 5, 0, NULL, NULL }, /* 273 */ + { 5, 0, NULL, NULL }, /* 274 */ + { 5, 0, NULL, NULL }, /* 275 */ + { 5, 0, NULL, NULL }, /* 276 */ + { 5, 0, NULL, NULL }, /* 277 */ + { 5, 0, NULL, NULL }, /* 278 */ + { 5, 0, NULL, NULL }, /* 279 */ + { 5, 0, NULL, NULL }, /* 280 */ + { 5, 0, NULL, NULL }, /* 281 */ + { 5, 0, NULL, NULL }, /* 282 */ + { 5, 0, NULL, NULL }, /* 283 */ + { 5, 0, NULL, NULL }, /* 284 */ + { 5, 0, NULL, NULL }, /* 285 */ + { 5, 0, NULL, NULL }, /* 286 */ + { 5, 0, NULL, NULL }, /* 287 */ + { 5, 0, NULL, NULL }, /* 288 */ + { 5, 0, NULL, NULL }, /* 289 */ + { 5, 0, NULL, NULL }, /* 290 */ + { 5, 0, NULL, NULL }, /* 291 */ + { 5, 0, NULL, NULL }, /* 292 */ + { 5, 0, NULL, NULL }, /* 293 */ + { 5, 0, NULL, NULL }, /* 294 */ + { 5, 0, NULL, NULL }, /* 295 */ + { 5, 0, NULL, NULL }, /* 296 */ + { 5, 0, NULL, NULL }, /* 297 */ + { 5, 0, NULL, NULL }, /* 298 */ + { 5, 0, NULL, NULL }, /* 299 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 300 */ + { 3, 0, printargs, "sethae" }, /* 301 */ + { 5, TF, sys_mount, "mount" }, /* 302 */ + { 1, 0, sys_adjtimex, "adjtimex32" }, /* 303 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 304 */ + { 3, TD, sys_getdents, "getdents" }, /* 305 */ + { 2, 0, sys_create_module, "create_module" }, /* 306 */ + { 4, 0, sys_init_module, "init_module" }, /* 307 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 308 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 309 */ + { 3, 0, sys_syslog, "syslog" }, /* 310 */ + { 4, 0, sys_reboot, "reboot" }, /* 311 */ + { 5, TP, sys_clone, "clone" }, /* 312 */ + { 1, TF, sys_uselib, "uselib" }, /* 313 */ + { 2, TM, sys_mlock, "mlock" }, /* 314 */ + { 2, TM, sys_munlock, "munlock" }, /* 315 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 316 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 317 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 318 */ + { 1, 0, sys_sysctl, "sysctl" }, /* 319 */ + { 0, 0, sys_idle, "idle" }, /* 320 */ + { 1, TF, sys_umount, "oldumount" }, /* 321 */ + { 2, TF, sys_swapon, "swapon" }, /* 322 */ + { 1, 0, sys_times, "times" }, /* 323 */ + { 1, 0, sys_personality, "personality" }, /* 324 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 325 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 326 */ + { 2, 0, sys_ustat, "ustat" }, /* 327 */ + { 2, TF, sys_statfs, "statfs" }, /* 328 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 329 */ + { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 330 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 331 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 332 */ + { 2, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 333 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 334 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max" }, /* 335 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min" }, /* 336 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval" }, /* 337 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 338 */ + { 1, 0, sys_uname, "uname" }, /* 339 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 340 */ + { 5, TM, sys_mremap, "mremap" }, /* 341 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 342 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 343 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 344 */ + { 5, 0, printargs, "pciconfig_read" }, /* 345 */ + { 5, 0, printargs, "pciconfig_write" }, /* 346 */ + { 5, 0, sys_query_module, "query_module" }, /* 347 */ + { 5, 0, sys_prctl, "prctl" }, /* 348 */ + { 4, TD, sys_pread, "pread" }, /* 349 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 350 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 351 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 352 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 353 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 354 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 355 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 356 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 357 */ + { 5, TD, sys_select, "select" }, /* 358 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 359 */ + { 3, 0, sys_settimeofday, "settimeofday" }, /* 360 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 361 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 362 */ + { 2, TF, sys_utimes, "utimes" }, /* 363 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 364 */ + { 4, TP, sys_wait4, "wait4" }, /* 365 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 366 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 367 */ + { 2, 0, sys_capget, "capget" }, /* 368 */ + { 2, 0, sys_capset, "capset" }, /* 369 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 370 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 371 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 372 */ + { 4, 0, printargs, "dipc" }, /* 373, not implemented */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 374 */ + { 3, TM, sys_mincore, "mincore" }, /* 375 */ + { 3, 0, printargs, "pciconfig_iobase" }, /* 376 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 377 */ + { 0, 0, sys_gettid, "gettid" }, /* 378 */ + { 3, TD, sys_readahead, "readahead" }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 2, TS, sys_kill, "tkill" }, /* 381 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 382 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 383 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 384 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 385 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 386 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 387 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 388 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 389 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 390 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 391 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 392 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 393 */ + { 6, 0, sys_futex, "futex" }, /* 394 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 395 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 396 */ + { 5, 0, sys_tuxcall, "tuxcall" }, /* 397 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 398 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 399 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 400 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 401 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 402 */ + { 5, 0, NULL, NULL }, /* 403 */ + { 5, 0, NULL, NULL }, /* 404 */ + { 1, TP, sys_exit, "exit_group" }, /* 405 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 406 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 407 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 408 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 409 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 410 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 411 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 412 */ + { 4, TD, sys_fadvise64, "fadvise" }, /* 413 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 414 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 415 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 416 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 417 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 418 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 419 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 420 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 421 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 422 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 424 */ + { 2, TF, sys_stat64, "stat64" }, /* 425 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 426 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 427 */ + { 5, 0, sys_vserver, "vserver" }, /* 428 ??? */ + { 5, TM, printargs, "mbind" }, /* 429 ??? */ + { 5, TM, printargs, "get_mempolicy" }, /* 430 ??? */ + { 5, TM, printargs, "set_mempolicy" }, /* 431 ??? */ + { 4, 0, sys_mq_open, "mq_open" }, /* 432 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 433 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 434 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 435 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 436 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 437 */ + { 4, 0, printargs, "waitid" }, /* 438 */ + { 5, 0, sys_add_key, "add_key" }, /* 439 */ + { 4, 0, sys_request_key, "request_key" }, /* 440 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 441 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 442 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 443 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 444 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 445 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 446 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 447 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 448 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 449 */ + { 4, TD|TF, sys_openat, "openat" }, /* 450 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 451 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 452 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 453 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 454 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 455 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 456 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 457 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 458 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 459 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 460 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 461 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 462 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 463 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 464 */ + { 1, TP, sys_unshare, "unshare" }, /* 465 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 466 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 467 */ + { 6, TD, sys_splice, "splice" }, /* 468 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 469 */ + { 4, TD, sys_tee, "tee" }, /* 470 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 471 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 472 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 473 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 474 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 475 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 476 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 477 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 478 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 479 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 480 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 481 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 482 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 483 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 484 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 485 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 486 */ + { 3, TD, sys_dup3, "dup3" }, /* 487 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 488 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 489 */ + { 4, TD, sys_preadv, "preadv" }, /* 490 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 491 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 492 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 493 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 494 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 495 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 496 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 497 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 498 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 499 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 500 */ + { 2, TD, sys_setns, "setns" }, /* 501 */ + { 4, TN, sys_accept4, "accept4" }, /* 502 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 503 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 504 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 505 */ diff --git a/alice-strace/linux/arm/ioctlent.h.in b/alice-strace/linux/arm/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/arm/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/arm/syscallent.h b/alice-strace/linux/arm/syscallent.h new file mode 100644 index 0000000..132b22a --- /dev/null +++ b/alice-strace/linux/arm/syscallent.h @@ -0,0 +1,503 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ + { 1, TP, sys_exit, "exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 1, TD|TM, sys_old_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 5, 0, printargs, "syscall" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_vm86, "vm86" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + + { 6, TD, sys_pread, "pread" }, /* 180 */ + { 6, TD, sys_pwrite, "pwrite" }, /* 181 */ + { 3, TF, sys_chown, "chown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */ + { 4, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "lchown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + + { 0, NF, sys_getgid, "getgid32" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */ + { 0, NF, sys_geteuid, "getegid32" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */ + { 2, 0, sys_setregid, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, TD, sys_fchown, "fchown32" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */ + { 3, TF, sys_chown, "chown32" }, /* 212 */ + { 1, 0, sys_setuid, "setuid32" }, /* 213 */ + { 1, 0, sys_setgid, "setgid32" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 217 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 218 */ + { 3, TM, sys_mincore, "mincore" }, /* 219 */ + { 3, TM, sys_madvise, "madvise" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 5, 0, NULL, NULL }, /* 222 */ + { 5, 0, NULL, NULL }, /* 223 */ + { 0, 0, sys_gettid, "gettid" }, /* 224 */ + { 5, TD, sys_readahead, "readahead" }, /* 225 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 226 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 229 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 232 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 235 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */ + { 2, TS, sys_kill, "tkill" }, /* 238 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */ + { 6, 0, sys_futex, "futex" }, /* 240 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 243 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 244 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 245 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 246 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 247 */ + { 1, TP, sys_exit, "exit_group" }, /* 248 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 249 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 250 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 251 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 252 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 253 */ + { 5, 0, NULL, NULL }, /* 254 */ + { 5, 0, NULL, NULL }, /* 255 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 256 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 257 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 258 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 259 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 260 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 261 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 262 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 263 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 264 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 265 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 266 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 267 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 268 */ + { 2, TF, sys_utimes, "utimes" }, /* 269 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 270 */ + { 5, 0, printargs, "pciconfig_iobase" }, /* 271 */ + { 5, 0, printargs, "pciconfig_read" }, /* 272 */ + { 5, 0, printargs, "pciconfig_write" }, /* 273 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 274 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 275 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 276 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 277 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 278 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 279 */ + { 5, TP, sys_waitid, "waitid" }, /* 280 */ + { 3, TN, sys_socket, "socket" }, /* 281 */ + { 3, TN, sys_bind, "bind" }, /* 282 */ + { 3, TN, sys_connect, "connect" }, /* 283 */ + { 2, TN, sys_listen, "listen" }, /* 284 */ + { 3, TN, sys_accept, "accept" }, /* 285 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 286 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 287 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 288 */ + { 4, TN, sys_send, "send" }, /* 289 */ + { 6, TN, sys_sendto, "sendto" }, /* 290 */ + { 4, TN, sys_recv, "recv" }, /* 291 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 292 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 293 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 294 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 295 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 296 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 297 */ + { 4, TI, sys_semop, "semop" }, /* 298 */ + { 4, TI, sys_semget, "semget" }, /* 299 */ + { 4, TI, sys_semctl, "semctl" }, /* 300 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 301 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 302 */ + { 4, TI, sys_msgget, "msgget" }, /* 303 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 304 */ + { 4, TI, sys_shmat, "shmat" }, /* 305 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 306 */ + { 4, TI, sys_shmget, "shmget" }, /* 307 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 308 */ + { 5, 0, sys_add_key, "add_key" }, /* 309 */ + { 4, 0, sys_request_key, "request_key" }, /* 310 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 311 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 312 */ + { 5, 0, sys_vserver, "vserver" }, /* 313 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 314 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 315 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 316 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 317 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 318 */ + { 6, TM, sys_mbind, "mbind" }, /* 319 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 320 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 321 */ + { 4, TD|TF, sys_openat, "openat" }, /* 322 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 323 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 324 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 325 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 326 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 327 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 328 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 329 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 330 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 331 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 332 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 333 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 334 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 335 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 336 */ + { 1, TP, sys_unshare, "unshare" }, /* 337 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 338 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 339 */ + { 6, TD, sys_splice, "splice" }, /* 340 */ + { 6, TD, sys_sync_file_range2, "sync_file_range2"}, /* 341 */ + { 4, TD, sys_tee, "tee" }, /* 342 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 343 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 344 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 345 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 347 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 348 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 350 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 351 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 352 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 353 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 354 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 355 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 356 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 357 */ + { 3, TD, sys_dup3, "dup3" }, /* 358 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 359 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 360 */ + { 6, TD, sys_preadv, "preadv" }, /* 361 */ + { 6, TD, sys_pwritev, "pwritev" }, /* 362 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 363 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 364 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */ + { 4, TN, sys_accept4, "accept4" }, /* 366 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 367 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 368 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 369 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 370 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 371 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 372 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 373 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 374 */ + { 2, TD, sys_setns, "setns" }, /* 375 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 376 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 377 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 378 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 379 */ +#ifdef __ARM_EABI__ +# define ARM_LAST_ORDINARY_SYSCALL 379 +#else + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +# if SYS_ipc_subcall != 420 +# error fix me +# endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ +# define ARM_LAST_ORDINARY_SYSCALL 444 +#endif /* !EABI */ + + /* __ARM_NR_cmpxchg (0x000ffff0). + * Remapped by shuffle_scno() to be directly after ordinary syscalls + * in this table. + */ + { 5, 0, printargs, "cmpxchg" }, + + /* ARM specific syscalls. Encoded with scno 0x000f00xx. + * Remapped by shuffle_scno() to be directly after __ARM_NR_cmpxchg. + */ + { 5, 0, NULL, NULL }, /* 0 */ + { 5, 0, printargs, "breakpoint" }, /* 1 */ + { 5, 0, printargs, "cacheflush" }, /* 2 */ + { 5, 0, printargs, "usr26" }, /* 3 */ + { 5, 0, printargs, "usr32" }, /* 4 */ + { 5, 0, printargs, "set_tls" }, /* 5 */ +#define ARM_LAST_SPECIAL_SYSCALL 5 diff --git a/alice-strace/linux/avr32/ioctlent.h.in b/alice-strace/linux/avr32/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/avr32/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/avr32/syscallent.h b/alice-strace/linux/avr32/syscallent.h new file mode 100644 index 0000000..527d11a --- /dev/null +++ b/alice-strace/linux/avr32/syscallent.h @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2004-2009 Atmel Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + { 0, 0, sys_setup, "setup" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 1, 0, sys_umask, "umask" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "chown" }, /* 16 */ + { 3, TF, sys_chown, "lchown" }, /* 17 */ + { 3, TD, sys_lseek, "lseek" }, /* 18 */ + { 5, TD, sys_llseek, "_llseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 2, TF, sys_umount, "umount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 0, TS, sys_pause, "pause" }, /* 28 */ + { 2, TF, sys_utime, "utime" }, /* 29 */ + { 2, TF, sys_stat, "stat" }, /* 30 */ + { 2, TD, sys_fstat, "fstat" }, /* 31 */ + { 2, TF, sys_lstat, "lstat" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, TF, sys_chroot, "chroot" }, /* 34 */ + { 0, 0, sys_sync, "sync" }, /* 35 */ + { 1, TD, sys_fsync, "fsync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 5, TP, sys_clone, "clone" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 52 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 56 */ + { 5, TM, sys_mremap, "mremap" }, /* 57 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 58 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 59 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 60 */ + { 2, 0, sys_setregid, "setregid" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 68 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 69 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 70 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 71 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 72 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 5, TD, sys_select, "select" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 5, TD, sys_pread, "pread" }, /* 86 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 87 */ + { 2, TF, sys_swapon, "swapon" }, /* 88 */ + { 4, 0, sys_reboot, "reboot" }, /* 89 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, TP, sys_wait4, "wait4" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 101 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 106 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */ + { 6, TI, sys_ipc, "ipc" }, /* 108 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 109 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 110 */ + { 1, 0, sys_uname, "uname" }, /* 111 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 112 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 113 */ + { 0, TP, sys_vfork, "vfork" }, /* 114 */ + { 3, 0, sys_init_module, "init_module" }, /* 115 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 116 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 117 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 118 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 119 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 120 */ + { 1, 0, sys_personality, "personality" }, /* 121 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */ + { 3, TD, sys_getdents, "getdents" }, /* 123 */ + { 2, TD, sys_flock, "flock" }, /* 124 */ + { 3, TM, sys_msync, "msync" }, /* 125 */ + { 3, TD, sys_readv, "readv" }, /* 126 */ + { 3, TD, sys_writev, "writev" }, /* 127 */ + { 1, 0, sys_getsid, "getsid" }, /* 128 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 129 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 130 */ + { 2, TM, sys_mlock, "mlock" }, /* 131 */ + { 2, TM, sys_munlock, "munlock" }, /* 132 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 133 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 134 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 135 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 136 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 137 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 138 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 139 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 140 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 141 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 142 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 143 */ + { 3, TD, sys_poll, "poll" }, /* 144 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 145 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 146 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 147 */ + { 5, 0, sys_prctl, "prctl" }, /* 148 */ + { 3, TN, sys_socket, "socket" }, /* 149 */ + { 3, TN, sys_bind, "bind" }, /* 150 */ + { 3, TN, sys_connect, "connect" }, /* 151 */ + { 2, TN, sys_listen, "listen" }, /* 152 */ + { 3, TN, sys_accept, "accept" }, /* 153 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 154 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 155 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 156 */ + { 4, TN, sys_send, "send" }, /* 157 */ + { 4, TN, sys_recv, "recv" }, /* 158 */ + { 6, TN, sys_sendto, "sendto" }, /* 159 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 160 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 161 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 164 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 165 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 166 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 167 */ + { 2, TF, sys_stat64, "stat64" }, /* 168 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 169 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 170 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 171 */ + { 3, TM, sys_mincore, "mincore" }, /* 172 */ + { 3, TM, sys_madvise, "madvise" }, /* 173 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 174 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 175 */ + { 0, 0, sys_gettid, "gettid" }, /* 176 */ + { 4, TD, sys_readahead, "readahead" }, /* 177 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 178 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 180 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 181 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 182 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 183 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 184 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 185 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 186 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 187 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 189 */ + { 2, TS, sys_kill, "tkill" }, /* 190 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 191 */ + { 6, 0, sys_futex, "futex" }, /* 192 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 193 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 194 */ + { 2, 0, sys_capget, "capget" }, /* 195 */ + { 2, 0, sys_capset, "capset" }, /* 196 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 197 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 198 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 199 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 200 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 201 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 202 */ + { 1, TP, sys_exit, "exit_group" }, /* 203 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 204 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 205 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 206 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 207 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 208 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 209 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 210 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 211 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 212 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 213 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 214 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 215 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 216 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 217 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 218 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 219 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 220 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 221 */ + { 5, 0, NULL, NULL }, /* 222 */ + { 2, TF, sys_utimes, "utimes" }, /* 223 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 224 */ + { 3, 0, printargs, "cacheflush" }, /* 225 */ + { 5, 0, sys_vserver, "vserver" }, /* 226 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 227 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 228 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 229 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 230 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 231 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 232 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 233 */ + { 5, TP, sys_waitid, "waitid" }, /* 234 */ + { 5, 0, sys_add_key, "add_key" }, /* 235 */ + { 4, 0, sys_request_key, "request_key" }, /* 236 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 237 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 238 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 239 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 240 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 241 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 242 */ + { 4, TD|TF, sys_openat, "openat" }, /* 243 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 244 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 245 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 246 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 247 */ + { 4, TD|TF, printargs, "fstatat64" }, /* 248 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 249 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 250 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 251 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 252 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 253 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 254 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 255 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 256 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 257 */ + { 1, TP, sys_unshare, "unshare" }, /* 258 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 259 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 260 */ + { 6, TD, sys_splice, "splice" }, /* 261 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 262 */ + { 4, TD, sys_tee, "tee" }, /* 263 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 264 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 265 */ + { 4, TI, sys_msgget, "msgget" }, /* 266 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 267 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 268 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 269 */ + { 4, TI, sys_semget, "semget" }, /* 270 */ + { 4, TI, sys_semop, "semop" }, /* 271 */ + { 4, TI, sys_semctl, "semctl" }, /* 272 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 273 */ + { 4, TI, sys_shmat, "shmat" }, /* 274 */ + { 4, TI, sys_shmget, "shmget" }, /* 275 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 276 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 277 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 278 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 279 */ + { 2, TD, sys_timerfd, "timerfd_create" }, /* 280 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 281 */ + { 5, 0, NULL, NULL }, /* 282 */ + { 2, TD, sys_setns, "setns" }, /* 283 */ diff --git a/alice-strace/linux/bfin/ioctlent.h.in b/alice-strace/linux/bfin/ioctlent.h.in new file mode 100644 index 0000000..791d8e3 --- /dev/null +++ b/alice-strace/linux/bfin/ioctlent.h.in @@ -0,0 +1,8 @@ + {"asm/bfin_sport.h", "SPORT_IOC_CONFIG", 0x5001}, + {"asm/bfin_sport.h", "SPORT_IOC_GET_SYSTEMCLOCK", 0x5002}, + {"asm/bfin_sport.h", "SPORT_IOC_SET_BAUDRATE", 0x5003}, + {"asm/ioctls.h", "FIOQSIZE", 0x545e}, + {"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_SET_PERIOD", 0x7402}, + {"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_START", 0x7406}, + {"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_STOP", 0x7408}, + {"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_READ", 0x740a}, diff --git a/alice-strace/linux/bfin/syscallent.h b/alice-strace/linux/bfin/syscallent.h new file mode 100644 index 0000000..cc03eaf --- /dev/null +++ b/alice-strace/linux/bfin/syscallent.h @@ -0,0 +1,411 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "chown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, printargs, "old_mmap" }, /* 90: not implemented in kernel */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, sys_vm86old, "vm86old" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 1, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 159 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 160 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_vm86, "vm86" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 5, TD, sys_pread, "pread" }, /* 180 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 181 */ + { 3, TF, sys_chown, "lchown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "chown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + { 0, NF, sys_getgid, "getgid32" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */ + { 0, NF, sys_geteuid, "getegid32" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */ + { 2, 0, sys_setregid, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, TD, sys_fchown, "fchown32" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */ + { 3, TF, sys_chown, "lchown32" }, /* 212 */ + { 1, 0, sys_setuid, "setuid32" }, /* 213 */ + { 1, 0, sys_setgid, "setgid32" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 4, 0, NULL, NULL }, /* 222 */ + { 5, 0, sys_security, "security" }, /* 223 */ + { 0, 0, sys_gettid, "gettid" }, /* 224 */ + { 4, TD, sys_readahead, "readahead" }, /* 225 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 226 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 229 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 232 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 235 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */ + { 2, TS, sys_kill, "tkill" }, /* 238 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */ + { 6, 0, sys_futex, "futex" }, /* 240 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 243 */ + { 1, 0, sys_get_thread_area, "get_thread_area" }, /* 244 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 245 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 248 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, 0, printargs, "alloc_hugepages" }, /* 250 */ + { 1, 0, printargs, "free_hugepages" }, /* 251 */ + { 1, TP, sys_exit, "exit_group" }, /* 252 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 253 */ + { 1, 0, printargs, "bfin_spinlock" }, /* 254 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 255 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 256 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 257 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 258 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 259 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 260 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 261 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 262 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 263 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 264 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 265 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 266 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 267 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 268 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 269 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 270 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 271 */ + { 2, TF, sys_utimes, "utimes" }, /* 272 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 273 */ + { 5, 0, sys_vserver, "vserver" }, /* 274 */ + { 6, TM, sys_mbind, "mbind" }, /* 275 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 276 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 277 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 278 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 279 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 280 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 281 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 282 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 283 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 284 */ + { 5, TP, sys_waitid, "waitid" }, /* 285 */ + { 5, 0, sys_add_key, "add_key" }, /* 286 */ + { 4, 0, sys_request_key, "request_key" }, /* 287 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 288 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */ + { 4, TD|TF, sys_openat, "openat" }, /* 295 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 300 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 303 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 308 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 309 */ + { 1, TP, sys_unshare, "unshare" }, /* 310 */ + { 2, 0, sys_sram_alloc, "sram_alloc" }, /* 311 */ + { 1, 0, printargs, "sram_free" }, /* 312 */ + { 3, 0, printargs, "dma_memcpy" }, /* 313 */ + { 3, TN, sys_accept, "accept" }, /* 314 */ + { 3, TN, sys_bind, "bind" }, /* 315 */ + { 3, TN, sys_connect, "connect" }, /* 316 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 317 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 318 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 319 */ + { 2, TN, sys_listen, "listen" }, /* 320 */ + { 4, TN, sys_recv, "recv" }, /* 321 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 322 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 323 */ + { 4, TN, sys_send, "send" }, /* 324 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 325 */ + { 6, TN, sys_sendto, "sendto" }, /* 326 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 327 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 328 */ + { 3, TN, sys_socket, "socket" }, /* 329 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 330 */ + { 4, TI, sys_semctl, "semctl" }, /* 331 */ + { 4, TI, sys_semget, "semget" }, /* 332 */ + { 4, TI, sys_semop, "semop" }, /* 333 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 334 */ + { 4, TI, sys_msgget, "msgget" }, /* 335 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 336 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 337 */ + { 4, TI, sys_shmat, "shmat" }, /* 338 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 339 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 340 */ + { 4, TI, sys_shmget, "shmget" }, /* 341 */ + { 6, TD, sys_splice, "splice" }, /* 342 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 343 */ + { 4, TD, sys_tee, "tee" }, /* 344 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 345 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 347 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 348 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 349 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 350 */ + { 5, TD, sys_pread, "pread64" }, /* 351 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 352 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 353 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 354 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 355 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 356 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 357 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 358 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 359 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 360 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 361 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 362 */ + { 3, TD, sys_dup3, "dup3" }, /* 363 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 364 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 365 */ + { 5, TD, sys_preadv, "preadv" }, /* 366 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 367 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 368 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 369 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 370 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 371 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 372 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 373 */ + { 3, 0, sys_cacheflush, "cacheflush" }, /* 374 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 375 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 376 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 377 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 378 */ + { 2, TD, sys_setns, "setns" }, /* 379 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 380 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 381 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 382 */ diff --git a/alice-strace/linux/dummy.h b/alice-strace/linux/dummy.h new file mode 100644 index 0000000..9d33fe1 --- /dev/null +++ b/alice-strace/linux/dummy.h @@ -0,0 +1,169 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + +#ifndef HAVE_STRUCT___OLD_KERNEL_STAT +#define sys_oldfstat printargs +#define sys_oldstat printargs +#endif + +/* still unfinished */ +#define sys_add_key printargs +#define sys_fanotify_init printargs +#define sys_fanotify_mark printargs +#define sys_finit_module printargs +#define sys_ioperm printargs +#define sys_iopl printargs +#define sys_ioprio_get printargs +#define sys_ioprio_set printargs +#define sys_kcmp printargs +#define sys_kexec_load printargs +#define sys_keyctl printargs +#define sys_lookup_dcookie printargs +#define sys_name_to_handle_at printargs +#define sys_open_by_handle_at printargs +#define sys_request_key printargs +#define sys_sync_file_range printargs +#define sys_sync_file_range2 printargs +#define sys_sysfs printargs +#define sys_vm86old printargs +#define sys_vm86 printargs + +/* machine-specific */ +#ifndef I386 +#define sys_modify_ldt printargs +#ifndef M68K +#define sys_get_thread_area printargs +#define sys_set_thread_area printargs +#endif +#endif + +/* like another call */ +#define sys_acct sys_chdir +#define sys_chroot sys_chdir +#define sys_clock_getres sys_clock_gettime +#define sys_delete_module sys_open +#define sys_dup sys_close +#define sys_fchdir sys_close +#define sys_fdatasync sys_close +#define sys_fsync sys_close +#define sys_getegid sys_getuid +#define sys_geteuid sys_getuid +#define sys_getgid sys_getuid +#define sys_getresgid sys_getresuid +#define sys_lstat sys_stat +#define sys_lstat64 sys_stat64 +#define sys_mlock sys_munmap +#define sys_mq_unlink sys_chdir +#define sys_munlock sys_munmap +#define sys_oldlstat sys_oldstat +#define sys_pivotroot sys_link +#define sys_rename sys_link +#define sys_rmdir sys_chdir +#define sys_sched_get_priority_max sys_sched_get_priority_min +#define sys_set_robust_list sys_munmap +#define sys_setfsgid sys_setfsuid +#define sys_setgid sys_setuid +#define sys_setns sys_inotify_rm_watch +#define sys_setregid sys_setreuid +#define sys_setresgid sys_setresuid +#define sys_swapoff sys_chdir +#define sys_symlink sys_link +#define sys_syncfs sys_close +#define sys_umount sys_chdir +#define sys_unlink sys_chdir +#define sys_uselib sys_chdir + +/* printargs does the right thing */ +#define sys_getpgid printargs +#define sys_getpid printargs +#define sys_getppid printargs +#define sys_gettid printargs +#define sys_idle printargs +#define sys_inotify_init printargs +#define sys_munlockall printargs +#define sys_pause printargs +#define sys_rt_sigreturn printargs +#define sys_sched_yield printargs +#define sys_setsid printargs +#define sys_set_tid_address printargs +#define sys_setup printargs +#define sys_sync printargs +#define sys_timer_delete printargs +#define sys_timer_getoverrun printargs +#define sys_vhangup printargs + +/* printargs_lu/ld does the right thing */ +#define sys_alarm printargs_lu +#define sys_getpgrp printargs_lu +#define sys_getsid printargs_lu +#define sys_nice printargs_ld +#define sys_setpgid printargs_lu +#define sys_setpgrp printargs_lu + +/* unimplemented */ +#define sys_afs_syscall printargs +#define sys_break printargs +#define sys_ftime printargs +#define sys_get_kernel_syms printargs +#define sys_gtty printargs +#define sys_lock printargs +#define sys_mpx printargs +#define sys_nfsservctl printargs +#define sys_phys printargs +#define sys_profil printargs +#define sys_prof printargs +#define sys_security printargs +#define sys_stty printargs +#define sys_tuxcall printargs +#define sys_ulimit printargs +#define sys_ustat printargs +#define sys_vserver printargs + +/* deprecated */ +#define sys_bdflush printargs +#define sys_oldolduname printargs +#define sys_olduname printargs + +/* no library support */ +#ifndef HAVE_SENDMSG +#define sys_recvmsg printargs +#define sys_sendmsg printargs +#endif + +/* Who has STREAMS syscalls? + * Linux hasn't. Solaris has (had?). + * Just in case I miss something, retain in for Sparc. + * Note: SYS_get/putpmsg may be defined even though syscalls + * return ENOSYS. Can't just check defined(SYS_getpmsg). + */ +#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_getpmsg) +#define sys_getpmsg printargs +#endif +#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_putpmsg) +#define sys_putpmsg printargs +#endif diff --git a/alice-strace/linux/errnoent.h b/alice-strace/linux/errnoent.h new file mode 100644 index 0000000..c2ac683 --- /dev/null +++ b/alice-strace/linux/errnoent.h @@ -0,0 +1,535 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "EDEADLK", /* 35 */ + "ENAMETOOLONG", /* 36 */ + "ENOLCK", /* 37 */ + "ENOSYS", /* 38 */ + "ENOTEMPTY", /* 39 */ + "ELOOP", /* 40 */ + "ERRNO_41", /* 41 */ + "ENOMSG", /* 42 */ + "EIDRM", /* 43 */ + "ECHRNG", /* 44 */ + "EL2NSYNC", /* 45 */ + "EL3HLT", /* 46 */ + "EL3RST", /* 47 */ + "ELNRNG", /* 48 */ + "EUNATCH", /* 49 */ + "ENOCSI", /* 50 */ + "EL2HLT", /* 51 */ + "EBADE", /* 52 */ + "EBADR", /* 53 */ + "EXFULL", /* 54 */ + "ENOANO", /* 55 */ + "EBADRQC", /* 56 */ + "EBADSLT", /* 57 */ +#ifdef POWERPC + "EDEADLOCK", /* 58 */ +#else + "ERRNO_58", /* 58 */ +#endif + "EBFONT", /* 59 */ + "ENOSTR", /* 60 */ + "ENODATA", /* 61 */ + "ETIME", /* 62 */ + "ENOSR", /* 63 */ + "ENONET", /* 64 */ + "ENOPKG", /* 65 */ + "EREMOTE", /* 66 */ + "ENOLINK", /* 67 */ + "EADV", /* 68 */ + "ESRMNT", /* 69 */ + "ECOMM", /* 70 */ + "EPROTO", /* 71 */ + "EMULTIHOP", /* 72 */ + "EDOTDOT", /* 73 */ + "EBADMSG", /* 74 */ + "EOVERFLOW", /* 75 */ + "ENOTUNIQ", /* 76 */ + "EBADFD", /* 77 */ + "EREMCHG", /* 78 */ + "ELIBACC", /* 79 */ + "ELIBBAD", /* 80 */ + "ELIBSCN", /* 81 */ + "ELIBMAX", /* 82 */ + "ELIBEXEC", /* 83 */ + "EILSEQ", /* 84 */ + "ERESTART", /* 85 */ + "ESTRPIPE", /* 86 */ + "EUSERS", /* 87 */ + "ENOTSOCK", /* 88 */ + "EDESTADDRREQ", /* 89 */ + "EMSGSIZE", /* 90 */ + "EPROTOTYPE", /* 91 */ + "ENOPROTOOPT", /* 92 */ + "EPROTONOSUPPORT", /* 93 */ + "ESOCKTNOSUPPORT", /* 94 */ + "EOPNOTSUPP", /* 95 */ + "EPFNOSUPPORT", /* 96 */ + "EAFNOSUPPORT", /* 97 */ + "EADDRINUSE", /* 98 */ + "EADDRNOTAVAIL", /* 99 */ + "ENETDOWN", /* 100 */ + "ENETUNREACH", /* 101 */ + "ENETRESET", /* 102 */ + "ECONNABORTED", /* 103 */ + "ECONNRESET", /* 104 */ + "ENOBUFS", /* 105 */ + "EISCONN", /* 106 */ + "ENOTCONN", /* 107 */ + "ESHUTDOWN", /* 108 */ + "ETOOMANYREFS", /* 109 */ + "ETIMEDOUT", /* 110 */ + "ECONNREFUSED", /* 111 */ + "EHOSTDOWN", /* 112 */ + "EHOSTUNREACH", /* 113 */ + "EALREADY", /* 114 */ + "EINPROGRESS", /* 115 */ + "ESTALE", /* 116 */ + "EUCLEAN", /* 117 */ + "ENOTNAM", /* 118 */ + "ENAVAIL", /* 119 */ + "EISNAM", /* 120 */ + "EREMOTEIO", /* 121 */ + "EDQUOT", /* 122 */ + "ENOMEDIUM", /* 123 */ + "EMEDIUMTYPE", /* 124 */ + "ECANCELED", /* 125 */ + "ENOKEY", /* 126 */ + "EKEYEXPIRED", /* 127 */ + "EKEYREVOKED", /* 128 */ + "EKEYREJECTED", /* 129 */ + "EOWNERDEAD", /* 130 */ + "ENOTRECOVERABLE", /* 131 */ + "ERFKILL", /* 132 */ + "EHWPOISON", /* 133 */ + "ERRNO_134", /* 134 */ + "ERRNO_135", /* 135 */ + "ERRNO_136", /* 136 */ + "ERRNO_137", /* 137 */ + "ERRNO_138", /* 138 */ + "ERRNO_139", /* 139 */ + "ERRNO_140", /* 140 */ + "ERRNO_141", /* 141 */ + "ERRNO_142", /* 142 */ + "ERRNO_143", /* 143 */ + "ERRNO_144", /* 144 */ + "ERRNO_145", /* 145 */ + "ERRNO_146", /* 146 */ + "ERRNO_147", /* 147 */ + "ERRNO_148", /* 148 */ + "ERRNO_149", /* 149 */ + "ERRNO_150", /* 150 */ + "ERRNO_151", /* 151 */ + "ERRNO_152", /* 152 */ + "ERRNO_153", /* 153 */ + "ERRNO_154", /* 154 */ + "ERRNO_155", /* 155 */ + "ERRNO_156", /* 156 */ + "ERRNO_157", /* 157 */ + "ERRNO_158", /* 158 */ + "ERRNO_159", /* 159 */ + "ERRNO_160", /* 160 */ + "ERRNO_161", /* 161 */ + "ERRNO_162", /* 162 */ + "ERRNO_163", /* 163 */ + "ERRNO_164", /* 164 */ + "ERRNO_165", /* 165 */ + "ERRNO_166", /* 166 */ + "ERRNO_167", /* 167 */ + "ERRNO_168", /* 168 */ + "ERRNO_169", /* 169 */ + "ERRNO_170", /* 170 */ + "ERRNO_171", /* 171 */ + "ERRNO_172", /* 172 */ + "ERRNO_173", /* 173 */ + "ERRNO_174", /* 174 */ + "ERRNO_175", /* 175 */ + "ERRNO_176", /* 176 */ + "ERRNO_177", /* 177 */ + "ERRNO_178", /* 178 */ + "ERRNO_179", /* 179 */ + "ERRNO_180", /* 180 */ + "ERRNO_181", /* 181 */ + "ERRNO_182", /* 182 */ + "ERRNO_183", /* 183 */ + "ERRNO_184", /* 184 */ + "ERRNO_185", /* 185 */ + "ERRNO_186", /* 186 */ + "ERRNO_187", /* 187 */ + "ERRNO_188", /* 188 */ + "ERRNO_189", /* 189 */ + "ERRNO_190", /* 190 */ + "ERRNO_191", /* 191 */ + "ERRNO_192", /* 192 */ + "ERRNO_193", /* 193 */ + "ERRNO_194", /* 194 */ + "ERRNO_195", /* 195 */ + "ERRNO_196", /* 196 */ + "ERRNO_197", /* 197 */ + "ERRNO_198", /* 198 */ + "ERRNO_199", /* 199 */ + "ERRNO_200", /* 200 */ + "ERRNO_201", /* 201 */ + "ERRNO_202", /* 202 */ + "ERRNO_203", /* 203 */ + "ERRNO_204", /* 204 */ + "ERRNO_205", /* 205 */ + "ERRNO_206", /* 206 */ + "ERRNO_207", /* 207 */ + "ERRNO_208", /* 208 */ + "ERRNO_209", /* 209 */ + "ERRNO_210", /* 210 */ + "ERRNO_211", /* 211 */ + "ERRNO_212", /* 212 */ + "ERRNO_213", /* 213 */ + "ERRNO_214", /* 214 */ + "ERRNO_215", /* 215 */ + "ERRNO_216", /* 216 */ + "ERRNO_217", /* 217 */ + "ERRNO_218", /* 218 */ + "ERRNO_219", /* 219 */ + "ERRNO_220", /* 220 */ + "ERRNO_221", /* 221 */ + "ERRNO_222", /* 222 */ + "ERRNO_223", /* 223 */ + "ERRNO_224", /* 224 */ + "ERRNO_225", /* 225 */ + "ERRNO_226", /* 226 */ + "ERRNO_227", /* 227 */ + "ERRNO_228", /* 228 */ + "ERRNO_229", /* 229 */ + "ERRNO_230", /* 230 */ + "ERRNO_231", /* 231 */ + "ERRNO_232", /* 232 */ + "ERRNO_233", /* 233 */ + "ERRNO_234", /* 234 */ + "ERRNO_235", /* 235 */ + "ERRNO_236", /* 236 */ + "ERRNO_237", /* 237 */ + "ERRNO_238", /* 238 */ + "ERRNO_239", /* 239 */ + "ERRNO_240", /* 240 */ + "ERRNO_241", /* 241 */ + "ERRNO_242", /* 242 */ + "ERRNO_243", /* 243 */ + "ERRNO_244", /* 244 */ + "ERRNO_245", /* 245 */ + "ERRNO_246", /* 246 */ + "ERRNO_247", /* 247 */ + "ERRNO_248", /* 248 */ + "ERRNO_249", /* 249 */ + "ERRNO_250", /* 250 */ + "ERRNO_251", /* 251 */ + "ERRNO_252", /* 252 */ + "ERRNO_253", /* 253 */ + "ERRNO_254", /* 254 */ + "ERRNO_255", /* 255 */ + "ERRNO_256", /* 256 */ + "ERRNO_257", /* 257 */ + "ERRNO_258", /* 258 */ + "ERRNO_259", /* 259 */ + "ERRNO_260", /* 260 */ + "ERRNO_261", /* 261 */ + "ERRNO_262", /* 262 */ + "ERRNO_263", /* 263 */ + "ERRNO_264", /* 264 */ + "ERRNO_265", /* 265 */ + "ERRNO_266", /* 266 */ + "ERRNO_267", /* 267 */ + "ERRNO_268", /* 268 */ + "ERRNO_269", /* 269 */ + "ERRNO_270", /* 270 */ + "ERRNO_271", /* 271 */ + "ERRNO_272", /* 272 */ + "ERRNO_273", /* 273 */ + "ERRNO_274", /* 274 */ + "ERRNO_275", /* 275 */ + "ERRNO_276", /* 276 */ + "ERRNO_277", /* 277 */ + "ERRNO_278", /* 278 */ + "ERRNO_279", /* 279 */ + "ERRNO_280", /* 280 */ + "ERRNO_281", /* 281 */ + "ERRNO_282", /* 282 */ + "ERRNO_283", /* 283 */ + "ERRNO_284", /* 284 */ + "ERRNO_285", /* 285 */ + "ERRNO_286", /* 286 */ + "ERRNO_287", /* 287 */ + "ERRNO_288", /* 288 */ + "ERRNO_289", /* 289 */ + "ERRNO_290", /* 290 */ + "ERRNO_291", /* 291 */ + "ERRNO_292", /* 292 */ + "ERRNO_293", /* 293 */ + "ERRNO_294", /* 294 */ + "ERRNO_295", /* 295 */ + "ERRNO_296", /* 296 */ + "ERRNO_297", /* 297 */ + "ERRNO_298", /* 298 */ + "ERRNO_299", /* 299 */ + "ERRNO_300", /* 300 */ + "ERRNO_301", /* 301 */ + "ERRNO_302", /* 302 */ + "ERRNO_303", /* 303 */ + "ERRNO_304", /* 304 */ + "ERRNO_305", /* 305 */ + "ERRNO_306", /* 306 */ + "ERRNO_307", /* 307 */ + "ERRNO_308", /* 308 */ + "ERRNO_309", /* 309 */ + "ERRNO_310", /* 310 */ + "ERRNO_311", /* 311 */ + "ERRNO_312", /* 312 */ + "ERRNO_313", /* 313 */ + "ERRNO_314", /* 314 */ + "ERRNO_315", /* 315 */ + "ERRNO_316", /* 316 */ + "ERRNO_317", /* 317 */ + "ERRNO_318", /* 318 */ + "ERRNO_319", /* 319 */ + "ERRNO_320", /* 320 */ + "ERRNO_321", /* 321 */ + "ERRNO_322", /* 322 */ + "ERRNO_323", /* 323 */ + "ERRNO_324", /* 324 */ + "ERRNO_325", /* 325 */ + "ERRNO_326", /* 326 */ + "ERRNO_327", /* 327 */ + "ERRNO_328", /* 328 */ + "ERRNO_329", /* 329 */ + "ERRNO_330", /* 330 */ + "ERRNO_331", /* 331 */ + "ERRNO_332", /* 332 */ + "ERRNO_333", /* 333 */ + "ERRNO_334", /* 334 */ + "ERRNO_335", /* 335 */ + "ERRNO_336", /* 336 */ + "ERRNO_337", /* 337 */ + "ERRNO_338", /* 338 */ + "ERRNO_339", /* 339 */ + "ERRNO_340", /* 340 */ + "ERRNO_341", /* 341 */ + "ERRNO_342", /* 342 */ + "ERRNO_343", /* 343 */ + "ERRNO_344", /* 344 */ + "ERRNO_345", /* 345 */ + "ERRNO_346", /* 346 */ + "ERRNO_347", /* 347 */ + "ERRNO_348", /* 348 */ + "ERRNO_349", /* 349 */ + "ERRNO_350", /* 350 */ + "ERRNO_351", /* 351 */ + "ERRNO_352", /* 352 */ + "ERRNO_353", /* 353 */ + "ERRNO_354", /* 354 */ + "ERRNO_355", /* 355 */ + "ERRNO_356", /* 356 */ + "ERRNO_357", /* 357 */ + "ERRNO_358", /* 358 */ + "ERRNO_359", /* 359 */ + "ERRNO_360", /* 360 */ + "ERRNO_361", /* 361 */ + "ERRNO_362", /* 362 */ + "ERRNO_363", /* 363 */ + "ERRNO_364", /* 364 */ + "ERRNO_365", /* 365 */ + "ERRNO_366", /* 366 */ + "ERRNO_367", /* 367 */ + "ERRNO_368", /* 368 */ + "ERRNO_369", /* 369 */ + "ERRNO_370", /* 370 */ + "ERRNO_371", /* 371 */ + "ERRNO_372", /* 372 */ + "ERRNO_373", /* 373 */ + "ERRNO_374", /* 374 */ + "ERRNO_375", /* 375 */ + "ERRNO_376", /* 376 */ + "ERRNO_377", /* 377 */ + "ERRNO_378", /* 378 */ + "ERRNO_379", /* 379 */ + "ERRNO_380", /* 380 */ + "ERRNO_381", /* 381 */ + "ERRNO_382", /* 382 */ + "ERRNO_383", /* 383 */ + "ERRNO_384", /* 384 */ + "ERRNO_385", /* 385 */ + "ERRNO_386", /* 386 */ + "ERRNO_387", /* 387 */ + "ERRNO_388", /* 388 */ + "ERRNO_389", /* 389 */ + "ERRNO_390", /* 390 */ + "ERRNO_391", /* 391 */ + "ERRNO_392", /* 392 */ + "ERRNO_393", /* 393 */ + "ERRNO_394", /* 394 */ + "ERRNO_395", /* 395 */ + "ERRNO_396", /* 396 */ + "ERRNO_397", /* 397 */ + "ERRNO_398", /* 398 */ + "ERRNO_399", /* 399 */ + "ERRNO_400", /* 400 */ + "ERRNO_401", /* 401 */ + "ERRNO_402", /* 402 */ + "ERRNO_403", /* 403 */ + "ERRNO_404", /* 404 */ + "ERRNO_405", /* 405 */ + "ERRNO_406", /* 406 */ + "ERRNO_407", /* 407 */ + "ERRNO_408", /* 408 */ + "ERRNO_409", /* 409 */ + "ERRNO_410", /* 410 */ + "ERRNO_411", /* 411 */ + "ERRNO_412", /* 412 */ + "ERRNO_413", /* 413 */ + "ERRNO_414", /* 414 */ + "ERRNO_415", /* 415 */ + "ERRNO_416", /* 416 */ + "ERRNO_417", /* 417 */ + "ERRNO_418", /* 418 */ + "ERRNO_419", /* 419 */ + "ERRNO_420", /* 420 */ + "ERRNO_421", /* 421 */ + "ERRNO_422", /* 422 */ + "ERRNO_423", /* 423 */ + "ERRNO_424", /* 424 */ + "ERRNO_425", /* 425 */ + "ERRNO_426", /* 426 */ + "ERRNO_427", /* 427 */ + "ERRNO_428", /* 428 */ + "ERRNO_429", /* 429 */ + "ERRNO_430", /* 430 */ + "ERRNO_431", /* 431 */ + "ERRNO_432", /* 432 */ + "ERRNO_433", /* 433 */ + "ERRNO_434", /* 434 */ + "ERRNO_435", /* 435 */ + "ERRNO_436", /* 436 */ + "ERRNO_437", /* 437 */ + "ERRNO_438", /* 438 */ + "ERRNO_439", /* 439 */ + "ERRNO_440", /* 440 */ + "ERRNO_441", /* 441 */ + "ERRNO_442", /* 442 */ + "ERRNO_443", /* 443 */ + "ERRNO_444", /* 444 */ + "ERRNO_445", /* 445 */ + "ERRNO_446", /* 446 */ + "ERRNO_447", /* 447 */ + "ERRNO_448", /* 448 */ + "ERRNO_449", /* 449 */ + "ERRNO_450", /* 450 */ + "ERRNO_451", /* 451 */ + "ERRNO_452", /* 452 */ + "ERRNO_453", /* 453 */ + "ERRNO_454", /* 454 */ + "ERRNO_455", /* 455 */ + "ERRNO_456", /* 456 */ + "ERRNO_457", /* 457 */ + "ERRNO_458", /* 458 */ + "ERRNO_459", /* 459 */ + "ERRNO_460", /* 460 */ + "ERRNO_461", /* 461 */ + "ERRNO_462", /* 462 */ + "ERRNO_463", /* 463 */ + "ERRNO_464", /* 464 */ + "ERRNO_465", /* 465 */ + "ERRNO_466", /* 466 */ + "ERRNO_467", /* 467 */ + "ERRNO_468", /* 468 */ + "ERRNO_469", /* 469 */ + "ERRNO_470", /* 470 */ + "ERRNO_471", /* 471 */ + "ERRNO_472", /* 472 */ + "ERRNO_473", /* 473 */ + "ERRNO_474", /* 474 */ + "ERRNO_475", /* 475 */ + "ERRNO_476", /* 476 */ + "ERRNO_477", /* 477 */ + "ERRNO_478", /* 478 */ + "ERRNO_479", /* 479 */ + "ERRNO_480", /* 480 */ + "ERRNO_481", /* 481 */ + "ERRNO_482", /* 482 */ + "ERRNO_483", /* 483 */ + "ERRNO_484", /* 484 */ + "ERRNO_485", /* 485 */ + "ERRNO_486", /* 486 */ + "ERRNO_487", /* 487 */ + "ERRNO_488", /* 488 */ + "ERRNO_489", /* 489 */ + "ERRNO_490", /* 490 */ + "ERRNO_491", /* 491 */ + "ERRNO_492", /* 492 */ + "ERRNO_493", /* 493 */ + "ERRNO_494", /* 494 */ + "ERRNO_495", /* 495 */ + "ERRNO_496", /* 496 */ + "ERRNO_497", /* 497 */ + "ERRNO_498", /* 498 */ + "ERRNO_499", /* 499 */ + "ERRNO_500", /* 500 */ + "ERRNO_501", /* 501 */ + "ERRNO_502", /* 502 */ + "ERRNO_503", /* 503 */ + "ERRNO_504", /* 504 */ + "ERRNO_505", /* 505 */ + "ERRNO_506", /* 506 */ + "ERRNO_507", /* 507 */ + "ERRNO_508", /* 508 */ + "ERRNO_509", /* 509 */ + "ERRNO_510", /* 510 */ + "ERRNO_511", /* 511 */ + "ERESTARTSYS", /* 512 */ + "ERESTARTNOINTR", /* 513 */ + "ERESTARTNOHAND", /* 514 */ + "ENOIOCTLCMD", /* 515 */ + "ERESTART_RESTARTBLOCK", /* 516 */ + "EPROBE_DEFER", /* 517 */ + "EOPENSTALE", /* 518 */ + "ERRNO_519", /* 519 */ + "ERRNO_520", /* 520 */ + "EBADHANDLE", /* 521 */ + "ENOTSYNC", /* 522 */ + "EBADCOOKIE", /* 523 */ + "ENOTSUPP", /* 524 */ + "ETOOSMALL", /* 525 */ + "ESERVERFAULT", /* 526 */ + "EBADTYPE", /* 527 */ + "EJUKEBOX", /* 528 */ + "EIOCBQUEUED", /* 529 */ + "EIOCBRETRY", /* 530 */ diff --git a/alice-strace/linux/hppa/errnoent.h b/alice-strace/linux/hppa/errnoent.h new file mode 100644 index 0000000..2c92633 --- /dev/null +++ b/alice-strace/linux/hppa/errnoent.h @@ -0,0 +1,254 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "ENOMSG", /* 35 */ + "EIDRM", /* 36 */ + "ECHRNG", /* 37 */ + "EL2NSYNC", /* 38 */ + "EL3HLT", /* 39 */ + "EL3RST", /* 40 */ + "ELNRNG", /* 41 */ + "EUNATCH", /* 42 */ + "ENOCSI", /* 43 */ + "EL2HLT", /* 44 */ + "EDEADLK", /* 45 */ + "ENOLCK", /* 46 */ + "EILSEQ", /* 47 */ + "ERRNO_48", /* 48 */ + "ERRNO_49", /* 49 */ + "ENONET", /* 50 */ + "ENODATA", /* 51 */ + "ETIME", /* 52 */ + "ENOSR", /* 53 */ + "ENOSTR", /* 54 */ + "ENOPKG", /* 55 */ + "ERRNO_56", /* 56 */ + "ENOLINK", /* 57 */ + "EADV", /* 58 */ + "ESRMNT", /* 59 */ + "ECOMM", /* 60 */ + "EPROTO", /* 61 */ + "ERRNO_62", /* 62 */ + "ERRNO_63", /* 63 */ + "EMULTIHOP", /* 64 */ + "ERRNO_65", /* 65 */ + "EDOTDOT", /* 66 */ + "EBADMSG", /* 67 */ + "EUSERS", /* 68 */ + "EDQUOT", /* 69 */ + "ESTALE", /* 70 */ + "EREMOTE", /* 71 */ + "EOVERFLOW", /* 72 */ + "ERRNO_73", /* 73 */ + "ERRNO_74", /* 74 */ + "ERRNO_75", /* 75 */ + "ERRNO_76", /* 76 */ + "ERRNO_77", /* 77 */ + "ERRNO_78", /* 78 */ + "ERRNO_79", /* 79 */ + "ERRNO_80", /* 80 */ + "ERRNO_81", /* 81 */ + "ERRNO_82", /* 82 */ + "ERRNO_83", /* 83 */ + "ERRNO_84", /* 84 */ + "ERRNO_85", /* 85 */ + "ERRNO_86", /* 86 */ + "ERRNO_87", /* 87 */ + "ERRNO_88", /* 88 */ + "ERRNO_89", /* 89 */ + "ERRNO_90", /* 90 */ + "ERRNO_91", /* 91 */ + "ERRNO_92", /* 92 */ + "ERRNO_93", /* 93 */ + "ERRNO_94", /* 94 */ + "ERRNO_95", /* 95 */ + "ERRNO_96", /* 96 */ + "ERRNO_97", /* 97 */ + "ERRNO_98", /* 98 */ + "ERRNO_99", /* 99 */ + "ERRNO_100", /* 100 */ + "ERRNO_101", /* 101 */ + "ERRNO_102", /* 102 */ + "ERRNO_103", /* 103 */ + "ERRNO_104", /* 104 */ + "ERRNO_105", /* 105 */ + "ERRNO_106", /* 106 */ + "ERRNO_107", /* 107 */ + "ERRNO_108", /* 108 */ + "ERRNO_109", /* 109 */ + "ERRNO_110", /* 110 */ + "ERRNO_111", /* 111 */ + "ERRNO_112", /* 112 */ + "ERRNO_113", /* 113 */ + "ERRNO_114", /* 114 */ + "ERRNO_115", /* 115 */ + "ERRNO_116", /* 116 */ + "ERRNO_117", /* 117 */ + "ERRNO_118", /* 118 */ + "ERRNO_119", /* 119 */ + "ERRNO_120", /* 120 */ + "ERRNO_121", /* 121 */ + "ERRNO_122", /* 122 */ + "ERRNO_123", /* 123 */ + "ERRNO_124", /* 124 */ + "ERRNO_125", /* 125 */ + "ERRNO_126", /* 126 */ + "ERRNO_127", /* 127 */ + "ERRNO_128", /* 128 */ + "ERRNO_129", /* 129 */ + "ERRNO_130", /* 130 */ + "ERRNO_131", /* 131 */ + "ERRNO_132", /* 132 */ + "ERRNO_133", /* 133 */ + "ERRNO_134", /* 134 */ + "ERRNO_135", /* 135 */ + "ERRNO_136", /* 136 */ + "ERRNO_137", /* 137 */ + "ERRNO_138", /* 138 */ + "ERRNO_139", /* 139 */ + "ERRNO_140", /* 140 */ + "ERRNO_141", /* 141 */ + "ERRNO_142", /* 142 */ + "ERRNO_143", /* 143 */ + "ERRNO_144", /* 144 */ + "ERRNO_145", /* 145 */ + "ERRNO_146", /* 146 */ + "ERRNO_147", /* 147 */ + "ERRNO_148", /* 148 */ + "ERRNO_149", /* 149 */ + "ERRNO_150", /* 150 */ + "ERRNO_151", /* 151 */ + "ERRNO_152", /* 152 */ + "ERRNO_153", /* 153 */ + "ERRNO_154", /* 154 */ + "ERRNO_155", /* 155 */ + "ERRNO_156", /* 156 */ + "ERRNO_157", /* 157 */ + "ERRNO_158", /* 158 */ + "ERRNO_159", /* 159 */ + "EBADE", /* 160 */ + "EBADR", /* 161 */ + "EXFULL", /* 162 */ + "ENOANO", /* 163 */ + "EBADRQC", /* 164 */ + "EBADSLT", /* 165 */ + "EBFONT", /* 166 */ + "ENOTUNIQ", /* 167 */ + "EBADFD", /* 168 */ + "EREMCHG", /* 169 */ + "ELIBACC", /* 170 */ + "ELIBBAD", /* 171 */ + "ELIBSCN", /* 172 */ + "ELIBMAX", /* 173 */ + "ELIBEXEC", /* 174 */ + "ERESTART", /* 175 */ + "ESTRPIPE", /* 176 */ + "EUCLEAN", /* 177 */ + "ENOTNAM", /* 178 */ + "ENAVAIL", /* 179 */ + "EISNAM", /* 180 */ + "EREMOTEIO", /* 181 */ + "ENOMEDIUM", /* 182 */ + "EMEDIUMTYPE", /* 183 */ + "ERRNO_184", /* 184 */ + "ERRNO_185", /* 185 */ + "ERRNO_186", /* 186 */ + "ERRNO_187", /* 187 */ + "ERRNO_188", /* 188 */ + "ERRNO_189", /* 189 */ + "ERRNO_190", /* 190 */ + "ERRNO_191", /* 191 */ + "ERRNO_192", /* 192 */ + "ERRNO_193", /* 193 */ + "ERRNO_194", /* 194 */ + "ERRNO_195", /* 195 */ + "ERRNO_196", /* 196 */ + "ERRNO_197", /* 197 */ + "ERRNO_198", /* 198 */ + "ERRNO_199", /* 199 */ + "ERRNO_200", /* 200 */ + "ERRNO_201", /* 201 */ + "ERRNO_202", /* 202 */ + "ERRNO_203", /* 203 */ + "ERRNO_204", /* 204 */ + "ERRNO_205", /* 205 */ + "ERRNO_206", /* 206 */ + "ERRNO_207", /* 207 */ + "ERRNO_208", /* 208 */ + "ERRNO_209", /* 209 */ + "ERRNO_210", /* 210 */ + "ERRNO_211", /* 211 */ + "ERRNO_212", /* 212 */ + "ERRNO_213", /* 213 */ + "ERRNO_214", /* 214 */ + "ENOSYM", /* 215 */ + "ENOTSOCK", /* 216 */ + "EDESTADDRREQ", /* 217 */ + "EMSGSIZE", /* 218 */ + "EPROTOTYPE", /* 219 */ + "ENOPROTOOPT", /* 220 */ + "EPROTONOSUPPORT", /* 221 */ + "ESOCKTNOSUPPORT", /* 222 */ + "EOPNOTSUPP", /* 223 */ + "EPFNOSUPPORT", /* 224 */ + "EAFNOSUPPORT", /* 225 */ + "EADDRINUSE", /* 226 */ + "EADDRNOTAVAIL", /* 227 */ + "ENETDOWN", /* 228 */ + "ENETUNREACH", /* 229 */ + "ENETRESET", /* 230 */ + "ECONNABORTED", /* 231 */ + "ECONNRESET", /* 232 */ + "ENOBUFS", /* 233 */ + "EISCONN", /* 234 */ + "ENOTCONN", /* 235 */ + "ESHUTDOWN", /* 236 */ + "ETOOMANYREFS", /* 237 */ + "ETIMEDOUT", /* 238 */ + "ECONNREFUSED", /* 239 */ + "EREMOTERELEASE", /* 240 */ + "EHOSTDOWN", /* 241 */ + "EHOSTUNREACH", /* 242 */ + "ERRNO_243", /* 243 */ + "EALREADY", /* 244 */ + "EINPROGRESS", /* 245 */ + "EWOULDBLOCK", /* 246 */ + "ENOTEMPTY", /* 247 */ + "ENAMETOOLONG", /* 248 */ + "ELOOP", /* 249 */ + "ERRNO_250", /* 250 */ + "ENOSYS", /* 251 */ + "ENOTSUP", /* 252 */ + "ECANCELLED", /* 253 */ diff --git a/alice-strace/linux/hppa/ioctlent.h.in b/alice-strace/linux/hppa/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/hppa/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/hppa/signalent.h b/alice-strace/linux/hppa/signalent.h new file mode 100644 index 0000000..92e5565 --- /dev/null +++ b/alice-strace/linux/hppa/signalent.h @@ -0,0 +1,38 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGUSR1", /* 16 */ + "SIGUSR2", /* 17 */ + "SIGCHLD", /* 18 */ + "SIGPWR", /* 19 */ + "SIGVTALRM", /* 20 */ + "SIGPROF", /* 21 */ + "SIGIO", /* 22 */ + "SIGWINCH", /* 23 */ + "SIGSTOP", /* 24 */ + "SIGTSTP", /* 25 */ + "SIGCONT", /* 26 */ + "SIGTTIN", /* 27 */ + "SIGTTOU", /* 28 */ + "SIGURG", /* 29 */ + "SIGLOST", /* 30 */ + "SIGUNUSED", /* 31 */ + "SIG_32", /* 32 */ + "SIGXCPU", /* 33 */ + "SIGXFSZ", /* 34 */ + "SIG_35", /* 35 */ + "SIGSTKFLT", /* 36 */ + "SIGRTMIN", /* 37 */ diff --git a/alice-strace/linux/hppa/syscallent.h b/alice-strace/linux/hppa/syscallent.h new file mode 100644 index 0000000..4ce2dc2 --- /dev/null +++ b/alice-strace/linux/hppa/syscallent.h @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2001 Hewlett-Packard, Matthew Wilcox + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 3, TN, sys_socket, "socket" }, /* 17 */ + { 2, TF, sys_stat, "newstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 3, TN, sys_bind, "bind" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_fstat, "newfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 3, TN, sys_connect, "connect" }, /* 31 */ + { 2, TN, sys_listen, "listen" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 3, TN, sys_accept, "accept" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 2, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount2" }, /* 52 */ + { 3, TN, sys_getpeername, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 4, TN, sys_send, "send" }, /* 58 */ + { 1, 0, sys_uname, "newuname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TM, sys_mincore, "mincore" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 6, TN, sys_sendto, "sendto" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_lstat, "newlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 89 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, TN, sys_recv, "recv" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 2, TF, sys_stat64, "stat64" }, /* 101 */ + { 5, 0, NULL, NULL }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, 0, sys_capget, "capget" }, /* 106 */ + { 2, 0, sys_capset, "capset" }, /* 107 */ + { 5, TD, sys_pread, "pread" }, /* 108 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 109 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 112 */ + { 0, TP, sys_vfork, "vfork" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 3, TM, sys_madvise, "madvise" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 122 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 4, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 5, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "_newselect" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 1, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */ + { 2, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_setresuid, "getresuid" }, /* 165 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_setresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 3, TF, sys_chown, "chown" }, /* 180 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 181 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 182 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 183 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 184 */ + { 4, TI, sys_semop, "semop" }, /* 185 */ + { 4, TI, sys_semget, "semget" }, /* 186 */ + { 4, TI, sys_semctl, "semctl" }, /* 187 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 188 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 189 */ + { 4, TI, sys_msgget, "msgget" }, /* 190 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 191 */ + { 3, TI, sys_shmat, "shmat" }, /* 192 */ + { 1, TI, sys_shmdt, "shmdt" }, /* 193 */ + { 3, TI, sys_shmget, "shmget" }, /* 194 */ + { 3, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 196 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 197 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 198 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 199 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 200 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 201 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 202 */ + { 5, 0, printargs, "attrctl" }, /* 203 */ + { 5, 0, printargs, "acl_get" }, /* 204 */ + { 5, 0, printargs, "acl_set" }, /* 205 */ + { 0, 0, sys_gettid, "gettid" }, /* 206 */ + { 4, TD, sys_readahead, "readahead" }, /* 207 */ + { 2, TS, sys_kill, "tkill" }, /* 208 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 209 */ + { 6, 0, sys_futex, "futex" }, /* 210 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 211 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 212 */ + { 5, 0, printargs, "set_thread_area" }, /* 213 */ + { 5, 0, printargs, "get_thread_area" }, /* 214 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 215 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 216 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 217 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 218 */ + { 4, 0, sys_io_cancel, "io_cancel" }, /* 219 */ + { 5, 0, printargs, "alloc_hugepages" }, /* 220 */ + { 1, 0, printargs, "free_hugepages" }, /* 221 */ + { 1, TP, sys_exit, "exit_group" }, /* 222 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 223 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 224 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 225 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 226 */ + { 5, TM, printargs, "remap_file_pages" }, /* 227 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 228 */ + { 5, 0, printargs, "mq_open" }, /* 229 */ + { 5, 0, printargs, "mq_unlink" }, /* 230 */ + { 5, 0, printargs, "mq_timedsend" }, /* 231 */ + { 5, 0, printargs, "mq_timedreceive" }, /* 232 */ + { 5, 0, printargs, "mq_notify" }, /* 233 */ + { 5, 0, printargs, "mq_getsetattr" }, /* 234 */ + { 4, 0, printargs, "waitid" }, /* 235 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 236 */ + { 5, 0, sys_set_tid_address, "set_tid_address" }, /* 237 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 238 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 239 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 240 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 241 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 242 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 243 */ + { 5, TF, sys_listxattr, "listxattr" }, /* 244 */ + { 5, TF, sys_listxattr, "llistxattr" }, /* 245 */ + { 5, TD, sys_flistxattr, "flistxattr" }, /* 246 */ + { 5, TF, sys_removexattr, "removexattr" }, /* 247 */ + { 5, TF, sys_removexattr, "lremovexattr" }, /* 248 */ + { 5, TD, sys_fremovexattr, "fremovexattr" }, /* 249 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 250 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 251 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 252 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 253 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 254 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 255 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 256 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 257 */ + { 5, 0, printargs, "clock_nanosleep" }, /* 258 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 259 */ + { 5, TM, printargs, "mbind" }, /* 260 */ + { 5, TM, printargs, "get_mempolicy" }, /* 261 */ + { 5, TM, printargs, "set_mempolicy" }, /* 262 */ + { 5, 0, sys_vserver, "vserver" }, /* 263 */ + { 5, 0, sys_add_key, "add_key" }, /* 264 */ + { 4, 0, sys_request_key, "request_key" }, /* 265 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 266 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 267 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 268 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 269 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 270 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 271 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 272 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 273 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 274 */ + { 4, TD|TF, sys_openat, "openat" }, /* 275 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 276 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 277 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 278 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 279 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 280 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 281 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 282 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 283 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 284 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 285 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 286 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 287 */ + { 1, TP, sys_unshare, "unshare" }, /* 288 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 289 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 290 */ + { 6, TD, sys_splice, "splice" }, /* 291 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 292 */ + { 4, TD, sys_tee, "tee" }, /* 293 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 294 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 295 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 296 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 297 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 298 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 299 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 300 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 301 */ + { 3, TD, printargs, "signalfd" }, /* 302 */ + { 4, TD, printargs, "timerfd" }, /* 303 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 304 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 305 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 307 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 308 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 309 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 310 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 311 */ + { 3, TD, sys_dup3, "dup3" }, /* 312 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 313 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 314 */ + { 5, TD, sys_preadv, "preadv" }, /* 315 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 316 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 317 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 318 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 319 */ + { 4, TN, sys_accept4, "accept4" }, /* 320 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 321 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 322 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 323 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 324 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 325 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 326 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 327 */ + { 2, TD, sys_setns, "setns" }, /* 328 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 329 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 330 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 331 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 332 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 333 */ diff --git a/alice-strace/linux/i386/ioctlent.h.in b/alice-strace/linux/i386/ioctlent.h.in new file mode 100644 index 0000000..449ad40 --- /dev/null +++ b/alice-strace/linux/i386/ioctlent.h.in @@ -0,0 +1,15 @@ + {"asm/mtrr.h", "MTRRIOC_ADD_ENTRY", 0x4d00}, + {"asm/mce.h", "MCE_GET_RECORD_LEN", 0x4d01}, + {"asm/mtrr.h", "MTRRIOC_SET_ENTRY", 0x4d01}, + {"asm/mce.h", "MCE_GET_LOG_LEN", 0x4d02}, + {"asm/mtrr.h", "MTRRIOC_DEL_ENTRY", 0x4d02}, + {"asm/mce.h", "MCE_GETCLEAR_FLAGS", 0x4d03}, + {"asm/mtrr.h", "MTRRIOC_GET_ENTRY", 0x4d03}, + {"asm/mtrr.h", "MTRRIOC_KILL_ENTRY", 0x4d04}, + {"asm/mtrr.h", "MTRRIOC_ADD_PAGE_ENTRY", 0x4d05}, + {"asm/mtrr.h", "MTRRIOC_SET_PAGE_ENTRY", 0x4d06}, + {"asm/mtrr.h", "MTRRIOC_DEL_PAGE_ENTRY", 0x4d07}, + {"asm/mtrr.h", "MTRRIOC_GET_PAGE_ENTRY", 0x4d08}, + {"asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", 0x4d09}, + {"asm/msr.h", "X86_IOC_RDMSR_REGS", 0x63a0}, + {"asm/msr.h", "X86_IOC_WRMSR_REGS", 0x63a1}, diff --git a/alice-strace/linux/i386/syscallent.h b/alice-strace/linux/i386/syscallent.h new file mode 100644 index 0000000..480a28e --- /dev/null +++ b/alice-strace/linux/i386/syscallent.h @@ -0,0 +1,481 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_old_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, sys_vm86old, "vm86old" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_vm86, "vm86" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + + { 5, TD, sys_pread, "pread64" }, /* 180 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 181 */ + { 3, TF, sys_chown, "chown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "lchown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + + { 0, NF, sys_getgid, "getgid32" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */ + { 0, NF, sys_getegid, "getegid32" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */ + { 2, 0, sys_setregid, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, TD, sys_fchown, "fchown32" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */ + { 3, TF, sys_chown, "chown32" }, /* 212 */ + { 1, 0, sys_setuid, "setuid32" }, /* 213 */ + { 1, 0, sys_setgid, "setgid32" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 6, 0, NULL, NULL }, /* 222 */ + { 5, 0, sys_security, "security" }, /* 223 */ + { 0, 0, sys_gettid, "gettid" }, /* 224 */ + { 4, TD, sys_readahead, "readahead" }, /* 225 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 226 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 229 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 232 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 235 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */ + { 2, TS, sys_kill, "tkill" }, /* 238 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */ + { 6, 0, sys_futex, "futex" }, /* 240 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 243 */ + { 1, 0, sys_get_thread_area, "get_thread_area" }, /* 244 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 245 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 248 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */ + { 6, 0, NULL, NULL }, /* 251 */ + { 1, TP, sys_exit, "exit_group" }, /* 252 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 253 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 254 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 257 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 258 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 259 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 268 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 269 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 270 */ + { 2, TF, sys_utimes, "utimes" }, /* 271 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */ + { 5, 0, sys_vserver, "vserver" }, /* 273 */ + { 6, TM, sys_mbind, "mbind" }, /* 274 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 275 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 276 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 277 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 280 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */ + { 5, TP, sys_waitid, "waitid" }, /* 284 */ + { 6, 0, NULL, NULL }, /* 285 */ + { 5, 0, sys_add_key, "add_key" }, /* 286 */ + { 4, 0, sys_request_key, "request_key" }, /* 287 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 288 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */ + { 4, TD|TF, sys_openat, "openat" }, /* 295 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 300 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 303 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 308 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 309 */ + { 1, TP, sys_unshare, "unshare" }, /* 310 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 311 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 312 */ + { 6, TD, sys_splice, "splice" }, /* 313 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 314 */ + { 4, TD, sys_tee, "tee" }, /* 315 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 316 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 317 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 318 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 322 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 323 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 324 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 329 */ + { 3, TD, sys_dup3, "dup3" }, /* 330 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 331 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 332 */ + { 5, TD, sys_preadv, "preadv" }, /* 333 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 334 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 335 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 336 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 337 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 338 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 339 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 340 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 341 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 342 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 343 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 344 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 345 */ + { 2, TD, sys_setns, "setns" }, /* 346 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 347 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 348 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 349 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 350 */ + { 5, 0, NULL, NULL }, /* 351 */ + { 5, 0, NULL, NULL }, /* 352 */ + { 5, 0, NULL, NULL }, /* 353 */ + { 5, 0, NULL, NULL }, /* 354 */ + { 5, 0, NULL, NULL }, /* 355 */ + { 5, 0, NULL, NULL }, /* 356 */ + { 5, 0, NULL, NULL }, /* 357 */ + { 5, 0, NULL, NULL }, /* 358 */ + { 5, 0, NULL, NULL }, /* 359 */ + { 5, 0, NULL, NULL }, /* 360 */ + { 5, 0, NULL, NULL }, /* 361 */ + { 5, 0, NULL, NULL }, /* 362 */ + { 5, 0, NULL, NULL }, /* 363 */ + { 5, 0, NULL, NULL }, /* 364 */ + { 5, 0, NULL, NULL }, /* 365 */ + { 5, 0, NULL, NULL }, /* 366 */ + { 5, 0, NULL, NULL }, /* 367 */ + { 5, 0, NULL, NULL }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ diff --git a/alice-strace/linux/ia64/ioctlent.h.in b/alice-strace/linux/ia64/ioctlent.h.in new file mode 100644 index 0000000..970ba55 --- /dev/null +++ b/alice-strace/linux/ia64/ioctlent.h.in @@ -0,0 +1,66 @@ + {"asm/ioctls.h", "TCGETS", 0x5401}, + {"asm/ioctls.h", "TCSETS", 0x5402}, + {"asm/ioctls.h", "TCSETSW", 0x5403}, + {"asm/ioctls.h", "TCSETSF", 0x5404}, + {"asm/ioctls.h", "TCGETA", 0x5405}, + {"asm/ioctls.h", "TCSETA", 0x5406}, + {"asm/ioctls.h", "TCSETAW", 0x5407}, + {"asm/ioctls.h", "TCSETAF", 0x5408}, + {"asm/ioctls.h", "TCSBRK", 0x5409}, + {"asm/ioctls.h", "TCXONC", 0x540a}, + {"asm/ioctls.h", "TCFLSH", 0x540b}, + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCGPGRP", 0x540f}, + {"asm/ioctls.h", "TIOCSPGRP", 0x5410}, + {"asm/ioctls.h", "TIOCOUTQ", 0x5411}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x5413}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x5414}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "FIONREAD", 0x541b}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "FIONBIO", 0x5421}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "FIONCLEX", 0x5450}, + {"asm/ioctls.h", "FIOCLEX", 0x5451}, + {"asm/ioctls.h", "FIOASYNC", 0x5452}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e}, + {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f}, + {"asm/ioctls.h", "FIOQSIZE", 0x5460}, + {"asm/sockios.h", "FIOSETOWN", 0x8901}, + {"asm/sockios.h", "SIOCSPGRP", 0x8902}, + {"asm/sockios.h", "FIOGETOWN", 0x8903}, + {"asm/sockios.h", "SIOCGPGRP", 0x8904}, + {"asm/sockios.h", "SIOCATMARK", 0x8905}, + {"asm/sockios.h", "SIOCGSTAMP", 0x8906}, diff --git a/alice-strace/linux/ia64/signalent.h b/alice-strace/linux/ia64/signalent.h new file mode 100644 index 0000000..e791a64 --- /dev/null +++ b/alice-strace/linux/ia64/signalent.h @@ -0,0 +1,64 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGBUS", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGUSR1", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGUSR2", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGSTKFLT", /* 16 */ + "SIGCHLD", /* 17 */ + "SIGCONT", /* 18 */ + "SIGSTOP", /* 19 */ + "SIGTSTP", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGURG", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGIO", /* 29 */ + "SIGPWR", /* 30 */ + "SIGSYS", /* 31 */ + "SIGRT0", /* 32 */ + "SIGRT1", /* 33 */ + "SIGRT2", /* 34 */ + "SIGRT3", /* 35 */ + "SIGRT4", /* 36 */ + "SIGRT5", /* 37 */ + "SIGRT6", /* 38 */ + "SIGRT7", /* 39 */ + "SIGRT8", /* 40 */ + "SIGRT9", /* 41 */ + "SIGRT10", /* 42 */ + "SIGRT11", /* 43 */ + "SIGRT12", /* 44 */ + "SIGRT13", /* 45 */ + "SIGRT14", /* 46 */ + "SIGRT15", /* 47 */ + "SIGRT16", /* 48 */ + "SIGRT17", /* 49 */ + "SIGRT18", /* 50 */ + "SIGRT19", /* 51 */ + "SIGRT20", /* 52 */ + "SIGRT21", /* 53 */ + "SIGRT22", /* 54 */ + "SIGRT23", /* 55 */ + "SIGRT24", /* 56 */ + "SIGRT25", /* 57 */ + "SIGRT26", /* 58 */ + "SIGRT27", /* 59 */ + "SIGRT28", /* 60 */ + "SIGRT29", /* 61 */ + "SIGRT30", /* 62 */ + "SIGRT31", /* 63 */ diff --git a/alice-strace/linux/ia64/syscallent.h b/alice-strace/linux/ia64/syscallent.h new file mode 100644 index 0000000..0242280 --- /dev/null +++ b/alice-strace/linux/ia64/syscallent.h @@ -0,0 +1,1120 @@ +/* + * Copyright (c) 1999, 2001 Hewlett-Packard Co + * David Mosberger-Tang + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * IA-32 syscalls that have pointer arguments which are incompatible + * with 64-bit layout get redirected to printargs. + */ +#define sys_getrlimit printargs +#define sys_afs_syscall printargs +#define sys_getpmsg printargs +#define sys_putpmsg printargs +#define sys_ugetrlimit printargs +#define sys_waitpid printargs +#define sys_time printargs +#define sys_break printargs +#define sys_oldstat printargs +#define sys_lseek printargs +#define sys_stime printargs +#define sys_ptrace printargs +#define sys_oldfstat printargs +#define sys_pause printargs +#define sys_utime printargs +#define sys_stty printargs +#define sys_gtty printargs +#define sys_ftime printargs +#define sys_pipe printargs +#define sys_times printargs +#define sys_prof printargs +#define sys_signal printargs +#define sys_lock printargs +#define sys_ioctl printargs +#define sys_fcntl printargs +#define sys_mpx printargs +#define sys_ulimit printargs +#define sys_oldolduname printargs +#define sys_sigaction printargs +#define sys_siggetmask printargs +#define sys_sigsetmask printargs +#define sys_sigsuspend printargs +#define sys_sigpending printargs +#define sys_setrlimit printargs +#define sys_getrusage printargs +#define sys_gettimeofday printargs +#define sys_settimeofday printargs +#define sys_getgroups printargs +#define sys_setgroups printargs +#define sys_select printargs +#undef sys_oldlstat +#define sys_oldlstat printargs +#define sys_readdir printargs +#define sys_profil printargs +#define sys_statfs printargs +#define sys_fstatfs printargs +#define sys_ioperm printargs +#define sys_setitimer printargs +#define sys_getitimer printargs +#define sys_stat printargs +#undef sys_lstat +#define sys_lstat printargs +#define sys_fstat printargs +#define sys_olduname printargs +#define sys_iopl printargs +#define sys_idle printargs +#define sys_vm86old printargs +#define sys_wait4 printargs +#define sys_sysinfo printargs +#define sys_sigreturn printargs +#define sys_uname printargs +#define sys_modify_ldt printargs +#define sys_adjtimex printargs +#define sys_sigprocmask printargs +#define sys_create_module printargs +#define sys_init_module printargs +#define sys_get_kernel_syms printargs +#define sys_quotactl printargs +#define sys_bdflush printargs +#define sys_personality printargs +#define sys_getdents printargs +#define sys__newselect printargs +#define sys_msync printargs +#define sys_readv printargs +#define sys_writev printargs +#define sys__sysctl printargs +#define sys_sched_rr_get_interval printargs +#define sys_getresuid printargs +#define sys_vm86 printargs +#define sys_query_module printargs +#define sys_nfsservctl printargs +#define sys_rt_sigreturn printargs +#define sys_rt_sigaction printargs +#define sys_rt_sigprocmask printargs +#define sys_rt_sigtimedwait printargs +#define sys_rt_sigqueueinfo printargs +#define sys_rt_sigsuspend printargs +#define sys_pread printargs +#define sys_pwrite printargs +#define sys_sigaltstack printargs +#define sys_sendfile printargs +#define sys_truncate64 printargs +#define sys_ftruncate64 printargs +#define sys_stat64 printargs +#undef sys_lstat64 +#define sys_lstat64 printargs +#define sys_fstat64 printargs +#define sys_fcntl64 printargs + +#include "../i386/syscallent.h" + +#undef sys_getrlimit +#undef sys_afs_syscall +#undef sys_getpmsg +#undef sys_putpmsg +#undef sys_ugetrlimit +#undef sys_waitpid +#undef sys_time +#undef sys_break +#undef sys_oldstat +#undef sys_lseek +#undef sys_stime +#undef sys_ptrace +#undef sys_oldfstat +#undef sys_pause +#undef sys_utime +#undef sys_stty +#undef sys_gtty +#undef sys_ftime +#undef sys_pipe +#undef sys_times +#undef sys_prof +#undef sys_signal +#undef sys_lock +#undef sys_ioctl +#undef sys_fcntl +#undef sys_mpx +#undef sys_ulimit +#undef sys_oldolduname +#undef sys_sigaction +#undef sys_siggetmask +#undef sys_sigsetmask +#undef sys_sigsuspend +#undef sys_sigpending +#undef sys_setrlimit +#undef sys_getrusage +#undef sys_gettimeofday +#undef sys_settimeofday +#undef sys_getgroups +#undef sys_setgroups +#undef sys_select +#undef sys_oldlstat +#undef sys_readdir +#undef sys_profil +#undef sys_statfs +#undef sys_fstatfs +#undef sys_ioperm +#undef sys_setitimer +#undef sys_getitimer +#undef sys_stat +#undef sys_lstat +#undef sys_fstat +#undef sys_olduname +#undef sys_iopl +#undef sys_idle +#undef sys_vm86old +#undef sys_wait4 +#undef sys_sysinfo +#undef sys_sigreturn +#undef sys_uname +#undef sys_modify_ldt +#undef sys_adjtimex +#undef sys_sigprocmask +#undef sys_create_module +#undef sys_init_module +#undef sys_get_kernel_syms +#undef sys_quotactl +#undef sys_bdflush +#undef sys_personality +#undef sys_getdents +#undef sys__newselect +#undef sys_msync +#undef sys_readv +#undef sys_writev +#undef sys__sysctl +#undef sys_sched_rr_get_interval +#undef sys_getresuid +#undef sys_vm86 +#undef sys_query_module +#undef sys_nfsservctl +#undef sys_rt_sigreturn +#undef sys_rt_sigaction +#undef sys_rt_sigprocmask +#undef sys_rt_sigtimedwait +#undef sys_rt_sigqueueinfo +#undef sys_rt_sigsuspend +#undef sys_pread +#undef sys_pwrite +#undef sys_sigaltstack +#undef sys_sendfile +#undef sys_truncate64 +#undef sys_ftruncate64 +#undef sys_stat64 +#undef sys_lstat64 +#undef sys_fstat64 +#undef sys_fcntl64 + +#include "../dummy.h" + +/* You must be careful to check ../i386/syscallent.h so that this table + starts where that one leaves off. +*/ +#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 445 +# error fix me +#endif + + { MA, 0, NULL, NULL }, /* 445 */ + { MA, 0, NULL, NULL }, /* 446 */ + { MA, 0, NULL, NULL }, /* 447 */ + { MA, 0, NULL, NULL }, /* 448 */ + { MA, 0, NULL, NULL }, /* 449 */ + { MA, 0, NULL, NULL }, /* 450 */ + { MA, 0, NULL, NULL }, /* 451 */ + { MA, 0, NULL, NULL }, /* 452 */ + { MA, 0, NULL, NULL }, /* 453 */ + { MA, 0, NULL, NULL }, /* 454 */ + { MA, 0, NULL, NULL }, /* 455 */ + { MA, 0, NULL, NULL }, /* 456 */ + { MA, 0, NULL, NULL }, /* 457 */ + { MA, 0, NULL, NULL }, /* 458 */ + { MA, 0, NULL, NULL }, /* 459 */ + { MA, 0, NULL, NULL }, /* 460 */ + { MA, 0, NULL, NULL }, /* 461 */ + { MA, 0, NULL, NULL }, /* 462 */ + { MA, 0, NULL, NULL }, /* 463 */ + { MA, 0, NULL, NULL }, /* 464 */ + { MA, 0, NULL, NULL }, /* 465 */ + { MA, 0, NULL, NULL }, /* 466 */ + { MA, 0, NULL, NULL }, /* 467 */ + { MA, 0, NULL, NULL }, /* 468 */ + { MA, 0, NULL, NULL }, /* 469 */ + { MA, 0, NULL, NULL }, /* 470 */ + { MA, 0, NULL, NULL }, /* 471 */ + { MA, 0, NULL, NULL }, /* 472 */ + { MA, 0, NULL, NULL }, /* 473 */ + { MA, 0, NULL, NULL }, /* 474 */ + { MA, 0, NULL, NULL }, /* 475 */ + { MA, 0, NULL, NULL }, /* 476 */ + { MA, 0, NULL, NULL }, /* 477 */ + { MA, 0, NULL, NULL }, /* 478 */ + { MA, 0, NULL, NULL }, /* 479 */ + { MA, 0, NULL, NULL }, /* 480 */ + { MA, 0, NULL, NULL }, /* 481 */ + { MA, 0, NULL, NULL }, /* 482 */ + { MA, 0, NULL, NULL }, /* 483 */ + { MA, 0, NULL, NULL }, /* 484 */ + { MA, 0, NULL, NULL }, /* 485 */ + { MA, 0, NULL, NULL }, /* 486 */ + { MA, 0, NULL, NULL }, /* 487 */ + { MA, 0, NULL, NULL }, /* 488 */ + { MA, 0, NULL, NULL }, /* 489 */ + { MA, 0, NULL, NULL }, /* 490 */ + { MA, 0, NULL, NULL }, /* 491 */ + { MA, 0, NULL, NULL }, /* 492 */ + { MA, 0, NULL, NULL }, /* 493 */ + { MA, 0, NULL, NULL }, /* 494 */ + { MA, 0, NULL, NULL }, /* 495 */ + { MA, 0, NULL, NULL }, /* 496 */ + { MA, 0, NULL, NULL }, /* 497 */ + { MA, 0, NULL, NULL }, /* 498 */ + { MA, 0, NULL, NULL }, /* 499 */ + { MA, 0, NULL, NULL }, /* 500 */ + { MA, 0, NULL, NULL }, /* 501 */ + { MA, 0, NULL, NULL }, /* 502 */ + { MA, 0, NULL, NULL }, /* 503 */ + { MA, 0, NULL, NULL }, /* 504 */ + { MA, 0, NULL, NULL }, /* 505 */ + { MA, 0, NULL, NULL }, /* 506 */ + { MA, 0, NULL, NULL }, /* 507 */ + { MA, 0, NULL, NULL }, /* 508 */ + { MA, 0, NULL, NULL }, /* 509 */ + { MA, 0, NULL, NULL }, /* 510 */ + { MA, 0, NULL, NULL }, /* 511 */ + { MA, 0, NULL, NULL }, /* 512 */ + { MA, 0, NULL, NULL }, /* 513 */ + { MA, 0, NULL, NULL }, /* 514 */ + { MA, 0, NULL, NULL }, /* 515 */ + { MA, 0, NULL, NULL }, /* 516 */ + { MA, 0, NULL, NULL }, /* 517 */ + { MA, 0, NULL, NULL }, /* 518 */ + { MA, 0, NULL, NULL }, /* 519 */ + { MA, 0, NULL, NULL }, /* 520 */ + { MA, 0, NULL, NULL }, /* 521 */ + { MA, 0, NULL, NULL }, /* 522 */ + { MA, 0, NULL, NULL }, /* 523 */ + { MA, 0, NULL, NULL }, /* 524 */ + { MA, 0, NULL, NULL }, /* 525 */ + { MA, 0, NULL, NULL }, /* 526 */ + { MA, 0, NULL, NULL }, /* 527 */ + { MA, 0, NULL, NULL }, /* 528 */ + { MA, 0, NULL, NULL }, /* 529 */ + { MA, 0, NULL, NULL }, /* 530 */ + { MA, 0, NULL, NULL }, /* 531 */ + { MA, 0, NULL, NULL }, /* 532 */ + { MA, 0, NULL, NULL }, /* 533 */ + { MA, 0, NULL, NULL }, /* 534 */ + { MA, 0, NULL, NULL }, /* 535 */ + { MA, 0, NULL, NULL }, /* 536 */ + { MA, 0, NULL, NULL }, /* 537 */ + { MA, 0, NULL, NULL }, /* 538 */ + { MA, 0, NULL, NULL }, /* 539 */ + { MA, 0, NULL, NULL }, /* 540 */ + { MA, 0, NULL, NULL }, /* 541 */ + { MA, 0, NULL, NULL }, /* 542 */ + { MA, 0, NULL, NULL }, /* 543 */ + { MA, 0, NULL, NULL }, /* 544 */ + { MA, 0, NULL, NULL }, /* 545 */ + { MA, 0, NULL, NULL }, /* 546 */ + { MA, 0, NULL, NULL }, /* 547 */ + { MA, 0, NULL, NULL }, /* 548 */ + { MA, 0, NULL, NULL }, /* 549 */ + { MA, 0, NULL, NULL }, /* 550 */ + { MA, 0, NULL, NULL }, /* 551 */ + { MA, 0, NULL, NULL }, /* 552 */ + { MA, 0, NULL, NULL }, /* 553 */ + { MA, 0, NULL, NULL }, /* 554 */ + { MA, 0, NULL, NULL }, /* 555 */ + { MA, 0, NULL, NULL }, /* 556 */ + { MA, 0, NULL, NULL }, /* 557 */ + { MA, 0, NULL, NULL }, /* 558 */ + { MA, 0, NULL, NULL }, /* 559 */ + { MA, 0, NULL, NULL }, /* 560 */ + { MA, 0, NULL, NULL }, /* 561 */ + { MA, 0, NULL, NULL }, /* 562 */ + { MA, 0, NULL, NULL }, /* 563 */ + { MA, 0, NULL, NULL }, /* 564 */ + { MA, 0, NULL, NULL }, /* 565 */ + { MA, 0, NULL, NULL }, /* 566 */ + { MA, 0, NULL, NULL }, /* 567 */ + { MA, 0, NULL, NULL }, /* 568 */ + { MA, 0, NULL, NULL }, /* 569 */ + { MA, 0, NULL, NULL }, /* 570 */ + { MA, 0, NULL, NULL }, /* 571 */ + { MA, 0, NULL, NULL }, /* 572 */ + { MA, 0, NULL, NULL }, /* 573 */ + { MA, 0, NULL, NULL }, /* 574 */ + { MA, 0, NULL, NULL }, /* 575 */ + { MA, 0, NULL, NULL }, /* 576 */ + { MA, 0, NULL, NULL }, /* 577 */ + { MA, 0, NULL, NULL }, /* 578 */ + { MA, 0, NULL, NULL }, /* 579 */ + { MA, 0, NULL, NULL }, /* 580 */ + { MA, 0, NULL, NULL }, /* 581 */ + { MA, 0, NULL, NULL }, /* 582 */ + { MA, 0, NULL, NULL }, /* 583 */ + { MA, 0, NULL, NULL }, /* 584 */ + { MA, 0, NULL, NULL }, /* 585 */ + { MA, 0, NULL, NULL }, /* 586 */ + { MA, 0, NULL, NULL }, /* 587 */ + { MA, 0, NULL, NULL }, /* 588 */ + { MA, 0, NULL, NULL }, /* 589 */ + { MA, 0, NULL, NULL }, /* 590 */ + { MA, 0, NULL, NULL }, /* 591 */ + { MA, 0, NULL, NULL }, /* 592 */ + { MA, 0, NULL, NULL }, /* 593 */ + { MA, 0, NULL, NULL }, /* 594 */ + { MA, 0, NULL, NULL }, /* 595 */ + { MA, 0, NULL, NULL }, /* 596 */ + { MA, 0, NULL, NULL }, /* 597 */ + { MA, 0, NULL, NULL }, /* 598 */ + { MA, 0, NULL, NULL }, /* 599 */ + { MA, 0, NULL, NULL }, /* 600 */ + { MA, 0, NULL, NULL }, /* 601 */ + { MA, 0, NULL, NULL }, /* 602 */ + { MA, 0, NULL, NULL }, /* 603 */ + { MA, 0, NULL, NULL }, /* 604 */ + { MA, 0, NULL, NULL }, /* 605 */ + { MA, 0, NULL, NULL }, /* 606 */ + { MA, 0, NULL, NULL }, /* 607 */ + { MA, 0, NULL, NULL }, /* 608 */ + { MA, 0, NULL, NULL }, /* 609 */ + { MA, 0, NULL, NULL }, /* 610 */ + { MA, 0, NULL, NULL }, /* 611 */ + { MA, 0, NULL, NULL }, /* 612 */ + { MA, 0, NULL, NULL }, /* 613 */ + { MA, 0, NULL, NULL }, /* 614 */ + { MA, 0, NULL, NULL }, /* 615 */ + { MA, 0, NULL, NULL }, /* 616 */ + { MA, 0, NULL, NULL }, /* 617 */ + { MA, 0, NULL, NULL }, /* 618 */ + { MA, 0, NULL, NULL }, /* 619 */ + { MA, 0, NULL, NULL }, /* 620 */ + { MA, 0, NULL, NULL }, /* 621 */ + { MA, 0, NULL, NULL }, /* 622 */ + { MA, 0, NULL, NULL }, /* 623 */ + { MA, 0, NULL, NULL }, /* 624 */ + { MA, 0, NULL, NULL }, /* 625 */ + { MA, 0, NULL, NULL }, /* 626 */ + { MA, 0, NULL, NULL }, /* 627 */ + { MA, 0, NULL, NULL }, /* 628 */ + { MA, 0, NULL, NULL }, /* 629 */ + { MA, 0, NULL, NULL }, /* 630 */ + { MA, 0, NULL, NULL }, /* 631 */ + { MA, 0, NULL, NULL }, /* 632 */ + { MA, 0, NULL, NULL }, /* 633 */ + { MA, 0, NULL, NULL }, /* 634 */ + { MA, 0, NULL, NULL }, /* 635 */ + { MA, 0, NULL, NULL }, /* 636 */ + { MA, 0, NULL, NULL }, /* 637 */ + { MA, 0, NULL, NULL }, /* 638 */ + { MA, 0, NULL, NULL }, /* 639 */ + { MA, 0, NULL, NULL }, /* 640 */ + { MA, 0, NULL, NULL }, /* 641 */ + { MA, 0, NULL, NULL }, /* 642 */ + { MA, 0, NULL, NULL }, /* 643 */ + { MA, 0, NULL, NULL }, /* 644 */ + { MA, 0, NULL, NULL }, /* 645 */ + { MA, 0, NULL, NULL }, /* 646 */ + { MA, 0, NULL, NULL }, /* 647 */ + { MA, 0, NULL, NULL }, /* 648 */ + { MA, 0, NULL, NULL }, /* 649 */ + { MA, 0, NULL, NULL }, /* 650 */ + { MA, 0, NULL, NULL }, /* 651 */ + { MA, 0, NULL, NULL }, /* 652 */ + { MA, 0, NULL, NULL }, /* 653 */ + { MA, 0, NULL, NULL }, /* 654 */ + { MA, 0, NULL, NULL }, /* 655 */ + { MA, 0, NULL, NULL }, /* 656 */ + { MA, 0, NULL, NULL }, /* 657 */ + { MA, 0, NULL, NULL }, /* 658 */ + { MA, 0, NULL, NULL }, /* 659 */ + { MA, 0, NULL, NULL }, /* 660 */ + { MA, 0, NULL, NULL }, /* 661 */ + { MA, 0, NULL, NULL }, /* 662 */ + { MA, 0, NULL, NULL }, /* 663 */ + { MA, 0, NULL, NULL }, /* 664 */ + { MA, 0, NULL, NULL }, /* 665 */ + { MA, 0, NULL, NULL }, /* 666 */ + { MA, 0, NULL, NULL }, /* 667 */ + { MA, 0, NULL, NULL }, /* 668 */ + { MA, 0, NULL, NULL }, /* 669 */ + { MA, 0, NULL, NULL }, /* 670 */ + { MA, 0, NULL, NULL }, /* 671 */ + { MA, 0, NULL, NULL }, /* 672 */ + { MA, 0, NULL, NULL }, /* 673 */ + { MA, 0, NULL, NULL }, /* 674 */ + { MA, 0, NULL, NULL }, /* 675 */ + { MA, 0, NULL, NULL }, /* 676 */ + { MA, 0, NULL, NULL }, /* 677 */ + { MA, 0, NULL, NULL }, /* 678 */ + { MA, 0, NULL, NULL }, /* 679 */ + { MA, 0, NULL, NULL }, /* 680 */ + { MA, 0, NULL, NULL }, /* 681 */ + { MA, 0, NULL, NULL }, /* 682 */ + { MA, 0, NULL, NULL }, /* 683 */ + { MA, 0, NULL, NULL }, /* 684 */ + { MA, 0, NULL, NULL }, /* 685 */ + { MA, 0, NULL, NULL }, /* 686 */ + { MA, 0, NULL, NULL }, /* 687 */ + { MA, 0, NULL, NULL }, /* 688 */ + { MA, 0, NULL, NULL }, /* 689 */ + { MA, 0, NULL, NULL }, /* 690 */ + { MA, 0, NULL, NULL }, /* 691 */ + { MA, 0, NULL, NULL }, /* 692 */ + { MA, 0, NULL, NULL }, /* 693 */ + { MA, 0, NULL, NULL }, /* 694 */ + { MA, 0, NULL, NULL }, /* 695 */ + { MA, 0, NULL, NULL }, /* 696 */ + { MA, 0, NULL, NULL }, /* 697 */ + { MA, 0, NULL, NULL }, /* 698 */ + { MA, 0, NULL, NULL }, /* 699 */ + { MA, 0, NULL, NULL }, /* 700 */ + { MA, 0, NULL, NULL }, /* 701 */ + { MA, 0, NULL, NULL }, /* 702 */ + { MA, 0, NULL, NULL }, /* 703 */ + { MA, 0, NULL, NULL }, /* 704 */ + { MA, 0, NULL, NULL }, /* 705 */ + { MA, 0, NULL, NULL }, /* 706 */ + { MA, 0, NULL, NULL }, /* 707 */ + { MA, 0, NULL, NULL }, /* 708 */ + { MA, 0, NULL, NULL }, /* 709 */ + { MA, 0, NULL, NULL }, /* 710 */ + { MA, 0, NULL, NULL }, /* 711 */ + { MA, 0, NULL, NULL }, /* 712 */ + { MA, 0, NULL, NULL }, /* 713 */ + { MA, 0, NULL, NULL }, /* 714 */ + { MA, 0, NULL, NULL }, /* 715 */ + { MA, 0, NULL, NULL }, /* 716 */ + { MA, 0, NULL, NULL }, /* 717 */ + { MA, 0, NULL, NULL }, /* 718 */ + { MA, 0, NULL, NULL }, /* 719 */ + { MA, 0, NULL, NULL }, /* 720 */ + { MA, 0, NULL, NULL }, /* 721 */ + { MA, 0, NULL, NULL }, /* 722 */ + { MA, 0, NULL, NULL }, /* 723 */ + { MA, 0, NULL, NULL }, /* 724 */ + { MA, 0, NULL, NULL }, /* 725 */ + { MA, 0, NULL, NULL }, /* 726 */ + { MA, 0, NULL, NULL }, /* 727 */ + { MA, 0, NULL, NULL }, /* 728 */ + { MA, 0, NULL, NULL }, /* 729 */ + { MA, 0, NULL, NULL }, /* 730 */ + { MA, 0, NULL, NULL }, /* 731 */ + { MA, 0, NULL, NULL }, /* 732 */ + { MA, 0, NULL, NULL }, /* 733 */ + { MA, 0, NULL, NULL }, /* 734 */ + { MA, 0, NULL, NULL }, /* 735 */ + { MA, 0, NULL, NULL }, /* 736 */ + { MA, 0, NULL, NULL }, /* 737 */ + { MA, 0, NULL, NULL }, /* 738 */ + { MA, 0, NULL, NULL }, /* 739 */ + { MA, 0, NULL, NULL }, /* 740 */ + { MA, 0, NULL, NULL }, /* 741 */ + { MA, 0, NULL, NULL }, /* 742 */ + { MA, 0, NULL, NULL }, /* 743 */ + { MA, 0, NULL, NULL }, /* 744 */ + { MA, 0, NULL, NULL }, /* 745 */ + { MA, 0, NULL, NULL }, /* 746 */ + { MA, 0, NULL, NULL }, /* 747 */ + { MA, 0, NULL, NULL }, /* 748 */ + { MA, 0, NULL, NULL }, /* 749 */ + { MA, 0, NULL, NULL }, /* 750 */ + { MA, 0, NULL, NULL }, /* 751 */ + { MA, 0, NULL, NULL }, /* 752 */ + { MA, 0, NULL, NULL }, /* 753 */ + { MA, 0, NULL, NULL }, /* 754 */ + { MA, 0, NULL, NULL }, /* 755 */ + { MA, 0, NULL, NULL }, /* 756 */ + { MA, 0, NULL, NULL }, /* 757 */ + { MA, 0, NULL, NULL }, /* 758 */ + { MA, 0, NULL, NULL }, /* 759 */ + { MA, 0, NULL, NULL }, /* 760 */ + { MA, 0, NULL, NULL }, /* 761 */ + { MA, 0, NULL, NULL }, /* 762 */ + { MA, 0, NULL, NULL }, /* 763 */ + { MA, 0, NULL, NULL }, /* 764 */ + { MA, 0, NULL, NULL }, /* 765 */ + { MA, 0, NULL, NULL }, /* 766 */ + { MA, 0, NULL, NULL }, /* 767 */ + { MA, 0, NULL, NULL }, /* 768 */ + { MA, 0, NULL, NULL }, /* 769 */ + { MA, 0, NULL, NULL }, /* 770 */ + { MA, 0, NULL, NULL }, /* 771 */ + { MA, 0, NULL, NULL }, /* 772 */ + { MA, 0, NULL, NULL }, /* 773 */ + { MA, 0, NULL, NULL }, /* 774 */ + { MA, 0, NULL, NULL }, /* 775 */ + { MA, 0, NULL, NULL }, /* 776 */ + { MA, 0, NULL, NULL }, /* 777 */ + { MA, 0, NULL, NULL }, /* 778 */ + { MA, 0, NULL, NULL }, /* 779 */ + { MA, 0, NULL, NULL }, /* 780 */ + { MA, 0, NULL, NULL }, /* 781 */ + { MA, 0, NULL, NULL }, /* 782 */ + { MA, 0, NULL, NULL }, /* 783 */ + { MA, 0, NULL, NULL }, /* 784 */ + { MA, 0, NULL, NULL }, /* 785 */ + { MA, 0, NULL, NULL }, /* 786 */ + { MA, 0, NULL, NULL }, /* 787 */ + { MA, 0, NULL, NULL }, /* 788 */ + { MA, 0, NULL, NULL }, /* 789 */ + { MA, 0, NULL, NULL }, /* 790 */ + { MA, 0, NULL, NULL }, /* 791 */ + { MA, 0, NULL, NULL }, /* 792 */ + { MA, 0, NULL, NULL }, /* 793 */ + { MA, 0, NULL, NULL }, /* 794 */ + { MA, 0, NULL, NULL }, /* 795 */ + { MA, 0, NULL, NULL }, /* 796 */ + { MA, 0, NULL, NULL }, /* 797 */ + { MA, 0, NULL, NULL }, /* 798 */ + { MA, 0, NULL, NULL }, /* 799 */ + { MA, 0, NULL, NULL }, /* 800 */ + { MA, 0, NULL, NULL }, /* 801 */ + { MA, 0, NULL, NULL }, /* 802 */ + { MA, 0, NULL, NULL }, /* 803 */ + { MA, 0, NULL, NULL }, /* 804 */ + { MA, 0, NULL, NULL }, /* 805 */ + { MA, 0, NULL, NULL }, /* 806 */ + { MA, 0, NULL, NULL }, /* 807 */ + { MA, 0, NULL, NULL }, /* 808 */ + { MA, 0, NULL, NULL }, /* 809 */ + { MA, 0, NULL, NULL }, /* 810 */ + { MA, 0, NULL, NULL }, /* 811 */ + { MA, 0, NULL, NULL }, /* 812 */ + { MA, 0, NULL, NULL }, /* 813 */ + { MA, 0, NULL, NULL }, /* 814 */ + { MA, 0, NULL, NULL }, /* 815 */ + { MA, 0, NULL, NULL }, /* 816 */ + { MA, 0, NULL, NULL }, /* 817 */ + { MA, 0, NULL, NULL }, /* 818 */ + { MA, 0, NULL, NULL }, /* 819 */ + { MA, 0, NULL, NULL }, /* 820 */ + { MA, 0, NULL, NULL }, /* 821 */ + { MA, 0, NULL, NULL }, /* 822 */ + { MA, 0, NULL, NULL }, /* 823 */ + { MA, 0, NULL, NULL }, /* 824 */ + { MA, 0, NULL, NULL }, /* 825 */ + { MA, 0, NULL, NULL }, /* 826 */ + { MA, 0, NULL, NULL }, /* 827 */ + { MA, 0, NULL, NULL }, /* 828 */ + { MA, 0, NULL, NULL }, /* 829 */ + { MA, 0, NULL, NULL }, /* 830 */ + { MA, 0, NULL, NULL }, /* 831 */ + { MA, 0, NULL, NULL }, /* 832 */ + { MA, 0, NULL, NULL }, /* 833 */ + { MA, 0, NULL, NULL }, /* 834 */ + { MA, 0, NULL, NULL }, /* 835 */ + { MA, 0, NULL, NULL }, /* 836 */ + { MA, 0, NULL, NULL }, /* 837 */ + { MA, 0, NULL, NULL }, /* 838 */ + { MA, 0, NULL, NULL }, /* 839 */ + { MA, 0, NULL, NULL }, /* 840 */ + { MA, 0, NULL, NULL }, /* 841 */ + { MA, 0, NULL, NULL }, /* 842 */ + { MA, 0, NULL, NULL }, /* 843 */ + { MA, 0, NULL, NULL }, /* 844 */ + { MA, 0, NULL, NULL }, /* 845 */ + { MA, 0, NULL, NULL }, /* 846 */ + { MA, 0, NULL, NULL }, /* 847 */ + { MA, 0, NULL, NULL }, /* 848 */ + { MA, 0, NULL, NULL }, /* 849 */ + { MA, 0, NULL, NULL }, /* 850 */ + { MA, 0, NULL, NULL }, /* 851 */ + { MA, 0, NULL, NULL }, /* 852 */ + { MA, 0, NULL, NULL }, /* 853 */ + { MA, 0, NULL, NULL }, /* 854 */ + { MA, 0, NULL, NULL }, /* 855 */ + { MA, 0, NULL, NULL }, /* 856 */ + { MA, 0, NULL, NULL }, /* 857 */ + { MA, 0, NULL, NULL }, /* 858 */ + { MA, 0, NULL, NULL }, /* 859 */ + { MA, 0, NULL, NULL }, /* 860 */ + { MA, 0, NULL, NULL }, /* 861 */ + { MA, 0, NULL, NULL }, /* 862 */ + { MA, 0, NULL, NULL }, /* 863 */ + { MA, 0, NULL, NULL }, /* 864 */ + { MA, 0, NULL, NULL }, /* 865 */ + { MA, 0, NULL, NULL }, /* 866 */ + { MA, 0, NULL, NULL }, /* 867 */ + { MA, 0, NULL, NULL }, /* 868 */ + { MA, 0, NULL, NULL }, /* 869 */ + { MA, 0, NULL, NULL }, /* 870 */ + { MA, 0, NULL, NULL }, /* 871 */ + { MA, 0, NULL, NULL }, /* 872 */ + { MA, 0, NULL, NULL }, /* 873 */ + { MA, 0, NULL, NULL }, /* 874 */ + { MA, 0, NULL, NULL }, /* 875 */ + { MA, 0, NULL, NULL }, /* 876 */ + { MA, 0, NULL, NULL }, /* 877 */ + { MA, 0, NULL, NULL }, /* 878 */ + { MA, 0, NULL, NULL }, /* 879 */ + { MA, 0, NULL, NULL }, /* 880 */ + { MA, 0, NULL, NULL }, /* 881 */ + { MA, 0, NULL, NULL }, /* 882 */ + { MA, 0, NULL, NULL }, /* 883 */ + { MA, 0, NULL, NULL }, /* 884 */ + { MA, 0, NULL, NULL }, /* 885 */ + { MA, 0, NULL, NULL }, /* 886 */ + { MA, 0, NULL, NULL }, /* 887 */ + { MA, 0, NULL, NULL }, /* 888 */ + { MA, 0, NULL, NULL }, /* 889 */ + { MA, 0, NULL, NULL }, /* 890 */ + { MA, 0, NULL, NULL }, /* 891 */ + { MA, 0, NULL, NULL }, /* 892 */ + { MA, 0, NULL, NULL }, /* 893 */ + { MA, 0, NULL, NULL }, /* 894 */ + { MA, 0, NULL, NULL }, /* 895 */ + { MA, 0, NULL, NULL }, /* 896 */ + { MA, 0, NULL, NULL }, /* 897 */ + { MA, 0, NULL, NULL }, /* 898 */ + { MA, 0, NULL, NULL }, /* 899 */ + { MA, 0, NULL, NULL }, /* 900 */ + { MA, 0, NULL, NULL }, /* 901 */ + { MA, 0, NULL, NULL }, /* 902 */ + { MA, 0, NULL, NULL }, /* 903 */ + { MA, 0, NULL, NULL }, /* 904 */ + { MA, 0, NULL, NULL }, /* 905 */ + { MA, 0, NULL, NULL }, /* 906 */ + { MA, 0, NULL, NULL }, /* 907 */ + { MA, 0, NULL, NULL }, /* 908 */ + { MA, 0, NULL, NULL }, /* 909 */ + { MA, 0, NULL, NULL }, /* 910 */ + { MA, 0, NULL, NULL }, /* 911 */ + { MA, 0, NULL, NULL }, /* 912 */ + { MA, 0, NULL, NULL }, /* 913 */ + { MA, 0, NULL, NULL }, /* 914 */ + { MA, 0, NULL, NULL }, /* 915 */ + { MA, 0, NULL, NULL }, /* 916 */ + { MA, 0, NULL, NULL }, /* 917 */ + { MA, 0, NULL, NULL }, /* 918 */ + { MA, 0, NULL, NULL }, /* 919 */ + { MA, 0, NULL, NULL }, /* 920 */ + { MA, 0, NULL, NULL }, /* 921 */ + { MA, 0, NULL, NULL }, /* 922 */ + { MA, 0, NULL, NULL }, /* 923 */ + { MA, 0, NULL, NULL }, /* 924 */ + { MA, 0, NULL, NULL }, /* 925 */ + { MA, 0, NULL, NULL }, /* 926 */ + { MA, 0, NULL, NULL }, /* 927 */ + { MA, 0, NULL, NULL }, /* 928 */ + { MA, 0, NULL, NULL }, /* 929 */ + { MA, 0, NULL, NULL }, /* 930 */ + { MA, 0, NULL, NULL }, /* 931 */ + { MA, 0, NULL, NULL }, /* 932 */ + { MA, 0, NULL, NULL }, /* 933 */ + { MA, 0, NULL, NULL }, /* 934 */ + { MA, 0, NULL, NULL }, /* 935 */ + { MA, 0, NULL, NULL }, /* 936 */ + { MA, 0, NULL, NULL }, /* 937 */ + { MA, 0, NULL, NULL }, /* 938 */ + { MA, 0, NULL, NULL }, /* 939 */ + { MA, 0, NULL, NULL }, /* 940 */ + { MA, 0, NULL, NULL }, /* 941 */ + { MA, 0, NULL, NULL }, /* 942 */ + { MA, 0, NULL, NULL }, /* 943 */ + { MA, 0, NULL, NULL }, /* 944 */ + { MA, 0, NULL, NULL }, /* 945 */ + { MA, 0, NULL, NULL }, /* 946 */ + { MA, 0, NULL, NULL }, /* 947 */ + { MA, 0, NULL, NULL }, /* 948 */ + { MA, 0, NULL, NULL }, /* 949 */ + { MA, 0, NULL, NULL }, /* 950 */ + { MA, 0, NULL, NULL }, /* 951 */ + { MA, 0, NULL, NULL }, /* 952 */ + { MA, 0, NULL, NULL }, /* 953 */ + { MA, 0, NULL, NULL }, /* 954 */ + { MA, 0, NULL, NULL }, /* 955 */ + { MA, 0, NULL, NULL }, /* 956 */ + { MA, 0, NULL, NULL }, /* 957 */ + { MA, 0, NULL, NULL }, /* 958 */ + { MA, 0, NULL, NULL }, /* 959 */ + { MA, 0, NULL, NULL }, /* 960 */ + { MA, 0, NULL, NULL }, /* 961 */ + { MA, 0, NULL, NULL }, /* 962 */ + { MA, 0, NULL, NULL }, /* 963 */ + { MA, 0, NULL, NULL }, /* 964 */ + { MA, 0, NULL, NULL }, /* 965 */ + { MA, 0, NULL, NULL }, /* 966 */ + { MA, 0, NULL, NULL }, /* 967 */ + { MA, 0, NULL, NULL }, /* 968 */ + { MA, 0, NULL, NULL }, /* 969 */ + { MA, 0, NULL, NULL }, /* 970 */ + { MA, 0, NULL, NULL }, /* 971 */ + { MA, 0, NULL, NULL }, /* 972 */ + { MA, 0, NULL, NULL }, /* 973 */ + { MA, 0, NULL, NULL }, /* 974 */ + { MA, 0, NULL, NULL }, /* 975 */ + { MA, 0, NULL, NULL }, /* 976 */ + { MA, 0, NULL, NULL }, /* 977 */ + { MA, 0, NULL, NULL }, /* 978 */ + { MA, 0, NULL, NULL }, /* 979 */ + { MA, 0, NULL, NULL }, /* 980 */ + { MA, 0, NULL, NULL }, /* 981 */ + { MA, 0, NULL, NULL }, /* 982 */ + { MA, 0, NULL, NULL }, /* 983 */ + { MA, 0, NULL, NULL }, /* 984 */ + { MA, 0, NULL, NULL }, /* 985 */ + { MA, 0, NULL, NULL }, /* 986 */ + { MA, 0, NULL, NULL }, /* 987 */ + { MA, 0, NULL, NULL }, /* 988 */ + { MA, 0, NULL, NULL }, /* 989 */ + { MA, 0, NULL, NULL }, /* 990 */ + { MA, 0, NULL, NULL }, /* 991 */ + { MA, 0, NULL, NULL }, /* 992 */ + { MA, 0, NULL, NULL }, /* 993 */ + { MA, 0, NULL, NULL }, /* 994 */ + { MA, 0, NULL, NULL }, /* 995 */ + { MA, 0, NULL, NULL }, /* 996 */ + { MA, 0, NULL, NULL }, /* 997 */ + { MA, 0, NULL, NULL }, /* 998 */ + { MA, 0, NULL, NULL }, /* 999 */ + { MA, 0, NULL, NULL }, /* 1000 */ + { MA, 0, NULL, NULL }, /* 1001 */ + { MA, 0, NULL, NULL }, /* 1002 */ + { MA, 0, NULL, NULL }, /* 1003 */ + { MA, 0, NULL, NULL }, /* 1004 */ + { MA, 0, NULL, NULL }, /* 1005 */ + { MA, 0, NULL, NULL }, /* 1006 */ + { MA, 0, NULL, NULL }, /* 1007 */ + { MA, 0, NULL, NULL }, /* 1008 */ + { MA, 0, NULL, NULL }, /* 1009 */ + { MA, 0, NULL, NULL }, /* 1010 */ + { MA, 0, NULL, NULL }, /* 1011 */ + { MA, 0, NULL, NULL }, /* 1012 */ + { MA, 0, NULL, NULL }, /* 1013 */ + { MA, 0, NULL, NULL }, /* 1014 */ + { MA, 0, NULL, NULL }, /* 1015 */ + { MA, 0, NULL, NULL }, /* 1016 */ + { MA, 0, NULL, NULL }, /* 1017 */ + { MA, 0, NULL, NULL }, /* 1018 */ + { MA, 0, NULL, NULL }, /* 1019 */ + { MA, 0, NULL, NULL }, /* 1020 */ + { MA, 0, NULL, NULL }, /* 1021 */ + { MA, 0, NULL, NULL }, /* 1022 */ + { MA, 0, NULL, NULL }, /* 1023 */ + { 0, 0, printargs, "ni_syscall" }, /* 1024 */ + { 1, TP, sys_exit, "exit" }, /* 1025 */ + { 3, TD, sys_read, "read" }, /* 1026 */ + { 3, TD, sys_write, "write" }, /* 1027 */ + { 3, TD|TF, sys_open, "open" }, /* 1028 */ + { 1, TD, sys_close, "close" }, /* 1029 */ + { 2, TD|TF, sys_creat, "creat" }, /* 1030 */ + { 2, TF, sys_link, "link" }, /* 1031 */ + { 1, TF, sys_unlink, "unlink" }, /* 1032 */ + { 3, TF|TP, sys_execve, "execve" }, /* 1033 */ + { 1, TF, sys_chdir, "chdir" }, /* 1034 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 1035 */ + { 2, TF, sys_utimes, "utimes" }, /* 1036 */ + { 3, TF, sys_mknod, "mknod" }, /* 1037 */ + { 2, TF, sys_chmod, "chmod" }, /* 1038 */ + { 3, TF, sys_chown, "chown" }, /* 1039 */ + { 3, TD, sys_lseek, "lseek" }, /* 1040 */ + { 0, 0, sys_getpid, "getpid" }, /* 1041 */ + { 0, 0, sys_getppid, "getppid" }, /* 1042 */ + { 5, TF, sys_mount, "mount" }, /* 1043 */ + { 1, TF, sys_umount2, "umount" }, /* 1044 */ + { 1, 0, sys_setuid, "setuid" }, /* 1045 */ + { 0, NF, sys_getuid, "getuid" }, /* 1046 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 1047 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 1048 */ + { 2, TF, sys_access, "access" }, /* 1049 */ + { 0, 0, sys_sync, "sync" }, /* 1050 */ + { 1, TD, sys_fsync, "fsync" }, /* 1051 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 1052 */ + { 2, TS, sys_kill, "kill" }, /* 1053 */ + { 2, TF, sys_rename, "rename" }, /* 1054 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 1055 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 1056 */ + { 1, TD, sys_dup, "dup" }, /* 1057 */ + { 1, TD, sys_pipe, "pipe" }, /* 1058 */ + { 1, 0, sys_times, "times" }, /* 1059 */ + { 1, TM, sys_brk, "brk" }, /* 1060 */ + { 1, 0, sys_setgid, "setgid" }, /* 1061 */ + { 0, NF, sys_getgid, "getgid" }, /* 1062 */ + { 0, NF, sys_getegid, "getegid" }, /* 1063 */ + { 1, TF, sys_acct, "acct" }, /* 1064 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 1065 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 1066 */ + { 1, 0, sys_umask, "umask" }, /* 1067 */ + { 1, TF, sys_chroot, "chroot" }, /* 1068 */ + { 2, 0, sys_ustat, "ustat" }, /* 1069 */ + { 2, TD, sys_dup2, "dup2" }, /* 1070 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 1071 */ + { 2, 0, sys_setregid, "setregid" }, /* 1072 */ + { 3, 0, printargs, "getresuid" }, /* 1073 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 1074 */ + { 3, 0, sys_getresuid, "getresgid" }, /* 1075 */ + { 3, 0, printargs, "setresgid" }, /* 1076 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 1077 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 1078 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 1079 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 1080 */ + { 0, 0, sys_setsid, "setsid" }, /* 1081 */ + { 1, 0, sys_getsid, "getsid" }, /* 1082 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 1083 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 1084 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 1085 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 1086 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 1087 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 1088 */ + { 5, TD, sys_select, "select" }, /* 1089 */ + { 3, TD, sys_poll, "poll" }, /* 1090 */ + { 2, TF, sys_symlink, "symlink" }, /* 1091 */ + { 3, TF, sys_readlink, "readlink" }, /* 1092 */ + { 1, TF, sys_uselib, "uselib" }, /* 1093 */ + { 2, TF, sys_swapon, "swapon" }, /* 1094 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 1095 */ + { 4, 0, sys_reboot, "reboot" }, /* 1096 */ + { 2, TF, sys_truncate, "truncate" }, /* 1097 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 1098 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 1099 */ + { 3, TD, sys_fchown, "fchown" }, /* 1100 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 1101 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 1102 */ + { 2, TF, sys_statfs, "statfs" }, /* 1103 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 1104 */ + { 3, 0, sys_gettid, "gettid" }, /* 1105 */ + { 3, TI, sys_semget, "semget" }, /* 1106 */ + { 3, TI, printargs, "semop" }, /* 1107 */ + { 4, TI, sys_semctl, "semctl" }, /* 1108 */ + { 2, TI, sys_msgget, "msgget" }, /* 1109 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 1110 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 1111 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 1112 */ + { 3, TI, sys_shmget, "shmget" }, /* 1113 */ + { 3, TI, sys_shmat, "shmat" }, /* 1114 */ + { 1, TI, sys_shmdt, "shmdt" }, /* 1115 */ + { 3, TI, sys_shmctl, "shmctl" }, /* 1116 */ + { 3, 0, sys_syslog, "syslog" }, /* 1117 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 1118 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 1119 */ + { 2, TF, sys_stat, "stat" }, /* 1120 */ + { 2, TF, sys_lstat, "lstat" }, /* 1121 */ + { 2, TD, sys_fstat, "fstat" }, /* 1122 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 1123 */ + { 3, TF, sys_chown, "lchown" }, /* 1124 */ + { 5, 0, sys_vm86, "vm86" }, /* 1125 */ + { 4, TP, sys_wait4, "wait4" }, /* 1126 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 1127 */ + { 5, TP, sys_clone, "clone" }, /* 1128 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 1129 */ + { 1, 0, sys_uname, "uname" }, /* 1130 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 1131 */ + { 2, 0, sys_create_module, "create_module" }, /* 1132 */ + { 4, 0, sys_init_module, "init_module" }, /* 1133 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 1134 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 1135 */ + { 5, 0, sys_query_module, "query_module" }, /* 1136 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 1137 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 1138 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 1139 */ + { 1, 0, sys_personality, "personality" }, /* 1140 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 1141 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 1142 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 1143 */ + { 3, TD, sys_getdents, "getdents" }, /* 1144 */ + { 2, TD, sys_flock, "flock" }, /* 1145 */ + { 5, TD, sys_readv, "readv" }, /* 1146 */ + { 5, TD, sys_writev, "writev" }, /* 1147 */ + { 4, TD, sys_pread, "pread" }, /* 1148 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 1149 */ + { 1, 0, printargs, "_sysctl" }, /* 1150 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 1151 */ + { 2, TM, sys_munmap, "munmap" }, /* 1152 */ + { 2, TM, sys_mlock, "mlock" }, /* 1153 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 1154 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 1155 */ + { 5, TM, sys_mremap, "mremap" }, /* 1156 */ + { 3, TM, sys_msync, "msync" }, /* 1157 */ + { 2, TM, sys_munlock, "munlock" }, /* 1158 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 1159 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 1160 */ + { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 1161 */ + { 2, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 1162 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 1163 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 1164 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 1165 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 1166 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 1167 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 1168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 1169 */ + { 5, 0, sys_prctl, "prctl" }, /* 1170 */ + { 1, 0, sys_getpagesize, "getpagesize" }, /* 1171 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 1172 */ + { 5, 0, printargs, "pciconfig_read"}, /* 1173 */ + { 5, 0, printargs, "pciconfig_write"}, /* 1174 */ + { MA, 0, printargs, "perfmonctl" }, /* 1175 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 1176 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 1177 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 1178 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 1179 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 1180 */ + { 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 1181 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 1182 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 1183 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 1184 */ + { 2, 0, sys_capget, "capget" }, /* 1185 */ + { 2, 0, sys_capset, "capset" }, /* 1186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 1187 */ + { 5, TN, printargs, "getpmsg" }, /* 1188 */ + { 5, TN, printargs, "putpmsg" }, /* 1189 */ + { 3, TN, sys_socket, "socket" }, /* 1190 */ + { 3, TN, sys_bind, "bind" }, /* 1191 */ + { 3, TN, sys_connect, "connect" }, /* 1192 */ + { 2, TN, sys_listen, "listen" }, /* 1193 */ + { 3, TN, sys_accept, "accept" }, /* 1194 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 1195 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 1196 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 1197 */ + { 4, TN, sys_send, "send" }, /* 1198 */ + { 6, TN, sys_sendto, "sendto" }, /* 1199 */ + { 4, TN, sys_recv, "recv" }, /* 1200 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 1201 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 1202 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 1203 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 1204 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 1205 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 1206 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 1207 */ + { 3, TM, sys_mincore, "mincore" }, /* 1208 */ + { 3, TM, sys_madvise, "madvise" }, /* 1209 */ + { 2, TF, sys_stat, "stat" }, /* 1210 */ + { 2, TF, sys_lstat, "lstat" }, /* 1211 */ + { 2, TD, sys_fstat, "fstat" }, /* 1212 */ + { 6, TP, sys_clone, "clone2" }, /* 1213 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 1214 */ + { 2, 0, printargs, "getunwind" }, /* 1215 */ + { 3, TD, sys_readahead, "readahead" }, /* 1216 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 1217 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 1218 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 1219 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 1220 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 1221 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 1222 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 1223 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 1224 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 1225 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 1226 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 1227 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 1228 */ + { 2, TS, sys_kill, "tkill" }, /* 1229 */ + { 6, 0, sys_futex, "futex" }, /* 1230 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"},/* 1231 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"},/* 1232 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 1233 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 1234 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 1235 */ + { 1, TP, sys_exit, "exit_group" }, /* 1236 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 1237 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 1238 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1239 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 1240 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 1241 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 1242 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 1243 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 1244 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1245 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 1246 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 1247 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 1248 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 1249 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 1250 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 1251 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 1252 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 1253 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 1254 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 1255 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 1256 */ + { MA, 0, printargs, "fstatfs64" }, /* 1257 */ + { MA, 0, printargs, "statfs64" }, /* 1258 */ + { 6, TM, sys_mbind, "mbind" }, /* 1259 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 1260 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 1261 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 1262 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 1263 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 1264 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 1265 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 1266 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 1267 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 1268 */ + { 5, 0, sys_vserver, "vserver" }, /* 1269 */ + { 5, TP, sys_waitid, "waitid" }, /* 1270 */ + { 5, 0, sys_add_key, "add_key" }, /* 1271 */ + { 4, 0, sys_request_key, "request_key" }, /* 1272 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 1273 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 1274 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 1275 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 1276 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 1277 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 1278 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 1279 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 1280 */ + { 4, TD|TF, sys_openat, "openat" }, /* 1281 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 1282 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 1283 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 1284 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1285 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1286 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 1287 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 1288 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 1289 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 1290 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 1291 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 1292 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 1293 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 1294 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 1295 */ + { 1, TP, sys_unshare, "unshare" }, /* 1296 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 1297 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 1298 */ + { 6, TD, sys_splice, "splice" }, /* 1299 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 1300 */ + { 4, TD, sys_tee, "tee" }, /* 1301 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 1302 */ + { MA, 0, NULL, NULL }, /* 1303 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 1304 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 1305 */ + { MA, 0, NULL, NULL }, /* 1306 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1307 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 1308 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 1309 */ + { 4, TD, sys_preadv, "preadv" }, /* 1319 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 1320 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 1321 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 1322 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 1323 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 1324 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 1325 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 1326 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 1327 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 1328 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 1329 */ + { 2, TD, sys_setns, "setns" }, /* 1330 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 1331 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 1332 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 1333 */ + { 4, TN, sys_accept4, "accept4" }, /* 1334 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 1335 */ diff --git a/alice-strace/linux/ioctlent-filter.awk b/alice-strace/linux/ioctlent-filter.awk new file mode 100644 index 0000000..181c4bf --- /dev/null +++ b/alice-strace/linux/ioctlent-filter.awk @@ -0,0 +1,19 @@ +#!/bin/awk -f +# Filter out redundant "*32" symbols. + +BEGIN { + s="" + c="" +} + +NF == 3 && $2 ~ /^"[^",]*",$/ { + if ($2 == s && $3 == c) + next + s = $2 + sub(/",$/, "32\",", s) + c = $3 +} + +{ + print +} diff --git a/alice-strace/linux/ioctlent.h.in b/alice-strace/linux/ioctlent.h.in new file mode 100644 index 0000000..78f1b54 --- /dev/null +++ b/alice-strace/linux/ioctlent.h.in @@ -0,0 +1,2012 @@ + /* Generated by ioctlsort */ + {"linux/fs.h", "FIBMAP", 0x0001}, + {"linux/fs.h", "FIGETBSZ", 0x0002}, + {"linux/fd.h", "FDGETPRM", 0x0204}, + {"linux/fd.h", "FDGETMAXERRS", 0x020e}, + {"linux/fd.h", "FDGETDRVTYP", 0x020f}, + {"linux/fd.h", "FDGETDRVPRM", 0x0211}, + {"linux/fd.h", "FDGETDRVSTAT", 0x0212}, + {"linux/fd.h", "FDPOLLDRVSTAT", 0x0213}, + {"linux/fd.h", "FDGETFDCSTAT", 0x0215}, + {"linux/fd.h", "FDWERRORGET", 0x0217}, + {"linux/fd.h", "FDCLRPRM", 0x0241}, + {"linux/fd.h", "FDSETPRM", 0x0242}, + {"linux/fd.h", "FDDEFPRM", 0x0243}, + {"linux/fd.h", "FDMSGON", 0x0245}, + {"linux/fd.h", "FDMSGOFF", 0x0246}, + {"linux/fd.h", "FDFMTBEG", 0x0247}, + {"linux/fd.h", "FDFMTTRK", 0x0248}, + {"linux/fd.h", "FDFMTEND", 0x0249}, + {"linux/fd.h", "FDSETEMSGTRESH", 0x024a}, + {"linux/fd.h", "FDFLUSH", 0x024b}, + {"linux/fd.h", "FDSETMAXERRS", 0x024c}, + {"linux/fd.h", "FDRESET", 0x0254}, + {"linux/fd.h", "FDWERRORCLR", 0x0256}, + {"linux/fd.h", "FDRAWCMD", 0x0258}, + {"linux/fd.h", "FDTWADDLE", 0x0259}, + {"linux/fd.h", "FDEJECT", 0x025a}, + {"linux/fd.h", "FDSETDRVPRM", 0x0290}, + {"linux/hdreg.h", "HDIO_GETGEO", 0x0301}, + {"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x0302}, + {"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x0304}, + {"linux/hdreg.h", "HDIO_GET_QDMA", 0x0305}, + {"linux/hdreg.h", "HDIO_SET_XFER", 0x0306}, + {"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x0307}, + {"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x0308}, + {"linux/hdreg.h", "HDIO_GET_32BIT", 0x0309}, + {"linux/hdreg.h", "HDIO_GET_NOWERR", 0x030a}, + {"linux/hdreg.h", "HDIO_GET_DMA", 0x030b}, + {"linux/hdreg.h", "HDIO_GET_NICE", 0x030c}, + {"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x030d}, + {"linux/hdreg.h", "HDIO_GET_WCACHE", 0x030e}, + {"linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0x030f}, + {"linux/hdreg.h", "HDIO_GET_ADDRESS", 0x0310}, + {"linux/hdreg.h", "HDIO_GET_BUSSTATE", 0x031a}, + {"linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0x031b}, + {"linux/hdreg.h", "HDIO_DRIVE_RESET", 0x031c}, + {"linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0x031d}, + {"linux/hdreg.h", "HDIO_DRIVE_TASK", 0x031e}, + {"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x031f}, + {"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x0321}, + {"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x0322}, + {"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x0323}, + {"linux/hdreg.h", "HDIO_SET_32BIT", 0x0324}, + {"linux/hdreg.h", "HDIO_SET_NOWERR", 0x0325}, + {"linux/hdreg.h", "HDIO_SET_DMA", 0x0326}, + {"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x0327}, + {"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x0328}, + {"linux/hdreg.h", "HDIO_SET_NICE", 0x0329}, + {"linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0x032a}, + {"linux/hdreg.h", "HDIO_SET_WCACHE", 0x032b}, + {"linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0x032c}, + {"linux/hdreg.h", "HDIO_SET_BUSSTATE", 0x032d}, + {"linux/hdreg.h", "HDIO_SET_QDMA", 0x032e}, + {"linux/hdreg.h", "HDIO_SET_ADDRESS", 0x032f}, + {"linux/vm_sockets.h", "IOCTL_VM_SOCKETS_GET_LOCAL_CID", 0x07b9}, + {"linux/raid/md_u.h", "RAID_VERSION", 0x0910}, + {"linux/raid/md_u.h", "GET_ARRAY_INFO", 0x0911}, + {"linux/raid/md_u.h", "GET_DISK_INFO", 0x0912}, + {"linux/raid/md_u.h", "PRINT_RAID_DEBUG", 0x0913}, + {"linux/raid/md_u.h", "RAID_AUTORUN", 0x0914}, + {"linux/raid/md_u.h", "GET_BITMAP_FILE", 0x0915}, + {"linux/raid/md_u.h", "CLEAR_ARRAY", 0x0920}, + {"linux/raid/md_u.h", "ADD_NEW_DISK", 0x0921}, + {"linux/raid/md_u.h", "HOT_REMOVE_DISK", 0x0922}, + {"linux/raid/md_u.h", "SET_ARRAY_INFO", 0x0923}, + {"linux/raid/md_u.h", "SET_DISK_INFO", 0x0924}, + {"linux/raid/md_u.h", "WRITE_RAID_INFO", 0x0925}, + {"linux/raid/md_u.h", "UNPROTECT_ARRAY", 0x0926}, + {"linux/raid/md_u.h", "PROTECT_ARRAY", 0x0927}, + {"linux/raid/md_u.h", "HOT_ADD_DISK", 0x0928}, + {"linux/raid/md_u.h", "SET_DISK_FAULTY", 0x0929}, + {"linux/raid/md_u.h", "HOT_GENERATE_ERROR", 0x092a}, + {"linux/raid/md_u.h", "SET_BITMAP_FILE", 0x092b}, + {"linux/raid/md_u.h", "RUN_ARRAY", 0x0930}, + {"linux/raid/md_u.h", "STOP_ARRAY", 0x0932}, + {"linux/raid/md_u.h", "STOP_ARRAY_RO", 0x0933}, + {"linux/raid/md_u.h", "RESTART_ARRAY_RW", 0x0934}, + {"linux/fs.h", "BLKROSET", 0x125d}, + {"linux/fs.h", "BLKROGET", 0x125e}, + {"linux/fs.h", "BLKRRPART", 0x125f}, + {"linux/fs.h", "BLKGETSIZE", 0x1260}, + {"linux/fs.h", "BLKFLSBUF", 0x1261}, + {"linux/fs.h", "BLKRASET", 0x1262}, + {"linux/fs.h", "BLKRAGET", 0x1263}, + {"linux/fs.h", "BLKFRASET", 0x1264}, + {"linux/fs.h", "BLKFRAGET", 0x1265}, + {"linux/fs.h", "BLKSECTSET", 0x1266}, + {"linux/fs.h", "BLKSECTGET", 0x1267}, + {"linux/fs.h", "BLKSSZGET", 0x1268}, + {"linux/blkpg.h", "BLKPG", 0x1269}, + {"linux/fs.h", "BLKELVGET", 0x126a}, + {"linux/fs.h", "BLKELVSET", 0x126b}, + {"linux/fs.h", "BLKBSZGET", 0x1270}, + {"linux/fs.h", "BLKBSZSET", 0x1271}, + {"linux/fs.h", "BLKGETSIZE64", 0x1272}, + {"linux/fs.h", "BLKTRACESETUP", 0x1273}, + {"linux/fs.h", "BLKTRACESTART", 0x1274}, + {"linux/fs.h", "BLKTRACESTOP", 0x1275}, + {"linux/fs.h", "BLKTRACETEARDOWN", 0x1276}, + {"linux/fs.h", "BLKDISCARD", 0x1277}, + {"linux/fs.h", "BLKIOMIN", 0x1278}, + {"linux/fs.h", "BLKIOOPT", 0x1279}, + {"linux/fs.h", "BLKALIGNOFF", 0x127a}, + {"linux/fs.h", "BLKPBSZGET", 0x127b}, + {"linux/fs.h", "BLKDISCARDZEROES", 0x127c}, + {"linux/fs.h", "BLKSECDISCARD", 0x127d}, + {"linux/fs.h", "BLKROTATIONAL", 0x127e}, + {"linux/fs.h", "BLKZEROOUT", 0x127f}, + {"rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", 0x1b01}, + {"rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", 0x1b02}, + {"rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", 0x1b03}, + {"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201}, + {"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202}, + {"scsi/sg.h", "SG_EMULATED_HOST", 0x2203}, + {"scsi/sg.h", "SG_SET_TRANSFORM", 0x2204}, + {"scsi/sg.h", "SG_GET_TRANSFORM", 0x2205}, + {"scsi/sg.h", "SG_GET_COMMAND_Q", 0x2270}, + {"scsi/sg.h", "SG_SET_COMMAND_Q", 0x2271}, + {"scsi/sg.h", "SG_GET_RESERVED_SIZE", 0x2272}, + {"scsi/sg.h", "SG_SET_RESERVED_SIZE", 0x2275}, + {"scsi/sg.h", "SG_GET_SCSI_ID", 0x2276}, + {"scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0x2279}, + {"scsi/sg.h", "SG_GET_LOW_DMA", 0x227a}, + {"scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0x227b}, + {"scsi/sg.h", "SG_GET_PACK_ID", 0x227c}, + {"scsi/sg.h", "SG_GET_NUM_WAITING", 0x227d}, + {"scsi/sg.h", "SG_SET_DEBUG", 0x227e}, + {"scsi/sg.h", "SG_GET_SG_TABLESIZE", 0x227f}, + {"scsi/sg.h", "SG_GET_VERSION_NUM", 0x2282}, + {"scsi/sg.h", "SG_NEXT_CMD_LEN", 0x2283}, + {"scsi/sg.h", "SG_SCSI_RESET", 0x2284}, + {"scsi/sg.h", "SG_IO", 0x2285}, + {"scsi/sg.h", "SG_GET_REQUEST_TABLE", 0x2286}, + {"scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0x2287}, + {"scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0x2288}, + {"scsi/sg.h", "SG_GET_ACCESS_COUNT", 0x2289}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_INFO", 0x2300}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_REQUEST", 0x2301}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE", 0x2302}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE", 0x2303}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_RESPONSE", 0x2304}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_INITIATE_BUS_RESET", 0x2305}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_ADD_DESCRIPTOR", 0x2306}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_REMOVE_DESCRIPTOR", 0x2307}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_CREATE_ISO_CONTEXT", 0x2308}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_QUEUE_ISO", 0x2309}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_START_ISO", 0x230a}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_STOP_ISO", 0x230b}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER", 0x230c}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE", 0x230d}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE", 0x230e}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE", 0x230f}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE", 0x2310}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_SPEED", 0x2311}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_BROADCAST_REQUEST", 0x2312}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_STREAM_PACKET", 0x2313}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER2", 0x2314}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_PHY_PACKET", 0x2315}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_RECEIVE_PHY_PACKETS", 0x2316}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_SET_ISO_CHANNELS", 0x2317}, + {"linux/firewire-cdev.h", "FW_CDEV_IOC_FLUSH_ISO", 0x2318}, + {"linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", 0x2400}, + {"linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", 0x2401}, + {"linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", 0x2402}, + {"linux/perf_event.h", "PERF_EVENT_IOC_RESET", 0x2403}, + {"linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", 0x2404}, + {"linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", 0x2405}, + {"linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", 0x2406}, + {"linux/suspend_ioctls.h", "SNAPSHOT_FREEZE", 0x3301}, + {"linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", 0x3302}, + {"linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", 0x3304}, + {"linux/suspend_ioctls.h", "SNAPSHOT_FREE", 0x3305}, + {"linux/suspend_ioctls.h", "SNAPSHOT_FREE_SWAP_PAGES", 0x3309}, + {"linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", 0x330b}, + {"linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", 0x330d}, + {"linux/suspend_ioctls.h", "SNAPSHOT_GET_IMAGE_SIZE", 0x330e}, + {"linux/suspend_ioctls.h", "SNAPSHOT_PLATFORM_SUPPORT", 0x330f}, + {"linux/suspend_ioctls.h", "SNAPSHOT_POWER_OFF", 0x3310}, + {"linux/suspend_ioctls.h", "SNAPSHOT_CREATE_IMAGE", 0x3311}, + {"linux/suspend_ioctls.h", "SNAPSHOT_PREF_IMAGE_SIZE", 0x3312}, + {"linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", 0x3313}, + {"linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", 0x3314}, + {"linux/vfio.h", "VFIO_GET_API_VERSION", 0x3b64}, + {"linux/vfio.h", "VFIO_CHECK_EXTENSION", 0x3b65}, + {"linux/vfio.h", "VFIO_SET_IOMMU", 0x3b66}, + {"linux/vfio.h", "VFIO_GROUP_GET_STATUS", 0x3b67}, + {"linux/vfio.h", "VFIO_GROUP_SET_CONTAINER", 0x3b68}, + {"linux/vfio.h", "VFIO_GROUP_UNSET_CONTAINER", 0x3b69}, + {"linux/vfio.h", "VFIO_GROUP_GET_DEVICE_FD", 0x3b6a}, + {"linux/vfio.h", "VFIO_DEVICE_GET_INFO", 0x3b6b}, + {"linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", 0x3b6c}, + {"linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", 0x3b6d}, + {"linux/vfio.h", "VFIO_DEVICE_SET_IRQS", 0x3b6e}, + {"linux/vfio.h", "VFIO_DEVICE_RESET", 0x3b6f}, + {"linux/vfio.h", "VFIO_IOMMU_GET_INFO", 0x3b70}, + {"linux/vfio.h", "VFIO_IOMMU_MAP_DMA", 0x3b71}, + {"linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", 0x3b72}, + {"linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", 0x3d01}, + {"linux/ptp_clock.h", "PTP_EXTTS_REQUEST", 0x3d02}, + {"linux/ptp_clock.h", "PTP_PEROUT_REQUEST", 0x3d03}, + {"linux/ptp_clock.h", "PTP_ENABLE_PPS", 0x3d04}, + {"linux/ptp_clock.h", "PTP_SYS_OFFSET", 0x3d05}, + {"linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", 0x4003}, + {"linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", 0x4004}, + {"linux/agpgart.h", "AGPIOC_INFO", 0x4100}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_PVERSION", 0x4100}, + {"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101}, + {"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_INFO", 0x4101}, + {"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102}, + {"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", 0x4102}, + {"linux/agpgart.h", "AGPIOC_SETUP", 0x4103}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_TTSTAMP", 0x4103}, + {"linux/agpgart.h", "AGPIOC_RESERVE", 0x4104}, + {"linux/agpgart.h", "AGPIOC_PROTECT", 0x4105}, + {"linux/agpgart.h", "AGPIOC_ALLOCATE", 0x4106}, + {"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x4107}, + {"linux/agpgart.h", "AGPIOC_BIND", 0x4108}, + {"linux/agpgart.h", "AGPIOC_UNBIND", 0x4109}, + {"linux/agpgart.h", "AGPIOC_CHIPSET_FLUSH", 0x410a}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_REFINE", 0x4110}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_PARAMS", 0x4111}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_FREE", 0x4112}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", 0x4113}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", 0x4120}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_DELAY", 0x4121}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_HWSYNC", 0x4122}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", 0x4123}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_CHANNEL_INFO", 0x4132}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_PREPARE", 0x4140}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_RESET", 0x4141}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_START", 0x4142}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_DROP", 0x4143}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_DRAIN", 0x4144}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_PAUSE", 0x4145}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", 0x4146}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_RESUME", 0x4147}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_XRUN", 0x4148}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_FORWARD", 0x4149}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_WRITEI_FRAMES", 0x4150}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_READI_FRAMES", 0x4151}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_WRITEN_FRAMES", 0x4152}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_READN_FRAMES", 0x4153}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_LINK", 0x4160}, + {"sound/asound.h", "SNDRV_PCM_IOCTL_UNLINK", 0x4161}, + {"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200}, + {"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x4201}, + {"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x4201}, + {"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x4202}, + {"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x4202}, + {"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x4203}, + {"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x4203}, + {"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x4204}, + {"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x4204}, + {"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x4205}, + {"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x4205}, + {"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x4206}, + {"linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", 0x4206}, + {"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x4207}, + {"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x4208}, + {"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x4209}, + {"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a}, + {"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0x420b}, + {"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c}, + {"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x420d}, + {"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e}, + {"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210}, + {"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x4211}, + {"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0x4212}, + {"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_IOCTL_VERSION", 0x4300}, + {"linux/capi.h", "CAPI_REGISTER", 0x4301}, + {"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0x4301}, + {"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0x4302}, + {"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0x4303}, + {"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x4304}, + {"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x4305}, + {"linux/capi.h", "CAPI_GET_MANUFACTURER", 0x4306}, + {"linux/soundcard.h", "SNDCTL_COPR_RUN", 0x4306}, + {"linux/capi.h", "CAPI_GET_VERSION", 0x4307}, + {"linux/soundcard.h", "SNDCTL_COPR_HALT", 0x4307}, + {"linux/capi.h", "CAPI_GET_SERIAL", 0x4308}, + {"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x4308}, + {"linux/capi.h", "CAPI_GET_PROFILE", 0x4309}, + {"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4309}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_GET_CAPS", 0x4310}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_GET_CODEC_CAPS", 0x4311}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_SET_PARAMS", 0x4312}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_GET_PARAMS", 0x4313}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_SET_METADATA", 0x4314}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_GET_METADATA", 0x4315}, + {"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0x4320}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_TSTAMP", 0x4320}, + {"linux/capi.h", "CAPI_GET_ERRCODE", 0x4321}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_AVAIL", 0x4321}, + {"linux/capi.h", "CAPI_INSTALLED", 0x4322}, + {"linux/capi.h", "CAPI_GET_FLAGS", 0x4323}, + {"linux/capi.h", "CAPI_SET_FLAGS", 0x4324}, + {"linux/capi.h", "CAPI_CLR_FLAGS", 0x4325}, + {"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x4326}, + {"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x4327}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_PAUSE", 0x4330}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_RESUME", 0x4331}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_START", 0x4332}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_STOP", 0x4333}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_DRAIN", 0x4334}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_NEXT_TRACK", 0x4335}, + {"sound/compress_offload.h", "SNDRV_COMPRESS_PARTIAL_DRAIN", 0x4336}, + {"linux/input.h", "EVIOCGVERSION", 0x4501}, + {"linux/input.h", "EVIOCGID", 0x4502}, + {"linux/input.h", "EVIOCGREP", 0x4503}, + {"linux/input.h", "EVIOCSREP", 0x4503}, + {"linux/input.h", "EVIOCGKEYCODE", 0x4504}, + {"linux/input.h", "EVIOCGKEYCODE_V2", 0x4504}, + {"linux/input.h", "EVIOCSKEYCODE", 0x4504}, + {"linux/input.h", "EVIOCSKEYCODE_V2", 0x4504}, + {"linux/input.h", "EVIOCRMFF", 0x4581}, + {"linux/input.h", "EVIOCGEFFECTS", 0x4584}, + {"linux/input.h", "EVIOCGRAB", 0x4590}, + {"linux/input.h", "EVIOCSCLOCKID", 0x45a0}, + {"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600}, + {"video/da8xx-fb.h", "FBIOGET_CONTRAST", 0x4601}, + {"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601}, + {"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602}, + {"video/da8xx-fb.h", "FBIOPUT_CONTRAST", 0x4602}, + {"video/da8xx-fb.h", "FBIGET_BRIGHTNESS", 0x4603}, + {"video/da8xx-fb.h", "FBIPUT_BRIGHTNESS", 0x4603}, + {"linux/fb.h", "FBIOGETCMAP", 0x4604}, + {"video/da8xx-fb.h", "FBIGET_COLOR", 0x4605}, + {"linux/fb.h", "FBIOPUTCMAP", 0x4605}, + {"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606}, + {"video/da8xx-fb.h", "FBIPUT_COLOR", 0x4606}, + {"linux/fb.h", "FBIO_CURSOR", 0x4608}, + {"video/da8xx-fb.h", "FBIPUT_HSYNC", 0x4609}, + {"video/da8xx-fb.h", "FBIPUT_VSYNC", 0x460a}, + {"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f}, + {"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610}, + {"linux/fb.h", "FBIOBLANK", 0x4611}, + {"linux/fb.h", "FBIOGET_VBLANK", 0x4612}, + {"linux/fb.h", "FBIO_ALLOC", 0x4613}, + {"linux/fb.h", "FBIO_FREE", 0x4614}, + {"linux/fb.h", "FBIOGET_GLYPH", 0x4615}, + {"linux/fb.h", "FBIOGET_HWCINFO", 0x4616}, + {"linux/fb.h", "FBIOPUT_MODEINFO", 0x4617}, + {"linux/fb.h", "FBIOGET_DISPINFO", 0x4618}, + {"linux/fb.h", "FBIO_WAITFORVSYNC", 0x4620}, + {"linux/arcfb.h", "FBIO_WAITEVENT", 0x4688}, + {"linux/arcfb.h", "FBIO_GETCONTROL2", 0x4689}, + {"video/sstfb.h", "SSTFB_GET_VGAPASS", 0x46dd}, + {"video/sstfb.h", "SSTFB_SET_VGAPASS", 0x46dd}, + {"linux/gigaset_dev.h", "GIGASET_REDIR", 0x4700}, + {"linux/gigaset_dev.h", "GIGASET_CONFIG", 0x4701}, + {"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x4702}, + {"linux/gigaset_dev.h", "GIGASET_VERSION", 0x4703}, + {"sound/asound.h", "SNDRV_HWDEP_IOCTL_PVERSION", 0x4800}, + {"linux/hidraw.h", "HIDIOCGRDESCSIZE", 0x4801}, + {"linux/hiddev.h", "HIDIOCGVERSION", 0x4801}, + {"sound/asound.h", "SNDRV_HWDEP_IOCTL_INFO", 0x4801}, + {"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802}, + {"linux/hidraw.h", "HIDIOCGRDESC", 0x4802}, + {"sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_STATUS", 0x4802}, + {"linux/hiddev.h", "HIDIOCGDEVINFO", 0x4803}, + {"linux/hidraw.h", "HIDIOCGRAWINFO", 0x4803}, + {"sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_LOAD", 0x4803}, + {"linux/hiddev.h", "HIDIOCGSTRING", 0x4804}, + {"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805}, + {"linux/hiddev.h", "HIDIOCGREPORT", 0x4807}, + {"linux/hiddev.h", "HIDIOCSREPORT", 0x4808}, + {"linux/hiddev.h", "HIDIOCGREPORTINFO", 0x4809}, + {"linux/hiddev.h", "HIDIOCGFIELDINFO", 0x480a}, + {"linux/hiddev.h", "HIDIOCGUSAGE", 0x480b}, + {"linux/hiddev.h", "HIDIOCSUSAGE", 0x480c}, + {"linux/hiddev.h", "HIDIOCGUCODE", 0x480d}, + {"linux/hiddev.h", "HIDIOCGFLAG", 0x480e}, + {"linux/hiddev.h", "HIDIOCSFLAG", 0x480f}, + {"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x4810}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_INFO", 0x4810}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_INFO", 0x4810}, + {"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0x4811}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_POKE", 0x4811}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_PEEK", 0x4812}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_UNLOAD_CODE", 0x4812}, + {"linux/hiddev.h", "HIDIOCGUSAGES", 0x4813}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_START", 0x4813}, + {"linux/hiddev.h", "HIDIOCSUSAGES", 0x4814}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_STOP", 0x4814}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_PAUSE", 0x4815}, + {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_RESTART", 0x4816}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_INFO", 0x4820}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_SETUP", 0x4820}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_RESET", 0x4821}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_POKE", 0x4821}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_PLAY_NOTE", 0x4822}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_PEEK", 0x4822}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_VOICE", 0x4823}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_PARAMS", 0x4824}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_MODE", 0x4825}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_CONNECTION", 0x4826}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_POKE", 0x4830}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_PEEK", 0x4831}, + {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_CLEAR_PATCHES", 0x4840}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PVERSION", 0x4840}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_PEAK_RMS", 0x4840}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", 0x4841}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE", 0x4842}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_VERSION", 0x4843}, + {"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_MIXER", 0x4844}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_MIXER", 0x4844}, + {"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_9632_AEB", 0x4845}, + {"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_LTC", 0x4846}, + {"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x4848}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_STOP", 0x4880}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", 0x4880}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CONTINUE", 0x4881}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_LOAD_PATCH", 0x4881}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER", 0x4882}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", 0x4882}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_SINGLE_STEP", 0x4883}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", 0x4883}, + {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_DBG_READ", 0x4884}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MEM_AVAIL", 0x4884}, + {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MISC_MODE", 0x4884}, + {"net/bluetooth/hci.h", "HCIDEVUP", 0x48c9}, + {"net/bluetooth/hci.h", "HCIDEVDOWN", 0x48ca}, + {"net/bluetooth/hci.h", "HCIDEVRESET", 0x48cb}, + {"net/bluetooth/hci.h", "HCIDEVRESTAT", 0x48cc}, + {"net/bluetooth/hci.h", "HCIGETDEVLIST", 0x48d2}, + {"net/bluetooth/hci.h", "HCIGETDEVINFO", 0x48d3}, + {"net/bluetooth/hci.h", "HCIGETCONNLIST", 0x48d4}, + {"net/bluetooth/hci.h", "HCIGETCONNINFO", 0x48d5}, + {"net/bluetooth/hci.h", "HCIGETAUTHINFO", 0x48d7}, + {"net/bluetooth/hci.h", "HCISETRAW", 0x48dc}, + {"net/bluetooth/hci.h", "HCISETSCAN", 0x48dd}, + {"net/bluetooth/hci.h", "HCISETAUTH", 0x48de}, + {"net/bluetooth/hci.h", "HCISETENCRYPT", 0x48df}, + {"net/bluetooth/hci.h", "HCISETPTYPE", 0x48e0}, + {"net/bluetooth/hci.h", "HCISETLINKPOL", 0x48e1}, + {"net/bluetooth/hci.h", "HCISETLINKMODE", 0x48e2}, + {"net/bluetooth/hci.h", "HCISETACLMTU", 0x48e3}, + {"net/bluetooth/hci.h", "HCISETSCOMTU", 0x48e4}, + {"net/bluetooth/hci.h", "HCIBLOCKADDR", 0x48e6}, + {"net/bluetooth/hci.h", "HCIUNBLOCKADDR", 0x48e7}, + {"net/bluetooth/hci.h", "HCIINQUIRY", 0x48f0}, + {"linux/isdn.h", "IIOCNETAIF", 0x4901}, + {"linux/isdn.h", "IIOCNETDIF", 0x4902}, + {"linux/isdn.h", "IIOCNETSCF", 0x4903}, + {"linux/isdn.h", "IIOCNETGCF", 0x4904}, + {"linux/isdn.h", "IIOCNETANM", 0x4905}, + {"linux/isdn.h", "IIOCNETDNM", 0x4906}, + {"linux/isdn.h", "IIOCNETGNM", 0x4907}, + {"linux/isdn.h", "IIOCGETSET", 0x4908}, + {"linux/isdn.h", "IIOCSETSET", 0x4909}, + {"linux/isdn.h", "IIOCSETVER", 0x490a}, + {"linux/isdn.h", "IIOCNETHUP", 0x490b}, + {"linux/isdn.h", "IIOCSETGST", 0x490c}, + {"linux/isdn.h", "IIOCSETBRJ", 0x490d}, + {"linux/isdn.h", "IIOCSIGPRF", 0x490e}, + {"linux/isdn.h", "IIOCGETPRF", 0x490f}, + {"linux/isdn.h", "IIOCSETPRF", 0x4910}, + {"linux/isdn.h", "IIOCGETMAP", 0x4911}, + {"linux/isdn.h", "IIOCSETMAP", 0x4912}, + {"linux/isdn.h", "IIOCNETASL", 0x4913}, + {"linux/isdn.h", "IIOCNETDIL", 0x4914}, + {"linux/isdn.h", "IIOCGETCPS", 0x4915}, + {"linux/isdn.h", "IIOCGETDVR", 0x4916}, + {"linux/isdn.h", "IIOCNETLCR", 0x4917}, + {"linux/isdn.h", "IIOCNETDWRSET", 0x4918}, + {"linux/isdn.h", "IIOCNETALN", 0x4920}, + {"linux/isdn.h", "IIOCNETDLN", 0x4921}, + {"linux/isdn.h", "IIOCNETGPN", 0x4922}, + {"linux/isdn.h", "IIOCDBGVAR", 0x497f}, + {"linux/isdn.h", "IIOCDRVCTL", 0x4980}, + {"linux/kd.h", "KIOCSOUND", 0x4b2f}, + {"linux/kd.h", "KDMKTONE", 0x4b30}, + {"linux/kd.h", "KDGETLED", 0x4b31}, + {"linux/kd.h", "KDSETLED", 0x4b32}, + {"linux/kd.h", "KDGKBTYPE", 0x4b33}, + {"linux/kd.h", "KDADDIO", 0x4b34}, + {"linux/kd.h", "KDDELIO", 0x4b35}, + {"linux/kd.h", "KDENABIO", 0x4b36}, + {"linux/kd.h", "KDDISABIO", 0x4b37}, + {"linux/kd.h", "KDSETMODE", 0x4b3a}, + {"linux/kd.h", "KDGETMODE", 0x4b3b}, + {"linux/kd.h", "KDMAPDISP", 0x4b3c}, + {"linux/kd.h", "KDUNMAPDISP", 0x4b3d}, + {"linux/kd.h", "GIO_SCRNMAP", 0x4b40}, + {"linux/kd.h", "PIO_SCRNMAP", 0x4b41}, + {"linux/kd.h", "KDGKBMODE", 0x4b44}, + {"linux/kd.h", "KDSKBMODE", 0x4b45}, + {"linux/kd.h", "KDGKBENT", 0x4b46}, + {"linux/kd.h", "KDSKBENT", 0x4b47}, + {"linux/kd.h", "KDGKBSENT", 0x4b48}, + {"linux/kd.h", "KDSKBSENT", 0x4b49}, + {"linux/kd.h", "KDGKBDIACR", 0x4b4a}, + {"linux/kd.h", "KDSKBDIACR", 0x4b4b}, + {"linux/kd.h", "KDGETKEYCODE", 0x4b4c}, + {"linux/kd.h", "KDSETKEYCODE", 0x4b4d}, + {"linux/kd.h", "KDSIGACCEPT", 0x4b4e}, + {"linux/kd.h", "KDKBDREP", 0x4b52}, + {"linux/kd.h", "GIO_FONT", 0x4b60}, + {"linux/kd.h", "PIO_FONT", 0x4b61}, + {"linux/kd.h", "KDGKBMETA", 0x4b62}, + {"linux/kd.h", "KDSKBMETA", 0x4b63}, + {"linux/kd.h", "KDGKBLED", 0x4b64}, + {"linux/kd.h", "KDSKBLED", 0x4b65}, + {"linux/kd.h", "GIO_UNIMAP", 0x4b66}, + {"linux/kd.h", "PIO_UNIMAP", 0x4b67}, + {"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68}, + {"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69}, + {"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a}, + {"linux/kd.h", "GIO_FONTX", 0x4b6b}, + {"linux/kd.h", "PIO_FONTX", 0x4b6c}, + {"linux/kd.h", "PIO_FONTRESET", 0x4b6d}, + {"linux/kd.h", "GIO_CMAP", 0x4b70}, + {"linux/kd.h", "PIO_CMAP", 0x4b71}, + {"linux/kd.h", "KDFONTOP", 0x4b72}, + {"linux/kd.h", "KDGKBDIACRUC", 0x4bfa}, + {"linux/kd.h", "KDSKBDIACRUC", 0x4bfb}, + {"linux/loop.h", "LOOP_SET_FD", 0x4c00}, + {"linux/loop.h", "LOOP_CLR_FD", 0x4c01}, + {"linux/loop.h", "LOOP_SET_STATUS", 0x4c02}, + {"linux/loop.h", "LOOP_GET_STATUS", 0x4c03}, + {"linux/loop.h", "LOOP_SET_STATUS64", 0x4c04}, + {"linux/loop.h", "LOOP_GET_STATUS64", 0x4c05}, + {"linux/loop.h", "LOOP_CHANGE_FD", 0x4c06}, + {"linux/loop.h", "LOOP_SET_CAPACITY", 0x4c07}, + {"linux/loop.h", "LOOP_CTL_ADD", 0x4c80}, + {"linux/loop.h", "LOOP_CTL_REMOVE", 0x4c81}, + {"linux/loop.h", "LOOP_CTL_GET_FREE", 0x4c82}, + {"mtd/mtd-abi.h", "MEMGETINFO", 0x4d01}, + {"mtd/mtd-abi.h", "MEMERASE", 0x4d02}, + {"mtd/mtd-abi.h", "MEMWRITEOOB", 0x4d03}, + {"mtd/mtd-abi.h", "MEMREADOOB", 0x4d04}, + {"mtd/mtd-abi.h", "MEMLOCK", 0x4d05}, + {"mtd/mtd-abi.h", "MEMUNLOCK", 0x4d06}, + {"mtd/mtd-abi.h", "MEMGETREGIONCOUNT", 0x4d07}, + {"mtd/mtd-abi.h", "MEMGETREGIONINFO", 0x4d08}, + {"mtd/mtd-abi.h", "MEMGETOOBSEL", 0x4d0a}, + {"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x4d0b}, + {"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x4d0c}, + {"mtd/mtd-abi.h", "OTPSELECT", 0x4d0d}, + {"mtd/mtd-abi.h", "OTPGETREGIONCOUNT", 0x4d0e}, + {"mtd/mtd-abi.h", "OTPGETREGIONINFO", 0x4d0f}, + {"mtd/mtd-abi.h", "OTPLOCK", 0x4d10}, + {"mtd/mtd-abi.h", "ECCGETLAYOUT", 0x4d11}, + {"mtd/mtd-abi.h", "ECCGETSTATS", 0x4d12}, + {"mtd/mtd-abi.h", "MTDFILEMODE", 0x4d13}, + {"mtd/mtd-abi.h", "MEMERASE64", 0x4d14}, + {"mtd/mtd-abi.h", "MEMWRITEOOB64", 0x4d15}, + {"mtd/mtd-abi.h", "MEMREADOOB64", 0x4d16}, + {"mtd/mtd-abi.h", "MEMISLOCKED", 0x4d17}, + {"mtd/mtd-abi.h", "MEMWRITE", 0x4d18}, + {"linux/soundcard.h", "SOUND_MIXER_INFO", 0x4d65}, + {"linux/soundcard.h", "SOUND_OLD_MIXER_INFO", 0x4d65}, + {"linux/soundcard.h", "SOUND_MIXER_ACCESS", 0x4d66}, + {"linux/soundcard.h", "SOUND_MIXER_AGC", 0x4d67}, + {"linux/soundcard.h", "SOUND_MIXER_3DSE", 0x4d68}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE1", 0x4d6f}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE2", 0x4d70}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE3", 0x4d71}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE4", 0x4d72}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE5", 0x4d73}, + {"linux/soundcard.h", "SOUND_MIXER_GETLEVELS", 0x4d74}, + {"linux/soundcard.h", "SOUND_MIXER_SETLEVELS", 0x4d75}, + {"linux/soundcard.h", "OSS_GETVERSION", 0x4d76}, + {"mtd/ubi-user.h", "UBI_IOCVOLUP", 0x4f00}, + {"mtd/ubi-user.h", "UBI_IOCEBER", 0x4f01}, + {"mtd/ubi-user.h", "UBI_IOCEBCH", 0x4f02}, + {"mtd/ubi-user.h", "UBI_IOCEBMAP", 0x4f03}, + {"mtd/ubi-user.h", "UBI_IOCEBUNMAP", 0x4f04}, + {"mtd/ubi-user.h", "UBI_IOCEBISMAP", 0x4f05}, + {"mtd/ubi-user.h", "UBI_IOCSETVOLPROP", 0x4f06}, + {"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000}, + {"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001}, + {"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0x5002}, + {"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x5002}, + {"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0x5003}, + {"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0x5004}, + {"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0x5005}, + {"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x5005}, + {"linux/soundcard.h", "SNDCTL_DSP_CHANNELS", 0x5006}, + {"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x5006}, + {"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x5007}, + {"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0x5007}, + {"linux/soundcard.h", "SNDCTL_DSP_POST", 0x5008}, + {"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0x5009}, + {"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0x500a}, + {"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x500b}, + {"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x500c}, + {"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x500d}, + {"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x500e}, + {"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x500f}, + {"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x5010}, + {"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x5010}, + {"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x5011}, + {"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x5012}, + {"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x5013}, + {"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x5014}, + {"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x5015}, + {"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x5016}, + {"linux/soundcard.h", "SNDCTL_DSP_GETODELAY", 0x5017}, + {"linux/soundcard.h", "SNDCTL_DSP_PROFILE", 0x5017}, + {"linux/soundcard.h", "SNDCTL_DSP_GETCHANNELMASK", 0x5040}, + {"linux/soundcard.h", "SNDCTL_DSP_BIND_CHANNEL", 0x5041}, + {"linux/soundcard.h", "SNDCTL_DSP_SETSPDIF", 0x5042}, + {"linux/soundcard.h", "SNDCTL_DSP_GETSPDIF", 0x5043}, + {"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x5100}, + {"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x5101}, + {"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0x5102}, + {"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0x5103}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x5104}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x5105}, + {"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x5106}, + {"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x5107}, + {"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x5108}, + {"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x5109}, + {"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x510a}, + {"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x510b}, + {"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0x510c}, + {"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x510d}, + {"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0x510e}, + {"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x510f}, + {"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x5111}, + {"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x5112}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETTIME", 0x5113}, + {"linux/soundcard.h", "SNDCTL_SYNTH_ID", 0x5114}, + {"linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", 0x5115}, + {"linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", 0x5116}, + {"linux/random.h", "RNDGETENTCNT", 0x5200}, + {"linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", 0x5201}, + {"linux/random.h", "RNDADDTOENTCNT", 0x5201}, + {"media/saa6588.h", "SAA6588_CMD_OPEN", 0x5201}, + {"linux/random.h", "RNDGETPOOL", 0x5202}, + {"media/saa6588.h", "SAA6588_CMD_CLOSE", 0x5202}, + {"linux/random.h", "RNDADDENTROPY", 0x5203}, + {"media/saa6588.h", "SAA6588_CMD_READ", 0x5203}, + {"linux/random.h", "RNDZAPENTCNT", 0x5204}, + {"media/saa6588.h", "SAA6588_CMD_POLL", 0x5204}, + {"linux/random.h", "RNDCLEARPOOL", 0x5206}, + {"net/bluetooth/rfcomm.h", "RFCOMMCREATEDEV", 0x52c8}, + {"net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", 0x52c9}, + {"net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", 0x52d2}, + {"net/bluetooth/rfcomm.h", "RFCOMMGETDEVINFO", 0x52d3}, + {"net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", 0x52dc}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_PVERSION", 0x5300}, + {"linux/cdrom.h", "CDROMPAUSE", 0x5301}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CLIENT_ID", 0x5301}, + {"linux/cdrom.h", "CDROMRESUME", 0x5302}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SYSTEM_INFO", 0x5302}, + {"linux/cdrom.h", "CDROMPLAYMSF", 0x5303}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_RUNNING_MODE", 0x5303}, + {"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304}, + {"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305}, + {"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306}, + {"linux/cdrom.h", "CDROMSTOP", 0x5307}, + {"linux/cdrom.h", "CDROMSTART", 0x5308}, + {"linux/cdrom.h", "CDROMEJECT", 0x5309}, + {"linux/cdrom.h", "CDROMVOLCTRL", 0x530a}, + {"linux/cdrom.h", "CDROMSUBCHNL", 0x530b}, + {"linux/cdrom.h", "CDROMREADMODE2", 0x530c}, + {"linux/cdrom.h", "CDROMREADMODE1", 0x530d}, + {"linux/cdrom.h", "CDROMREADAUDIO", 0x530e}, + {"linux/cdrom.h", "CDROMEJECT_SW", 0x530f}, + {"linux/cdrom.h", "CDROMMULTISESSION", 0x5310}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_INFO", 0x5310}, + {"linux/cdrom.h", "CDROM_GET_MCN", 0x5311}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_INFO", 0x5311}, + {"linux/cdrom.h", "CDROMRESET", 0x5312}, + {"linux/cdrom.h", "CDROMVOLREAD", 0x5313}, + {"linux/cdrom.h", "CDROMREADRAW", 0x5314}, + {"linux/cdrom.h", "CDROMREADCOOKED", 0x5315}, + {"linux/cdrom.h", "CDROMSEEK", 0x5316}, + {"linux/cdrom.h", "CDROMPLAYBLK", 0x5317}, + {"linux/cdrom.h", "CDROMREADALL", 0x5318}, + {"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319}, + {"linux/cdrom.h", "CDROMGETSPINDOWN", 0x531d}, + {"linux/cdrom.h", "CDROMSETSPINDOWN", 0x531e}, + {"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_PORT", 0x5320}, + {"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_PORT", 0x5321}, + {"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", 0x5322}, + {"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", 0x5323}, + {"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325}, + {"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326}, + {"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327}, + {"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328}, + {"linux/cdrom.h", "CDROM_LOCKDOOR", 0x5329}, + {"linux/cdrom.h", "CDROM_DEBUG", 0x5330}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", 0x5330}, + {"linux/cdrom.h", "CDROM_GET_CAPABILITY", 0x5331}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT", 0x5331}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_QUEUE", 0x5332}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_QUEUE", 0x5333}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", 0x5334}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", 0x5335}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE", 0x5336}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", 0x5340}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", 0x5341}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", 0x5342}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", 0x5343}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", 0x5344}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", 0x5345}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", 0x5346}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", 0x5349}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", 0x534a}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_POOL", 0x534b}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_POOL", 0x534c}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_REMOVE_EVENTS", 0x534e}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_SUBS", 0x534f}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", 0x5350}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT", 0x5351}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT", 0x5352}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC", 0x5353}, + {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC", 0x5354}, + {"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0x5380}, + {"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0x5381}, + {"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382}, + {"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382}, + {"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385}, + {"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386}, + {"scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0x5387}, + {"linux/cdrom.h", "DVD_READ_STRUCT", 0x5390}, + {"linux/cdrom.h", "DVD_WRITE_STRUCT", 0x5391}, + {"linux/cdrom.h", "DVD_AUTH", 0x5392}, + {"linux/cdrom.h", "CDROM_SEND_PACKET", 0x5393}, + {"linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0x5394}, + {"linux/cdrom.h", "CDROM_LAST_WRITTEN", 0x5395}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_PVERSION", 0x5400}, + {"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0x5401}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_NEXT_DEVICE", 0x5401}, + {"asm-generic/ioctls.h", "TCGETS", 0x5401}, + {"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_TREAD", 0x5402}, + {"asm-generic/ioctls.h", "TCSETS", 0x5402}, + {"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_GINFO", 0x5403}, + {"asm-generic/ioctls.h", "TCSETSW", 0x5403}, + {"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_GPARAMS", 0x5404}, + {"asm-generic/ioctls.h", "TCSETSF", 0x5404}, + {"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0x5405}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_GSTATUS", 0x5405}, + {"asm-generic/ioctls.h", "TCGETA", 0x5405}, + {"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0x5406}, + {"asm-generic/ioctls.h", "TCSETA", 0x5406}, + {"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x5407}, + {"asm-generic/ioctls.h", "TCSETAW", 0x5407}, + {"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x5408}, + {"asm-generic/ioctls.h", "TCSETAF", 0x5408}, + {"asm-generic/ioctls.h", "TCSBRK", 0x5409}, + {"asm-generic/ioctls.h", "TCXONC", 0x540a}, + {"asm-generic/ioctls.h", "TCFLSH", 0x540b}, + {"asm-generic/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm-generic/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_SELECT", 0x5410}, + {"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_INFO", 0x5411}, + {"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_PARAMS", 0x5412}, + {"asm-generic/ioctls.h", "TIOCSTI", 0x5412}, + {"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_STATUS", 0x5414}, + {"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414}, + {"asm-generic/ioctls.h", "TIOCMGET", 0x5415}, + {"asm-generic/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm-generic/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm-generic/ioctls.h", "TIOCMSET", 0x5418}, + {"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm-generic/ioctls.h", "FIONREAD", 0x541b}, + {"asm-generic/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm-generic/ioctls.h", "TIOCCONS", 0x541d}, + {"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm-generic/ioctls.h", "TIOCPKT", 0x5420}, + {"asm-generic/ioctls.h", "FIONBIO", 0x5421}, + {"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm-generic/ioctls.h", "TIOCSETD", 0x5423}, + {"asm-generic/ioctls.h", "TIOCGETD", 0x5424}, + {"asm-generic/ioctls.h", "TCSBRKP", 0x5425}, + {"asm-generic/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm-generic/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm-generic/ioctls.h", "TIOCGSID", 0x5429}, + {"asm-generic/ioctls.h", "TCGETS2", 0x542a}, + {"asm-generic/ioctls.h", "TCSETS2", 0x542b}, + {"asm-generic/ioctls.h", "TCSETSW2", 0x542c}, + {"asm-generic/ioctls.h", "TCSETSF2", 0x542d}, + {"asm-generic/ioctls.h", "TIOCGRS485", 0x542e}, + {"asm-generic/ioctls.h", "TIOCSRS485", 0x542f}, + {"asm-generic/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm-generic/ioctls.h", "TCGETX", 0x5432}, + {"asm-generic/ioctls.h", "TIOCGDEV", 0x5432}, + {"asm-generic/ioctls.h", "TCSETX", 0x5433}, + {"asm-generic/ioctls.h", "TCSETXF", 0x5434}, + {"asm-generic/ioctls.h", "TCSETXW", 0x5435}, + {"asm-generic/ioctls.h", "TIOCSIG", 0x5436}, + {"asm-generic/ioctls.h", "TIOCVHANGUP", 0x5437}, + {"asm-generic/ioctls.h", "TIOCGPKT", 0x5438}, + {"asm-generic/ioctls.h", "TIOCGPTLCK", 0x5439}, + {"asm-generic/ioctls.h", "TIOCGEXCL", 0x5440}, + {"asm-generic/ioctls.h", "FIONCLEX", 0x5450}, + {"asm-generic/ioctls.h", "FIOCLEX", 0x5451}, + {"asm-generic/ioctls.h", "FIOASYNC", 0x5452}, + {"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm-generic/ioctls.h", "FIOQSIZE", 0x5460}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_START", 0x54a0}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_STOP", 0x54a1}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_CONTINUE", 0x54a2}, + {"sound/asound.h", "SNDRV_TIMER_IOCTL_PAUSE", 0x54a3}, + {"linux/if_tun.h", "TUNSETNOCSUM", 0x54c8}, + {"linux/if_tun.h", "TUNSETDEBUG", 0x54c9}, + {"linux/if_tun.h", "TUNSETIFF", 0x54ca}, + {"linux/if_tun.h", "TUNSETPERSIST", 0x54cb}, + {"linux/if_tun.h", "TUNSETOWNER", 0x54cc}, + {"linux/if_tun.h", "TUNSETLINK", 0x54cd}, + {"linux/if_tun.h", "TUNSETGROUP", 0x54ce}, + {"linux/if_tun.h", "TUNGETFEATURES", 0x54cf}, + {"linux/if_tun.h", "TUNSETOFFLOAD", 0x54d0}, + {"linux/if_tun.h", "TUNSETTXFILTER", 0x54d1}, + {"linux/if_tun.h", "TUNGETIFF", 0x54d2}, + {"linux/if_tun.h", "TUNGETSNDBUF", 0x54d3}, + {"linux/if_tun.h", "TUNSETSNDBUF", 0x54d4}, + {"linux/if_tun.h", "TUNATTACHFILTER", 0x54d5}, + {"linux/if_tun.h", "TUNDETACHFILTER", 0x54d6}, + {"linux/if_tun.h", "TUNGETVNETHDRSZ", 0x54d7}, + {"linux/if_tun.h", "TUNSETVNETHDRSZ", 0x54d8}, + {"linux/if_tun.h", "TUNSETQUEUE", 0x54d9}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_PVERSION", 0x5500}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONTROL", 0x5500}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONTROL32", 0x5500}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_CARD_INFO", 0x5501}, + {"linux/uinput.h", "UI_DEV_CREATE", 0x5501}, + {"linux/uinput.h", "UI_DEV_DESTROY", 0x5502}, + {"linux/usbdevice_fs.h", "USBDEVFS_BULK", 0x5502}, + {"linux/usbdevice_fs.h", "USBDEVFS_BULK32", 0x5502}, + {"linux/usbdevice_fs.h", "USBDEVFS_RESETEP", 0x5503}, + {"linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", 0x5504}, + {"linux/usbdevice_fs.h", "USBDEVFS_SETCONFIGURATION", 0x5505}, + {"linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", 0x5508}, + {"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", 0x550a}, + {"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", 0x550a}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCARDURB", 0x550b}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB32", 0x550c}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY32", 0x550d}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", 0x550e}, + {"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LIST", 0x5510}, + {"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_INFO", 0x5511}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_READ", 0x5512}, + {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 0x5512}, + {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL32", 0x5512}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_WRITE", 0x5513}, + {"linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", 0x5513}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LOCK", 0x5514}, + {"linux/usbdevice_fs.h", "USBDEVFS_RESET", 0x5514}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_UNLOCK", 0x5515}, + {"linux/usbdevice_fs.h", "USBDEVFS_CLEAR_HALT", 0x5515}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS", 0x5516}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT", 0x5516}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_ADD", 0x5517}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONNECT", 0x5517}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REPLACE", 0x5518}, + {"linux/usbdevice_fs.h", "USBDEVFS_CLAIM_PORT", 0x5518}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REMOVE", 0x5519}, + {"linux/usbdevice_fs.h", "USBDEVFS_RELEASE_PORT", 0x5519}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_READ", 0x551a}, + {"linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", 0x551a}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_WRITE", 0x551b}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", 0x551b}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_COMMAND", 0x551c}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE", 0x5520}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_INFO", 0x5521}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE", 0x5530}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_INFO", 0x5531}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE", 0x5532}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE", 0x5540}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_INFO", 0x5541}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE", 0x5542}, + {"linux/uinput.h", "UI_SET_EVBIT", 0x5564}, + {"linux/uinput.h", "UI_SET_KEYBIT", 0x5565}, + {"linux/uinput.h", "UI_SET_RELBIT", 0x5566}, + {"linux/uinput.h", "UI_SET_ABSBIT", 0x5567}, + {"linux/uinput.h", "UI_SET_MSCBIT", 0x5568}, + {"linux/uinput.h", "UI_SET_LEDBIT", 0x5569}, + {"linux/uinput.h", "UI_SET_SNDBIT", 0x556a}, + {"linux/uinput.h", "UI_SET_FFBIT", 0x556b}, + {"linux/uinput.h", "UI_SET_PHYS", 0x556c}, + {"linux/uinput.h", "UI_SET_SWBIT", 0x556d}, + {"linux/uinput.h", "UI_SET_PROPBIT", 0x556e}, + {"linux/uinput.h", "UI_BEGIN_FF_UPLOAD", 0x55c8}, + {"linux/uinput.h", "UI_END_FF_UPLOAD", 0x55c9}, + {"linux/uinput.h", "UI_BEGIN_FF_ERASE", 0x55ca}, + {"linux/uinput.h", "UI_END_FF_ERASE", 0x55cb}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_POWER", 0x55d0}, + {"sound/asound.h", "SNDRV_CTL_IOCTL_POWER_STATE", 0x55d1}, + {"linux/videodev2.h", "VIDIOC_QUERYCAP", 0x5600}, + {"linux/vt.h", "VT_OPENQRY", 0x5600}, + {"linux/videodev2.h", "VIDIOC_RESERVED", 0x5601}, + {"linux/vt.h", "VT_GETMODE", 0x5601}, + {"linux/videodev2.h", "VIDIOC_ENUM_FMT", 0x5602}, + {"linux/vt.h", "VT_SETMODE", 0x5602}, + {"linux/vt.h", "VT_GETSTATE", 0x5603}, + {"linux/videodev2.h", "VIDIOC_G_FMT", 0x5604}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_FMT", 0x5604}, + {"linux/vt.h", "VT_SENDSIG", 0x5604}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", 0x5605}, + {"linux/videodev2.h", "VIDIOC_S_FMT", 0x5605}, + {"linux/vt.h", "VT_RELDISP", 0x5605}, + {"linux/vt.h", "VT_ACTIVATE", 0x5606}, + {"linux/vt.h", "VT_WAITACTIVE", 0x5607}, + {"linux/videodev2.h", "VIDIOC_REQBUFS", 0x5608}, + {"linux/vt.h", "VT_DISALLOCATE", 0x5608}, + {"linux/videodev2.h", "VIDIOC_QUERYBUF", 0x5609}, + {"linux/vt.h", "VT_RESIZE", 0x5609}, + {"linux/videodev2.h", "VIDIOC_G_FBUF", 0x560a}, + {"linux/vt.h", "VT_RESIZEX", 0x560a}, + {"linux/videodev2.h", "VIDIOC_S_FBUF", 0x560b}, + {"linux/vt.h", "VT_LOCKSWITCH", 0x560b}, + {"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c}, + {"linux/vt.h", "VT_GETHIFONTMASK", 0x560d}, + {"linux/videodev2.h", "VIDIOC_OVERLAY", 0x560e}, + {"linux/vt.h", "VT_WAITEVENT", 0x560e}, + {"linux/videodev2.h", "VIDIOC_QBUF", 0x560f}, + {"linux/vt.h", "VT_SETACTIVATE", 0x560f}, + {"linux/videodev2.h", "VIDIOC_EXPBUF", 0x5610}, + {"linux/videodev2.h", "VIDIOC_DQBUF", 0x5611}, + {"linux/videodev2.h", "VIDIOC_STREAMON", 0x5612}, + {"linux/videodev2.h", "VIDIOC_STREAMOFF", 0x5613}, + {"linux/videodev2.h", "VIDIOC_G_PARM", 0x5615}, + {"linux/videodev2.h", "VIDIOC_S_PARM", 0x5616}, + {"linux/videodev2.h", "VIDIOC_G_STD", 0x5617}, + {"linux/videodev2.h", "VIDIOC_S_STD", 0x5618}, + {"linux/videodev2.h", "VIDIOC_ENUMSTD", 0x5619}, + {"linux/videodev2.h", "VIDIOC_ENUMINPUT", 0x561a}, + {"linux/videodev2.h", "VIDIOC_G_CTRL", 0x561b}, + {"linux/videodev2.h", "VIDIOC_S_CTRL", 0x561c}, + {"linux/videodev2.h", "VIDIOC_G_TUNER", 0x561d}, + {"linux/videodev2.h", "VIDIOC_S_TUNER", 0x561e}, + {"linux/videodev2.h", "VIDIOC_G_AUDIO", 0x5621}, + {"linux/videodev2.h", "VIDIOC_S_AUDIO", 0x5622}, + {"linux/videodev2.h", "VIDIOC_QUERYCTRL", 0x5624}, + {"linux/videodev2.h", "VIDIOC_QUERYMENU", 0x5625}, + {"linux/videodev2.h", "VIDIOC_G_INPUT", 0x5626}, + {"linux/videodev2.h", "VIDIOC_S_INPUT", 0x5627}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_EDID", 0x5628}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_EDID", 0x5629}, + {"linux/videodev2.h", "VIDIOC_G_OUTPUT", 0x562e}, + {"linux/videodev2.h", "VIDIOC_S_OUTPUT", 0x562f}, + {"linux/videodev2.h", "VIDIOC_ENUMOUTPUT", 0x5630}, + {"linux/videodev2.h", "VIDIOC_G_AUDOUT", 0x5631}, + {"linux/videodev2.h", "VIDIOC_S_AUDOUT", 0x5632}, + {"linux/videodev2.h", "VIDIOC_G_MODULATOR", 0x5636}, + {"linux/videodev2.h", "VIDIOC_S_MODULATOR", 0x5637}, + {"linux/videodev2.h", "VIDIOC_G_FREQUENCY", 0x5638}, + {"linux/videodev2.h", "VIDIOC_S_FREQUENCY", 0x5639}, + {"linux/videodev2.h", "VIDIOC_CROPCAP", 0x563a}, + {"linux/videodev2.h", "VIDIOC_G_CROP", 0x563b}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_CROP", 0x563b}, + {"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_CROP", 0x563c}, + {"linux/videodev2.h", "VIDIOC_S_CROP", 0x563c}, + {"linux/videodev2.h", "VIDIOC_G_JPEGCOMP", 0x563d}, + {"linux/videodev2.h", "VIDIOC_S_JPEGCOMP", 0x563e}, + {"linux/videodev2.h", "VIDIOC_QUERYSTD", 0x563f}, + {"linux/videodev2.h", "VIDIOC_TRY_FMT", 0x5640}, + {"linux/videodev2.h", "VIDIOC_ENUMAUDIO", 0x5641}, + {"linux/videodev2.h", "VIDIOC_ENUMAUDOUT", 0x5642}, + {"linux/videodev2.h", "VIDIOC_G_PRIORITY", 0x5643}, + {"linux/videodev2.h", "VIDIOC_S_PRIORITY", 0x5644}, + {"linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", 0x5645}, + {"linux/videodev2.h", "VIDIOC_LOG_STATUS", 0x5646}, + {"linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", 0x5647}, + {"linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", 0x5648}, + {"linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", 0x5649}, + {"linux/videodev2.h", "VIDIOC_ENUM_FRAMESIZES", 0x564a}, + {"linux/videodev2.h", "VIDIOC_ENUM_FRAMEINTERVALS", 0x564b}, + {"linux/videodev2.h", "VIDIOC_G_ENC_INDEX", 0x564c}, + {"linux/videodev2.h", "VIDIOC_ENCODER_CMD", 0x564d}, + {"linux/videodev2.h", "VIDIOC_TRY_ENCODER_CMD", 0x564e}, + {"linux/videodev2.h", "VIDIOC_DBG_S_REGISTER", 0x564f}, + {"linux/videodev2.h", "VIDIOC_DBG_G_REGISTER", 0x5650}, + {"linux/videodev2.h", "VIDIOC_DBG_G_CHIP_IDENT", 0x5651}, + {"linux/videodev2.h", "VIDIOC_S_HW_FREQ_SEEK", 0x5652}, + {"linux/videodev2.h", "VIDIOC_ENUM_DV_PRESETS", 0x5653}, + {"linux/videodev2.h", "VIDIOC_S_DV_PRESET", 0x5654}, + {"linux/videodev2.h", "VIDIOC_G_DV_PRESET", 0x5655}, + {"linux/videodev2.h", "VIDIOC_QUERY_DV_PRESET", 0x5656}, + {"linux/videodev2.h", "VIDIOC_S_DV_TIMINGS", 0x5657}, + {"linux/videodev2.h", "VIDIOC_G_DV_TIMINGS", 0x5658}, + {"linux/videodev2.h", "VIDIOC_DQEVENT", 0x5659}, + {"linux/videodev2.h", "VIDIOC_SUBSCRIBE_EVENT", 0x565a}, + {"linux/videodev2.h", "VIDIOC_UNSUBSCRIBE_EVENT", 0x565b}, + {"linux/videodev2.h", "VIDIOC_CREATE_BUFS", 0x565c}, + {"linux/videodev2.h", "VIDIOC_PREPARE_BUF", 0x565d}, + {"linux/videodev2.h", "VIDIOC_G_SELECTION", 0x565e}, + {"linux/videodev2.h", "VIDIOC_S_SELECTION", 0x565f}, + {"linux/videodev2.h", "VIDIOC_DECODER_CMD", 0x5660}, + {"linux/videodev2.h", "VIDIOC_TRY_DECODER_CMD", 0x5661}, + {"linux/videodev2.h", "VIDIOC_ENUM_DV_TIMINGS", 0x5662}, + {"linux/videodev2.h", "VIDIOC_QUERY_DV_TIMINGS", 0x5663}, + {"linux/videodev2.h", "VIDIOC_DV_TIMINGS_CAP", 0x5664}, + {"linux/videodev2.h", "VIDIOC_ENUM_FREQ_BANDS", 0x5665}, + {"linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", 0x56c0}, + {"linux/ivtv.h", "IVTV_IOC_DMA_FRAME", 0x56c0}, + {"media/si4713.h", "SI4713_IOC_MEASURE_RNL", 0x56c0}, + {"linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", 0x56c1}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PVERSION", 0x5700}, + {"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x5700}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_INFO", 0x5701}, + {"linux/watchdog.h", "WDIOC_GETSTATUS", 0x5701}, + {"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x5702}, + {"linux/watchdog.h", "WDIOC_GETTEMP", 0x5703}, + {"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x5704}, + {"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x5705}, + {"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0x5706}, + {"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x5707}, + {"linux/watchdog.h", "WDIOC_SETPRETIMEOUT", 0x5708}, + {"linux/watchdog.h", "WDIOC_GETPRETIMEOUT", 0x5709}, + {"linux/watchdog.h", "WDIOC_GETTIMELEFT", 0x570a}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PARAMS", 0x5710}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_STATUS", 0x5720}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DROP", 0x5730}, + {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x5731}, + {"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0x5801}, + {"linux/fs.h", "FIFREEZE", 0x5877}, + {"linux/fs.h", "FITHAW", 0x5878}, + {"linux/fs.h", "FITRIM", 0x5879}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", 0x5b01}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", 0x5b02}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", 0x5b03}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", 0x5b04}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", 0x5b06}, + {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", 0x5b07}, + {"linux/sonet.h", "SONET_GETSTAT", 0x6110}, + {"linux/sonet.h", "SONET_GETSTATZ", 0x6111}, + {"linux/sonet.h", "SONET_SETDIAG", 0x6112}, + {"linux/sonet.h", "SONET_CLRDIAG", 0x6113}, + {"linux/sonet.h", "SONET_GETDIAG", 0x6114}, + {"linux/sonet.h", "SONET_SETFRAMING", 0x6115}, + {"linux/sonet.h", "SONET_GETFRAMING", 0x6116}, + {"linux/sonet.h", "SONET_GETFRSENSE", 0x6117}, + {"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x6132}, + {"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x6133}, + {"linux/atmdev.h", "ATM_GETSTAT", 0x6150}, + {"linux/atmdev.h", "ATM_GETSTATZ", 0x6151}, + {"linux/atmdev.h", "ATM_GETLOOP", 0x6152}, + {"linux/atmdev.h", "ATM_SETLOOP", 0x6153}, + {"linux/atmdev.h", "ATM_QUERYLOOP", 0x6154}, + {"linux/atm_eni.h", "ENI_MEMDUMP", 0x6160}, + {"linux/atm_he.h", "HE_GET_REG", 0x6160}, + {"linux/atm_nicstar.h", "NS_GETPSTAT", 0x6161}, + {"linux/atm_zatm.h", "ZATM_GETPOOL", 0x6161}, + {"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x6162}, + {"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x6162}, + {"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163}, + {"linux/atm_zatm.h", "ZATM_SETPOOL", 0x6163}, + {"linux/atm_eni.h", "ENI_SETMULT", 0x6167}, + {"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180}, + {"linux/atmdev.h", "ATM_GETLINKRATE", 0x6181}, + {"linux/atmdev.h", "ATM_GETNAMES", 0x6183}, + {"linux/atmdev.h", "ATM_GETTYPE", 0x6184}, + {"linux/atmdev.h", "ATM_GETESI", 0x6185}, + {"linux/atmdev.h", "ATM_GETADDR", 0x6186}, + {"linux/atmdev.h", "ATM_RSTADDR", 0x6187}, + {"linux/atmdev.h", "ATM_ADDADDR", 0x6188}, + {"linux/atmdev.h", "ATM_DELADDR", 0x6189}, + {"linux/atmdev.h", "ATM_GETCIRANGE", 0x618a}, + {"linux/atmdev.h", "ATM_SETCIRANGE", 0x618b}, + {"linux/atmdev.h", "ATM_SETESI", 0x618c}, + {"linux/atmdev.h", "ATM_SETESIF", 0x618d}, + {"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e}, + {"linux/atmdev.h", "ATM_ADDLECSADDR", 0x618e}, + {"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f}, + {"linux/atmdev.h", "ATM_DELLECSADDR", 0x618f}, + {"linux/atmdev.h", "ATM_GETLECSADDR", 0x6190}, + {"linux/atmbr2684.h", "BR2684_SETFILT", 0x6190}, + {"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0}, + {"linux/atmlec.h", "ATMLEC_DATA", 0x61d1}, + {"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2}, + {"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8}, + {"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9}, + {"linux/atmclip.h", "SIOCMKCLIP", 0x61e0}, + {"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1}, + {"linux/atmarp.h", "ATMARP_MKIP", 0x61e2}, + {"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3}, + {"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5}, + {"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0}, + {"linux/atmdev.h", "ATM_SETSC", 0x61f1}, + {"linux/atmdev.h", "ATM_SETBACKEND", 0x61f2}, + {"linux/atmdev.h", "ATM_NEWBACKENDIF", 0x61f3}, + {"linux/atmdev.h", "ATM_ADDPARTY", 0x61f4}, + {"linux/atmdev.h", "COMPAT_ATM_ADDPARTY", 0x61f4}, + {"linux/atmdev.h", "ATM_DROPPARTY", 0x61f5}, + {"media/bt819.h", "BT819_FIFO_RESET_LOW", 0x6200}, + {"media/bt819.h", "BT819_FIFO_RESET_HIGH", 0x6201}, + {"linux/cm4000_cs.h", "CM_IOCGSTATUS", 0x6300}, + {"linux/chio.h", "CHIOMOVE", 0x6301}, + {"linux/cm4000_cs.h", "CM_IOCGATR", 0x6301}, + {"linux/chio.h", "CHIOEXCHANGE", 0x6302}, + {"linux/cm4000_cs.h", "CM_IOCSPTS", 0x6302}, + {"linux/chio.h", "CHIOPOSITION", 0x6303}, + {"linux/cm4000_cs.h", "CM_IOCSRDR", 0x6303}, + {"linux/chio.h", "CHIOGPICKER", 0x6304}, + {"linux/cm4000_cs.h", "CM_IOCARDOFF", 0x6304}, + {"linux/chio.h", "CHIOSPICKER", 0x6305}, + {"linux/chio.h", "CHIOGPARAMS", 0x6306}, + {"linux/chio.h", "CHIOGSTATUS", 0x6308}, + {"linux/coda.h", "CIOC_KERNEL_VERSION", 0x630a}, + {"linux/chio.h", "CHIOGELEM", 0x6310}, + {"linux/chio.h", "CHIOINITELEM", 0x6311}, + {"linux/chio.h", "CHIOSVOLTAG", 0x6312}, + {"linux/chio.h", "CHIOGVPARAMS", 0x6313}, + {"linux/cm4000_cs.h", "CM_IOSDBGLVL", 0x63fa}, + {"media/v4l2-common.h", "TUNER_SET_CONFIG", 0x645c}, + {"media/v4l2-common.h", "VIDIOC_INT_RESET", 0x6466}, + {"media/s5p_fimc.h", "S5P_FIMC_TX_END_NOTIFY", 0x6500}, + {"linux/fs.h", "FS_IOC32_GETFLAGS", 0x6601}, + {"linux/fs.h", "FS_IOC_GETFLAGS", 0x6601}, + {"linux/fs.h", "FS_IOC32_SETFLAGS", 0x6602}, + {"linux/fs.h", "FS_IOC_SETFLAGS", 0x6602}, + {"linux/fs.h", "FS_IOC_FIEMAP", 0x660b}, + {"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_STATUS", 0x6701}, + {"linux/usb/gadgetfs.h", "GADGETFS_FIFO_STATUS", 0x6701}, + {"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_FLUSH", 0x6702}, + {"linux/usb/gadgetfs.h", "GADGETFS_FIFO_FLUSH", 0x6702}, + {"linux/usb/functionfs.h", "FUNCTIONFS_CLEAR_HALT", 0x6703}, + {"linux/usb/gadgetfs.h", "GADGETFS_CLEAR_HALT", 0x6703}, + {"linux/usb/g_printer.h", "GADGET_GET_PRINTER_STATUS", 0x6721}, + {"linux/usb/g_printer.h", "GADGET_SET_PRINTER_STATUS", 0x6722}, + {"linux/usb/functionfs.h", "FUNCTIONFS_INTERFACE_REVMAP", 0x6780}, + {"linux/usb/functionfs.h", "FUNCTIONFS_ENDPOINT_REVMAP", 0x6781}, + {"linux/hpet.h", "HPET_IE_ON", 0x6801}, + {"linux/hpet.h", "HPET_IE_OFF", 0x6802}, + {"linux/hpet.h", "HPET_INFO", 0x6803}, + {"linux/hpet.h", "HPET_EPI", 0x6804}, + {"linux/hpet.h", "HPET_DPI", 0x6805}, + {"linux/hpet.h", "HPET_IRQFREQ", 0x6806}, + {"linux/i2o-dev.h", "I2OGETIOPS", 0x6900}, + {"media/lirc.h", "LIRC_GET_FEATURES", 0x6900}, + {"linux/i2o-dev.h", "I2OHRTGET", 0x6901}, + {"media/lirc.h", "LIRC_GET_SEND_MODE", 0x6901}, + {"linux/i2o-dev.h", "I2OLCTGET", 0x6902}, + {"media/lirc.h", "LIRC_GET_REC_MODE", 0x6902}, + {"linux/i2o-dev.h", "I2OPARMSET", 0x6903}, + {"media/lirc.h", "LIRC_GET_SEND_CARRIER", 0x6903}, + {"linux/i2o-dev.h", "I2OPARMGET", 0x6904}, + {"media/lirc.h", "LIRC_GET_REC_CARRIER", 0x6904}, + {"linux/i2o-dev.h", "I2OSWDL", 0x6905}, + {"media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", 0x6905}, + {"linux/i2o-dev.h", "I2OSWUL", 0x6906}, + {"media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", 0x6906}, + {"linux/i2o-dev.h", "I2OSWDEL", 0x6907}, + {"media/lirc.h", "LIRC_GET_REC_RESOLUTION", 0x6907}, + {"linux/i2o-dev.h", "I2OVALIDATE", 0x6908}, + {"media/lirc.h", "LIRC_GET_MIN_TIMEOUT", 0x6908}, + {"linux/i2o-dev.h", "I2OHTML", 0x6909}, + {"media/lirc.h", "LIRC_GET_MAX_TIMEOUT", 0x6909}, + {"linux/i2o-dev.h", "I2OEVTREG", 0x690a}, + {"media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", 0x690a}, + {"linux/i2o-dev.h", "I2OEVTGET", 0x690b}, + {"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0x690b}, + {"media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", 0x690b}, + {"linux/i2o-dev.h", "I2OPASSTHRU", 0x690c}, + {"linux/i2o-dev.h", "I2OPASSTHRU32", 0x690c}, + {"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0x690c}, + {"media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", 0x690c}, + {"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x690d}, + {"media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", 0x690d}, + {"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", 0x690e}, + {"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", 0x690f}, + {"media/lirc.h", "LIRC_GET_LENGTH", 0x690f}, + {"linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", 0x6910}, + {"linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", 0x6911}, + {"media/lirc.h", "LIRC_SET_SEND_MODE", 0x6911}, + {"linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", 0x6912}, + {"media/lirc.h", "LIRC_SET_REC_MODE", 0x6912}, + {"linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", 0x6913}, + {"media/lirc.h", "LIRC_SET_SEND_CARRIER", 0x6913}, + {"linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", 0x6914}, + {"media/lirc.h", "LIRC_SET_REC_CARRIER", 0x6914}, + {"linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", 0x6915}, + {"media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", 0x6915}, + {"linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", 0x6916}, + {"media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", 0x6916}, + {"linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", 0x6917}, + {"media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", 0x6917}, + {"media/lirc.h", "LIRC_SET_REC_TIMEOUT", 0x6918}, + {"media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", 0x6919}, + {"media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", 0x691a}, + {"media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", 0x691b}, + {"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD_CHANS", 0x691c}, + {"media/lirc.h", "LIRC_SET_REC_FILTER", 0x691c}, + {"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", 0x691d}, + {"media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", 0x691d}, + {"linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", 0x691e}, + {"media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", 0x691e}, + {"linux/ipmi.h", "IPMICTL_SET_MAINTENANCE_MODE_CMD", 0x691f}, + {"media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", 0x691f}, + {"media/lirc.h", "LIRC_NOTIFY_DECODE", 0x6920}, + {"media/lirc.h", "LIRC_SETUP_START", 0x6921}, + {"media/lirc.h", "LIRC_SETUP_END", 0x6922}, + {"media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", 0x6923}, + {"linux/i8k.h", "I8K_BIOS_VERSION", 0x6980}, + {"linux/i8k.h", "I8K_MACHINE_ID", 0x6981}, + {"linux/i8k.h", "I8K_POWER_STATUS", 0x6982}, + {"linux/i8k.h", "I8K_FN_STATUS", 0x6983}, + {"linux/i8k.h", "I8K_GET_TEMP", 0x6984}, + {"linux/i8k.h", "I8K_GET_SPEED", 0x6985}, + {"linux/i8k.h", "I8K_GET_FAN", 0x6986}, + {"linux/i8k.h", "I8K_SET_FAN", 0x6987}, + {"linux/joystick.h", "JSIOCGVERSION", 0x6a01}, + {"linux/joystick.h", "JSIOCGAXES", 0x6a11}, + {"linux/joystick.h", "JSIOCGBUTTONS", 0x6a12}, + {"linux/joystick.h", "JSIOCSCORR", 0x6a21}, + {"linux/joystick.h", "JSIOCGCORR", 0x6a22}, + {"linux/joystick.h", "JSIOCSAXMAP", 0x6a31}, + {"linux/joystick.h", "JSIOCGAXMAP", 0x6a32}, + {"linux/joystick.h", "JSIOCSBTNMAP", 0x6a33}, + {"linux/joystick.h", "JSIOCGBTNMAP", 0x6a34}, + {"video/kyro.h", "KYRO_IOCTL_OVERLAY_CREATE", 0x6b00}, + {"video/kyro.h", "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", 0x6b01}, + {"linux/spi/spidev.h", "SPI_IOC_RD_MODE", 0x6b01}, + {"linux/spi/spidev.h", "SPI_IOC_WR_MODE", 0x6b01}, + {"video/kyro.h", "KYRO_IOCTL_SET_VIDEO_MODE", 0x6b02}, + {"linux/spi/spidev.h", "SPI_IOC_RD_LSB_FIRST", 0x6b02}, + {"linux/spi/spidev.h", "SPI_IOC_WR_LSB_FIRST", 0x6b02}, + {"video/kyro.h", "KYRO_IOCTL_UVSTRIDE", 0x6b03}, + {"linux/spi/spidev.h", "SPI_IOC_RD_BITS_PER_WORD", 0x6b03}, + {"linux/spi/spidev.h", "SPI_IOC_WR_BITS_PER_WORD", 0x6b03}, + {"video/kyro.h", "KYRO_IOCTL_OVERLAY_OFFSET", 0x6b04}, + {"linux/spi/spidev.h", "SPI_IOC_RD_MAX_SPEED_HZ", 0x6b04}, + {"linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", 0x6b04}, + {"video/kyro.h", "KYRO_IOCTL_STRIDE", 0x6b05}, + {"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x6c40}, + {"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x6c41}, + {"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42}, + {"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43}, + {"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00}, + {"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00}, + {"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00}, + {"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01}, + {"linux/mmtimer.h", "MMTIMER_GETRES", 0x6d01}, + {"linux/mtio.h", "MTIOCTOP", 0x6d01}, + {"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0x6d01}, + {"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02}, + {"linux/mmtimer.h", "MMTIMER_GETFREQ", 0x6d02}, + {"linux/mtio.h", "MTIOCGET", 0x6d02}, + {"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0x6d02}, + {"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03}, + {"linux/mtio.h", "MTIOCPOS", 0x6d03}, + {"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04}, + {"linux/mmtimer.h", "MMTIMER_GETBITS", 0x6d04}, + {"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05}, + {"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06}, + {"linux/mmtimer.h", "MMTIMER_MMAPAVAIL", 0x6d06}, + {"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07}, + {"linux/synclink.h", "MGSL_IOCWAITEVENT", 0x6d08}, + {"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09}, + {"linux/mmtimer.h", "MMTIMER_GETCOUNTER", 0x6d09}, + {"linux/synclink.h", "MGSL_IOCSIF", 0x6d0a}, + {"linux/synclink.h", "MGSL_IOCGIF", 0x6d0b}, + {"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f}, + {"linux/synclink.h", "MGSL_IOCSGPIO", 0x6d10}, + {"linux/synclink.h", "MGSL_IOCGGPIO", 0x6d11}, + {"linux/synclink.h", "MGSL_IOCWAITGPIO", 0x6d12}, + {"linux/synclink.h", "MGSL_IOCSXSYNC", 0x6d13}, + {"linux/synclink.h", "MGSL_IOCGXSYNC", 0x6d14}, + {"linux/synclink.h", "MGSL_IOCSXCTRL", 0x6d15}, + {"linux/synclink.h", "MGSL_IOCGXCTRL", 0x6d16}, + {"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x6e01}, + {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x6e02}, + {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x6e02}, + {"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03}, + {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0x6e04}, + {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0x6e04}, + {"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x6e05}, + {"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x6e06}, + {"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x6e06}, + {"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x6e07}, + {"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x6e08}, + {"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x6e08}, + {"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0x6e09}, + {"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x6e09}, + {"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0x6e0a}, + {"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x6e0a}, + {"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0x6e0b}, + {"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x6e0b}, + {"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x6e0c}, + {"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x6e0c}, + {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x6ef8}, + {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x6ef8}, + {"video/sisfb.h", "SISFB_GET_INFO_OLD", 0x6ef8}, + {"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x6ef9}, + {"video/sisfb.h", "SISFB_GET_VBRSTATUS_OLD", 0x6ef9}, + {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0x6efa}, + {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x6efa}, + {"video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE_OLD", 0x6efa}, + {"video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE_OLD", 0x6efa}, + {"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x6efb}, + {"mtd/ubi-user.h", "UBI_IOCMKVOL", 0x6f00}, + {"linux/dvb/audio.h", "AUDIO_STOP", 0x6f01}, + {"mtd/ubi-user.h", "UBI_IOCRMVOL", 0x6f01}, + {"linux/dvb/audio.h", "AUDIO_PLAY", 0x6f02}, + {"mtd/ubi-user.h", "UBI_IOCRSVOL", 0x6f02}, + {"linux/dvb/audio.h", "AUDIO_PAUSE", 0x6f03}, + {"mtd/ubi-user.h", "UBI_IOCRNVOL", 0x6f03}, + {"linux/dvb/audio.h", "AUDIO_CONTINUE", 0x6f04}, + {"linux/dvb/audio.h", "AUDIO_SELECT_SOURCE", 0x6f05}, + {"linux/dvb/audio.h", "AUDIO_SET_MUTE", 0x6f06}, + {"linux/dvb/audio.h", "AUDIO_SET_AV_SYNC", 0x6f07}, + {"linux/dvb/audio.h", "AUDIO_SET_BYPASS_MODE", 0x6f08}, + {"linux/dvb/audio.h", "AUDIO_CHANNEL_SELECT", 0x6f09}, + {"linux/dvb/audio.h", "AUDIO_GET_STATUS", 0x6f0a}, + {"linux/dvb/audio.h", "AUDIO_GET_CAPABILITIES", 0x6f0b}, + {"linux/dvb/audio.h", "AUDIO_CLEAR_BUFFER", 0x6f0c}, + {"linux/dvb/audio.h", "AUDIO_SET_ID", 0x6f0d}, + {"linux/dvb/audio.h", "AUDIO_SET_MIXER", 0x6f0e}, + {"linux/dvb/audio.h", "AUDIO_SET_STREAMTYPE", 0x6f0f}, + {"linux/dvb/audio.h", "AUDIO_SET_EXT_ID", 0x6f10}, + {"linux/dvb/audio.h", "AUDIO_SET_ATTRIBUTES", 0x6f11}, + {"linux/dvb/audio.h", "AUDIO_SET_KARAOKE", 0x6f12}, + {"linux/dvb/audio.h", "AUDIO_GET_PTS", 0x6f13}, + {"linux/dvb/audio.h", "AUDIO_BILINGUAL_CHANNEL_SELECT", 0x6f14}, + {"linux/dvb/video.h", "VIDEO_STOP", 0x6f15}, + {"linux/dvb/video.h", "VIDEO_PLAY", 0x6f16}, + {"linux/dvb/video.h", "VIDEO_FREEZE", 0x6f17}, + {"linux/dvb/video.h", "VIDEO_CONTINUE", 0x6f18}, + {"linux/dvb/video.h", "VIDEO_SELECT_SOURCE", 0x6f19}, + {"linux/dvb/video.h", "VIDEO_SET_BLANK", 0x6f1a}, + {"linux/dvb/video.h", "VIDEO_GET_STATUS", 0x6f1b}, + {"linux/dvb/video.h", "VIDEO_GET_EVENT", 0x6f1c}, + {"linux/dvb/video.h", "VIDEO_SET_DISPLAY_FORMAT", 0x6f1d}, + {"linux/dvb/video.h", "VIDEO_STILLPICTURE", 0x6f1e}, + {"linux/dvb/video.h", "VIDEO_FAST_FORWARD", 0x6f1f}, + {"linux/dvb/video.h", "VIDEO_SLOWMOTION", 0x6f20}, + {"linux/dvb/video.h", "VIDEO_GET_CAPABILITIES", 0x6f21}, + {"linux/dvb/video.h", "VIDEO_CLEAR_BUFFER", 0x6f22}, + {"linux/dvb/video.h", "VIDEO_SET_ID", 0x6f23}, + {"linux/dvb/video.h", "VIDEO_SET_STREAMTYPE", 0x6f24}, + {"linux/dvb/video.h", "VIDEO_SET_FORMAT", 0x6f25}, + {"linux/dvb/video.h", "VIDEO_SET_SYSTEM", 0x6f26}, + {"linux/dvb/video.h", "VIDEO_SET_HIGHLIGHT", 0x6f27}, + {"linux/dvb/dmx.h", "DMX_START", 0x6f29}, + {"linux/dvb/dmx.h", "DMX_STOP", 0x6f2a}, + {"linux/dvb/dmx.h", "DMX_SET_FILTER", 0x6f2b}, + {"linux/dvb/dmx.h", "DMX_SET_PES_FILTER", 0x6f2c}, + {"linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", 0x6f2d}, + {"linux/dvb/dmx.h", "DMX_GET_PES_PIDS", 0x6f2f}, + {"linux/dvb/dmx.h", "DMX_GET_CAPS", 0x6f30}, + {"linux/dvb/dmx.h", "DMX_SET_SOURCE", 0x6f31}, + {"linux/dvb/dmx.h", "DMX_GET_STC", 0x6f32}, + {"linux/dvb/video.h", "VIDEO_SET_SPU", 0x6f32}, + {"linux/dvb/dmx.h", "DMX_ADD_PID", 0x6f33}, + {"linux/dvb/video.h", "VIDEO_SET_SPU_PALETTE", 0x6f33}, + {"linux/dvb/dmx.h", "DMX_REMOVE_PID", 0x6f34}, + {"linux/dvb/net.h", "NET_ADD_IF", 0x6f34}, + {"linux/dvb/video.h", "VIDEO_GET_NAVI", 0x6f34}, + {"linux/dvb/net.h", "NET_REMOVE_IF", 0x6f35}, + {"linux/dvb/video.h", "VIDEO_SET_ATTRIBUTES", 0x6f35}, + {"linux/dvb/net.h", "NET_GET_IF", 0x6f36}, + {"linux/dvb/video.h", "VIDEO_GET_SIZE", 0x6f37}, + {"linux/dvb/video.h", "VIDEO_GET_FRAME_RATE", 0x6f38}, + {"linux/dvb/video.h", "VIDEO_GET_PTS", 0x6f39}, + {"linux/dvb/video.h", "VIDEO_GET_FRAME_COUNT", 0x6f3a}, + {"linux/dvb/video.h", "VIDEO_COMMAND", 0x6f3b}, + {"linux/dvb/video.h", "VIDEO_TRY_COMMAND", 0x6f3c}, + {"linux/dvb/frontend.h", "FE_GET_INFO", 0x6f3d}, + {"linux/dvb/frontend.h", "FE_DISEQC_RESET_OVERLOAD", 0x6f3e}, + {"linux/dvb/frontend.h", "FE_DISEQC_SEND_MASTER_CMD", 0x6f3f}, + {"linux/dvb/frontend.h", "FE_DISEQC_RECV_SLAVE_REPLY", 0x6f40}, + {"mtd/ubi-user.h", "UBI_IOCATT", 0x6f40}, + {"linux/dvb/frontend.h", "FE_DISEQC_SEND_BURST", 0x6f41}, + {"mtd/ubi-user.h", "UBI_IOCDET", 0x6f41}, + {"linux/dvb/frontend.h", "FE_SET_TONE", 0x6f42}, + {"linux/dvb/frontend.h", "FE_SET_VOLTAGE", 0x6f43}, + {"linux/dvb/frontend.h", "FE_ENABLE_HIGH_LNB_VOLTAGE", 0x6f44}, + {"linux/dvb/frontend.h", "FE_READ_STATUS", 0x6f45}, + {"linux/dvb/frontend.h", "FE_READ_BER", 0x6f46}, + {"linux/dvb/frontend.h", "FE_READ_SIGNAL_STRENGTH", 0x6f47}, + {"linux/dvb/frontend.h", "FE_READ_SNR", 0x6f48}, + {"linux/dvb/frontend.h", "FE_READ_UNCORRECTED_BLOCKS", 0x6f49}, + {"linux/dvb/frontend.h", "FE_SET_FRONTEND", 0x6f4c}, + {"linux/dvb/frontend.h", "FE_GET_FRONTEND", 0x6f4d}, + {"linux/dvb/frontend.h", "FE_GET_EVENT", 0x6f4e}, + {"linux/dvb/frontend.h", "FE_DISHNETWORK_SEND_LEGACY_CMD", 0x6f50}, + {"linux/dvb/frontend.h", "FE_SET_FRONTEND_TUNE_MODE", 0x6f51}, + {"linux/dvb/frontend.h", "FE_SET_PROPERTY", 0x6f52}, + {"linux/dvb/frontend.h", "FE_GET_PROPERTY", 0x6f53}, + {"linux/dvb/ca.h", "CA_RESET", 0x6f80}, + {"linux/dvb/ca.h", "CA_GET_CAP", 0x6f81}, + {"linux/dvb/ca.h", "CA_GET_SLOT_INFO", 0x6f82}, + {"linux/dvb/ca.h", "CA_GET_DESCR_INFO", 0x6f83}, + {"linux/dvb/ca.h", "CA_GET_MSG", 0x6f84}, + {"linux/dvb/ca.h", "CA_SEND_MSG", 0x6f85}, + {"linux/dvb/ca.h", "CA_SET_DESCR", 0x6f86}, + {"linux/dvb/ca.h", "CA_SET_PID", 0x6f87}, + {"linux/dvb/osd.h", "OSD_SEND_CMD", 0x6fa0}, + {"linux/dvb/osd.h", "OSD_GET_CAPABILITY", 0x6fa1}, + {"linux/phantom.h", "PHN_GET_REG", 0x7000}, + {"linux/phantom.h", "PHN_SET_REG", 0x7001}, + {"linux/rtc.h", "RTC_AIE_ON", 0x7001}, + {"linux/phantom.h", "PHN_GET_REGS", 0x7002}, + {"linux/rtc.h", "RTC_AIE_OFF", 0x7002}, + {"linux/phantom.h", "PHN_SET_REGS", 0x7003}, + {"linux/rtc.h", "RTC_UIE_ON", 0x7003}, + {"linux/phantom.h", "PHN_NOT_OH", 0x7004}, + {"linux/rtc.h", "RTC_UIE_OFF", 0x7004}, + {"linux/phantom.h", "PHN_GETREG", 0x7005}, + {"linux/rtc.h", "RTC_PIE_ON", 0x7005}, + {"linux/phantom.h", "PHN_SETREG", 0x7006}, + {"linux/rtc.h", "RTC_PIE_OFF", 0x7006}, + {"linux/phantom.h", "PHN_GETREGS", 0x7007}, + {"linux/rtc.h", "RTC_ALM_SET", 0x7007}, + {"linux/phantom.h", "PHN_SETREGS", 0x7008}, + {"linux/rtc.h", "RTC_ALM_READ", 0x7008}, + {"linux/rtc.h", "RTC_RD_TIME", 0x7009}, + {"linux/rtc.h", "RTC_SET_TIME", 0x700a}, + {"linux/rtc.h", "RTC_IRQP_READ", 0x700b}, + {"linux/rtc.h", "RTC_IRQP_SET", 0x700c}, + {"linux/rtc.h", "RTC_EPOCH_READ", 0x700d}, + {"linux/rtc.h", "RTC_EPOCH_SET", 0x700e}, + {"linux/rtc.h", "RTC_WIE_ON", 0x700f}, + {"linux/rtc.h", "RTC_WKALM_SET", 0x700f}, + {"linux/rtc.h", "RTC_WIE_OFF", 0x7010}, + {"linux/rtc.h", "RTC_WKALM_RD", 0x7010}, + {"linux/rtc.h", "RTC_PLL_GET", 0x7011}, + {"linux/rtc.h", "RTC_PLL_SET", 0x7012}, + {"linux/rtc.h", "RTC_VL_READ", 0x7013}, + {"linux/rtc.h", "RTC_VL_CLR", 0x7014}, + {"linux/nvram.h", "NVRAM_INIT", 0x7040}, + {"linux/nvram.h", "NVRAM_SETCKS", 0x7041}, + {"linux/ppdev.h", "PPSETMODE", 0x7080}, + {"linux/ppdev.h", "PPRSTATUS", 0x7081}, + {"linux/ppdev.h", "PPRCONTROL", 0x7083}, + {"linux/ppdev.h", "PPWCONTROL", 0x7084}, + {"linux/ppdev.h", "PPRDATA", 0x7085}, + {"linux/ppdev.h", "PPWDATA", 0x7086}, + {"linux/ppdev.h", "PPCLAIM", 0x708b}, + {"linux/ppdev.h", "PPRELEASE", 0x708c}, + {"linux/ppdev.h", "PPYIELD", 0x708d}, + {"linux/ppdev.h", "PPFCONTROL", 0x708e}, + {"linux/ppdev.h", "PPEXCL", 0x708f}, + {"linux/ppdev.h", "PPDATADIR", 0x7090}, + {"linux/ppdev.h", "PPNEGOT", 0x7091}, + {"linux/ppdev.h", "PPWCTLONIRQ", 0x7092}, + {"linux/ppdev.h", "PPCLRIRQ", 0x7093}, + {"linux/ppdev.h", "PPSETPHASE", 0x7094}, + {"linux/ppdev.h", "PPGETTIME", 0x7095}, + {"linux/ppdev.h", "PPSETTIME", 0x7096}, + {"linux/ppdev.h", "PPGETMODES", 0x7097}, + {"linux/ppdev.h", "PPGETMODE", 0x7098}, + {"linux/ppdev.h", "PPGETPHASE", 0x7099}, + {"linux/ppdev.h", "PPGETFLAGS", 0x709a}, + {"linux/ppdev.h", "PPSETFLAGS", 0x709b}, + {"linux/pps.h", "PPS_GETPARAMS", 0x70a1}, + {"linux/pps.h", "PPS_SETPARAMS", 0x70a2}, + {"linux/pps.h", "PPS_GETCAP", 0x70a3}, + {"linux/pps.h", "PPS_FETCH", 0x70a4}, + {"linux/pps.h", "PPS_KC_BIND", 0x70a5}, + {"linux/serio.h", "SPIOCSTYPE", 0x7101}, + {"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180}, + {"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x7181}, + {"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x7182}, + {"linux/telephony.h", "PHONE_RING", 0x7183}, + {"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184}, + {"linux/telephony.h", "PHONE_MAXRINGS", 0x7185}, + {"linux/telephony.h", "PHONE_RING_CADENCE", 0x7186}, + {"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187}, + {"linux/telephony.h", "PHONE_RING_START", 0x7187}, + {"linux/telephony.h", "PHONE_RING_STOP", 0x7188}, + {"linux/telephony.h", "PHONE_REC_CODEC", 0x7189}, + {"linux/telephony.h", "PHONE_REC_START", 0x718a}, + {"linux/telephony.h", "PHONE_REC_STOP", 0x718b}, + {"linux/telephony.h", "PHONE_REC_DEPTH", 0x718c}, + {"linux/telephony.h", "PHONE_FRAME", 0x718d}, + {"linux/telephony.h", "PHONE_REC_VOLUME", 0x718e}, + {"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f}, + {"linux/telephony.h", "PHONE_PLAY_CODEC", 0x7190}, + {"linux/telephony.h", "PHONE_PLAY_START", 0x7191}, + {"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192}, + {"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x7193}, + {"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x7194}, + {"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195}, + {"linux/telephony.h", "PHONE_DTMF_READY", 0x7196}, + {"linux/telephony.h", "PHONE_GET_DTMF", 0x7197}, + {"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x7198}, + {"linux/telephony.h", "PHONE_DTMF_OOB", 0x7199}, + {"linux/telephony.h", "PHONE_EXCEPTION", 0x719a}, + {"linux/telephony.h", "PHONE_PLAY_TONE", 0x719b}, + {"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x719c}, + {"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x719d}, + {"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e}, + {"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f}, + {"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0}, + {"linux/telephony.h", "PHONE_BUSY", 0x71a1}, + {"linux/telephony.h", "PHONE_RINGBACK", 0x71a2}, + {"linux/telephony.h", "PHONE_DIALTONE", 0x71a3}, + {"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4}, + {"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x71a4}, + {"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5}, + {"linux/telephony.h", "PHONE_WINK_DURATION", 0x71a6}, + {"linux/telephony.h", "PHONE_QUERY_CODEC", 0x71a7}, + {"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8}, + {"linux/telephony.h", "PHONE_VAD", 0x71a9}, + {"linux/telephony.h", "PHONE_WINK", 0x71aa}, + {"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0}, + {"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x71c1}, + {"linux/ixjuser.h", "IXJCTL_SERIAL", 0x71c2}, + {"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x71c3}, + {"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x71c4}, + {"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5}, + {"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6}, + {"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x71c7}, + {"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x71c8}, + {"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x71c9}, + {"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x71ca}, + {"linux/ixjuser.h", "IXJCTL_AEC_START", 0x71cb}, + {"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc}, + {"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd}, + {"linux/ixjuser.h", "IXJCTL_SET_LED", 0x71ce}, + {"linux/ixjuser.h", "IXJCTL_MIXER", 0x71cf}, + {"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x71d0}, + {"linux/ixjuser.h", "IXJCTL_PORT", 0x71d1}, + {"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x71d2}, + {"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3}, + {"linux/ixjuser.h", "IXJCTL_CID", 0x71d4}, + {"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x71d5}, + {"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x71d6}, + {"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7}, + {"linux/ixjuser.h", "IXJCTL_VMWI", 0x71d8}, + {"linux/ixjuser.h", "IXJCTL_CIDCW", 0x71d9}, + {"linux/ixjuser.h", "IXJCTL_VERSION", 0x71da}, + {"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x71db}, + {"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x71dc}, + {"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x71dd}, + {"linux/ixjuser.h", "IXJCTL_HZ", 0x71e0}, + {"linux/ixjuser.h", "IXJCTL_RATE", 0x71e1}, + {"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x71e2}, + {"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x71e3}, + {"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x71e4}, + {"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x71e5}, + {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x71e6}, + {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7}, + {"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x71e8}, + {"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x71e9}, + {"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x71ea}, + {"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x71eb}, + {"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x71fd}, + {"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x71fe}, + {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x7201}, + {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x7202}, + {"linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", 0x7210}, + {"linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", 0x7211}, + {"linux/ppp-ioctl.h", "PPPIOCGL2TPSTATS", 0x7436}, + {"linux/ppp-ioctl.h", "PPPIOCGCHAN", 0x7437}, + {"linux/ppp-ioctl.h", "PPPIOCATTCHAN", 0x7438}, + {"linux/ppp-ioctl.h", "PPPIOCDISCONN", 0x7439}, + {"linux/ppp-ioctl.h", "PPPIOCCONNECT", 0x743a}, + {"linux/ppp-ioctl.h", "PPPIOCSMRRU", 0x743b}, + {"linux/ppp-ioctl.h", "PPPIOCDETACH", 0x743c}, + {"linux/ppp-ioctl.h", "PPPIOCATTACH", 0x743d}, + {"linux/ppp-ioctl.h", "PPPIOCNEWUNIT", 0x743e}, + {"linux/ppp-ioctl.h", "PPPIOCGIDLE", 0x743f}, + {"linux/ppp-ioctl.h", "PPPIOCSDEBUG", 0x7440}, + {"linux/ppp-ioctl.h", "PPPIOCGDEBUG", 0x7441}, + {"linux/ppp-ioctl.h", "PPPIOCSACTIVE", 0x7446}, + {"linux/ppp-ioctl.h", "PPPIOCSPASS", 0x7447}, + {"linux/ppp-ioctl.h", "PPPIOCSNPMODE", 0x744b}, + {"linux/ppp-ioctl.h", "PPPIOCGNPMODE", 0x744c}, + {"linux/ppp-ioctl.h", "PPPIOCSCOMPRESS", 0x744d}, + {"linux/ppp-ioctl.h", "PPPIOCXFERUNIT", 0x744e}, + {"linux/ppp-ioctl.h", "PPPIOCSXASYNCMAP", 0x744f}, + {"linux/ppp-ioctl.h", "PPPIOCGXASYNCMAP", 0x7450}, + {"linux/ppp-ioctl.h", "PPPIOCSMAXCID", 0x7451}, + {"linux/ppp-ioctl.h", "PPPIOCSMRU", 0x7452}, + {"linux/ppp-ioctl.h", "PPPIOCGMRU", 0x7453}, + {"linux/ppp-ioctl.h", "PPPIOCSRASYNCMAP", 0x7454}, + {"linux/ppp-ioctl.h", "PPPIOCGRASYNCMAP", 0x7455}, + {"linux/ppp-ioctl.h", "PPPIOCGUNIT", 0x7456}, + {"linux/ppp-ioctl.h", "PPPIOCSASYNCMAP", 0x7457}, + {"linux/ppp-ioctl.h", "PPPIOCGASYNCMAP", 0x7458}, + {"linux/ppp-ioctl.h", "PPPIOCSFLAGS", 0x7459}, + {"linux/ppp-ioctl.h", "PPPIOCGFLAGS", 0x745a}, + {"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0x7480}, + {"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x7481}, + {"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x7482}, + {"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x7483}, + {"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x7484}, + {"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x7485}, + {"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x7486}, + {"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x7487}, + {"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x7488}, + {"linux/toshiba.h", "TOSH_SMM", 0x7490}, + {"linux/uvcvideo.h", "UVCIOC_CTRL_MAP", 0x7520}, + {"linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", 0x7521}, + {"linux/sonypi.h", "SONYPI_IOCGBRT", 0x7600}, + {"linux/sonypi.h", "SONYPI_IOCSBRT", 0x7600}, + {"media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", 0x7600}, + {"linux/fs.h", "FS_IOC32_GETVERSION", 0x7601}, + {"linux/fs.h", "FS_IOC_GETVERSION", 0x7601}, + {"media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", 0x7601}, + {"linux/fs.h", "FS_IOC32_SETVERSION", 0x7602}, + {"linux/fs.h", "FS_IOC_SETVERSION", 0x7602}, + {"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x7602}, + {"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x7603}, + {"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x7604}, + {"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x7605}, + {"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x7607}, + {"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x7608}, + {"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x7609}, + {"linux/sonypi.h", "SONYPI_IOCGFAN", 0x760a}, + {"linux/sonypi.h", "SONYPI_IOCSFAN", 0x760b}, + {"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x760c}, + {"linux/meye.h", "MEYEIOC_G_PARAMS", 0x76c0}, + {"linux/meye.h", "MEYEIOC_S_PARAMS", 0x76c1}, + {"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x76c2}, + {"linux/meye.h", "MEYEIOC_SYNC", 0x76c3}, + {"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4}, + {"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x76c5}, + {"linux/media.h", "MEDIA_IOC_DEVICE_INFO", 0x7c00}, + {"linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", 0x7c01}, + {"linux/media.h", "MEDIA_IOC_ENUM_LINKS", 0x7c02}, + {"linux/media.h", "MEDIA_IOC_SETUP_LINK", 0x7c03}, + {"asm-generic/sockios.h", "FIOSETOWN", 0x8901}, + {"asm-generic/sockios.h", "SIOCSPGRP", 0x8902}, + {"asm-generic/sockios.h", "FIOGETOWN", 0x8903}, + {"asm-generic/sockios.h", "SIOCGPGRP", 0x8904}, + {"asm-generic/sockios.h", "SIOCATMARK", 0x8905}, + {"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906}, + {"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907}, + {"linux/sockios.h", "SIOCADDRT", 0x890b}, + {"linux/sockios.h", "SIOCDELRT", 0x890c}, + {"linux/sockios.h", "SIOCRTMSG", 0x890d}, + {"linux/sockios.h", "SIOCGIFNAME", 0x8910}, + {"linux/sockios.h", "SIOCSIFLINK", 0x8911}, + {"linux/sockios.h", "SIOCGIFCONF", 0x8912}, + {"linux/sockios.h", "SIOCGIFFLAGS", 0x8913}, + {"linux/sockios.h", "SIOCSIFFLAGS", 0x8914}, + {"linux/sockios.h", "SIOCGIFADDR", 0x8915}, + {"linux/sockios.h", "SIOCSIFADDR", 0x8916}, + {"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917}, + {"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918}, + {"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919}, + {"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a}, + {"linux/sockios.h", "SIOCGIFNETMASK", 0x891b}, + {"linux/sockios.h", "SIOCSIFNETMASK", 0x891c}, + {"linux/sockios.h", "SIOCGIFMETRIC", 0x891d}, + {"linux/sockios.h", "SIOCSIFMETRIC", 0x891e}, + {"linux/sockios.h", "SIOCGIFMEM", 0x891f}, + {"linux/sockios.h", "SIOCSIFMEM", 0x8920}, + {"linux/sockios.h", "SIOCGIFMTU", 0x8921}, + {"linux/sockios.h", "SIOCSIFMTU", 0x8922}, + {"linux/sockios.h", "SIOCSIFNAME", 0x8923}, + {"linux/sockios.h", "SIOCSIFHWADDR", 0x8924}, + {"linux/sockios.h", "SIOCGIFENCAP", 0x8925}, + {"linux/sockios.h", "SIOCSIFENCAP", 0x8926}, + {"linux/sockios.h", "SIOCGIFHWADDR", 0x8927}, + {"linux/sockios.h", "SIOCGIFSLAVE", 0x8929}, + {"linux/sockios.h", "SIOCSIFSLAVE", 0x8930}, + {"linux/sockios.h", "SIOCADDMULTI", 0x8931}, + {"linux/sockios.h", "SIOCDELMULTI", 0x8932}, + {"linux/sockios.h", "SIOCGIFINDEX", 0x8933}, + {"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934}, + {"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935}, + {"linux/sockios.h", "SIOCDIFADDR", 0x8936}, + {"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937}, + {"linux/sockios.h", "SIOCGIFCOUNT", 0x8938}, + {"linux/sockios.h", "SIOCGIFBR", 0x8940}, + {"linux/sockios.h", "SIOCSIFBR", 0x8941}, + {"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942}, + {"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943}, + {"linux/sockios.h", "SIOCETHTOOL", 0x8946}, + {"linux/sockios.h", "SIOCGMIIPHY", 0x8947}, + {"linux/sockios.h", "SIOCGMIIREG", 0x8948}, + {"linux/sockios.h", "SIOCSMIIREG", 0x8949}, + {"linux/sockios.h", "SIOCWANDEV", 0x894a}, + {"linux/sockios.h", "SIOCOUTQNSD", 0x894b}, + {"linux/sockios.h", "SIOCDARP", 0x8953}, + {"linux/sockios.h", "SIOCGARP", 0x8954}, + {"linux/sockios.h", "SIOCSARP", 0x8955}, + {"linux/sockios.h", "SIOCDRARP", 0x8960}, + {"linux/sockios.h", "SIOCGRARP", 0x8961}, + {"linux/sockios.h", "SIOCSRARP", 0x8962}, + {"linux/sockios.h", "SIOCGIFMAP", 0x8970}, + {"linux/sockios.h", "SIOCSIFMAP", 0x8971}, + {"linux/sockios.h", "SIOCADDDLCI", 0x8980}, + {"linux/sockios.h", "SIOCDELDLCI", 0x8981}, + {"linux/sockios.h", "SIOCGIFVLAN", 0x8982}, + {"linux/sockios.h", "SIOCSIFVLAN", 0x8983}, + {"linux/sockios.h", "SIOCBONDENSLAVE", 0x8990}, + {"linux/sockios.h", "SIOCBONDRELEASE", 0x8991}, + {"linux/sockios.h", "SIOCBONDSETHWADDR", 0x8992}, + {"linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0x8993}, + {"linux/sockios.h", "SIOCBONDINFOQUERY", 0x8994}, + {"linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0x8995}, + {"linux/sockios.h", "SIOCBRADDBR", 0x89a0}, + {"linux/sockios.h", "SIOCBRDELBR", 0x89a1}, + {"linux/sockios.h", "SIOCBRADDIF", 0x89a2}, + {"linux/sockios.h", "SIOCBRDELIF", 0x89a3}, + {"linux/sockios.h", "SIOCSHWTSTAMP", 0x89b0}, + {"linux/dn.h", "OSIOCSNETADDR", 0x89e0}, + {"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0}, + {"linux/dn.h", "SIOCSNETADDR", 0x89e0}, + {"linux/dn.h", "OSIOCGNETADDR", 0x89e1}, + {"linux/dn.h", "SIOCGNETADDR", 0x89e1}, + {"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0}, + {"linux/wireless.h", "SIOCIWFIRST", 0x8b00}, + {"linux/wireless.h", "SIOCSIWCOMMIT", 0x8b00}, + {"linux/wireless.h", "SIOCGIWNAME", 0x8b01}, + {"linux/wireless.h", "SIOCSIWNWID", 0x8b02}, + {"linux/wireless.h", "SIOCGIWNWID", 0x8b03}, + {"linux/wireless.h", "SIOCSIWFREQ", 0x8b04}, + {"linux/wireless.h", "SIOCGIWFREQ", 0x8b05}, + {"linux/wireless.h", "SIOCSIWMODE", 0x8b06}, + {"linux/wireless.h", "SIOCGIWMODE", 0x8b07}, + {"linux/wireless.h", "SIOCSIWSENS", 0x8b08}, + {"linux/wireless.h", "SIOCGIWSENS", 0x8b09}, + {"linux/wireless.h", "SIOCSIWRANGE", 0x8b0a}, + {"linux/wireless.h", "SIOCGIWRANGE", 0x8b0b}, + {"linux/wireless.h", "SIOCSIWPRIV", 0x8b0c}, + {"linux/wireless.h", "SIOCGIWPRIV", 0x8b0d}, + {"linux/wireless.h", "SIOCSIWSTATS", 0x8b0e}, + {"linux/wireless.h", "SIOCGIWSTATS", 0x8b0f}, + {"linux/wireless.h", "SIOCSIWSPY", 0x8b10}, + {"linux/wireless.h", "SIOCGIWSPY", 0x8b11}, + {"linux/wireless.h", "SIOCSIWTHRSPY", 0x8b12}, + {"linux/wireless.h", "SIOCGIWTHRSPY", 0x8b13}, + {"linux/wireless.h", "SIOCSIWAP", 0x8b14}, + {"linux/wireless.h", "SIOCGIWAP", 0x8b15}, + {"linux/wireless.h", "SIOCSIWMLME", 0x8b16}, + {"linux/wireless.h", "SIOCGIWAPLIST", 0x8b17}, + {"linux/wireless.h", "SIOCSIWSCAN", 0x8b18}, + {"linux/wireless.h", "SIOCGIWSCAN", 0x8b19}, + {"linux/wireless.h", "SIOCSIWESSID", 0x8b1a}, + {"linux/wireless.h", "SIOCGIWESSID", 0x8b1b}, + {"linux/wireless.h", "SIOCSIWNICKN", 0x8b1c}, + {"linux/wireless.h", "SIOCGIWNICKN", 0x8b1d}, + {"linux/wireless.h", "SIOCSIWRATE", 0x8b20}, + {"linux/wireless.h", "SIOCGIWRATE", 0x8b21}, + {"linux/wireless.h", "SIOCSIWRTS", 0x8b22}, + {"linux/wireless.h", "SIOCGIWRTS", 0x8b23}, + {"linux/wireless.h", "SIOCSIWFRAG", 0x8b24}, + {"linux/wireless.h", "SIOCGIWFRAG", 0x8b25}, + {"linux/wireless.h", "SIOCSIWTXPOW", 0x8b26}, + {"linux/wireless.h", "SIOCGIWTXPOW", 0x8b27}, + {"linux/wireless.h", "SIOCSIWRETRY", 0x8b28}, + {"linux/wireless.h", "SIOCGIWRETRY", 0x8b29}, + {"linux/wireless.h", "SIOCSIWENCODE", 0x8b2a}, + {"linux/wireless.h", "SIOCGIWENCODE", 0x8b2b}, + {"linux/wireless.h", "SIOCSIWPOWER", 0x8b2c}, + {"linux/wireless.h", "SIOCGIWPOWER", 0x8b2d}, + {"linux/wireless.h", "SIOCSIWGENIE", 0x8b30}, + {"linux/wireless.h", "SIOCGIWGENIE", 0x8b31}, + {"linux/wireless.h", "SIOCSIWAUTH", 0x8b32}, + {"linux/wireless.h", "SIOCGIWAUTH", 0x8b33}, + {"linux/wireless.h", "SIOCSIWENCODEEXT", 0x8b34}, + {"linux/wireless.h", "SIOCGIWENCODEEXT", 0x8b35}, + {"linux/wireless.h", "SIOCSIWPMKSA", 0x8b36}, + {"linux/wireless.h", "SIOCIWFIRSTPRIV", 0x8be0}, + {"linux/wireless.h", "SIOCIWLASTPRIV", 0x8bff}, + {"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360}, + {"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361}, + {"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362}, + {"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x9363}, + {"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0x9364}, + {"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", 0x9364}, + {"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x9365}, + {"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x9366}, + {"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x9367}, + {"linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", 0x9370}, + {"linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", 0x9401}, + {"linux/btrfs.h", "BTRFS_IOC_DEFRAG", 0x9402}, + {"linux/btrfs.h", "BTRFS_IOC_RESIZE", 0x9403}, + {"linux/btrfs.h", "BTRFS_IOC_SCAN_DEV", 0x9404}, + {"linux/btrfs.h", "BTRFS_IOC_TRANS_START", 0x9406}, + {"linux/btrfs.h", "BTRFS_IOC_TRANS_END", 0x9407}, + {"linux/btrfs.h", "BTRFS_IOC_SYNC", 0x9408}, + {"linux/btrfs.h", "BTRFS_IOC_CLONE", 0x9409}, + {"linux/btrfs.h", "BTRFS_IOC_ADD_DEV", 0x940a}, + {"linux/btrfs.h", "BTRFS_IOC_RM_DEV", 0x940b}, + {"linux/btrfs.h", "BTRFS_IOC_BALANCE", 0x940c}, + {"linux/btrfs.h", "BTRFS_IOC_CLONE_RANGE", 0x940d}, + {"linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE", 0x940e}, + {"linux/btrfs.h", "BTRFS_IOC_SNAP_DESTROY", 0x940f}, + {"linux/btrfs.h", "BTRFS_IOC_DEFRAG_RANGE", 0x9410}, + {"linux/btrfs.h", "BTRFS_IOC_TREE_SEARCH", 0x9411}, + {"linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", 0x9412}, + {"linux/btrfs.h", "BTRFS_IOC_DEFAULT_SUBVOL", 0x9413}, + {"linux/btrfs.h", "BTRFS_IOC_SPACE_INFO", 0x9414}, + {"linux/btrfs.h", "BTRFS_IOC_WAIT_SYNC", 0x9416}, + {"linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", 0x9417}, + {"linux/btrfs.h", "BTRFS_IOC_START_SYNC", 0x9418}, + {"linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE_V2", 0x9418}, + {"linux/btrfs.h", "BTRFS_IOC_SUBVOL_GETFLAGS", 0x9419}, + {"linux/btrfs.h", "BTRFS_IOC_SUBVOL_SETFLAGS", 0x941a}, + {"linux/btrfs.h", "BTRFS_IOC_SCRUB", 0x941b}, + {"linux/btrfs.h", "BTRFS_IOC_SCRUB_CANCEL", 0x941c}, + {"linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", 0x941d}, + {"linux/btrfs.h", "BTRFS_IOC_DEV_INFO", 0x941e}, + {"linux/btrfs.h", "BTRFS_IOC_FS_INFO", 0x941f}, + {"linux/btrfs.h", "BTRFS_IOC_BALANCE_V2", 0x9420}, + {"linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", 0x9421}, + {"linux/btrfs.h", "BTRFS_IOC_BALANCE_PROGRESS", 0x9422}, + {"linux/btrfs.h", "BTRFS_IOC_INO_PATHS", 0x9423}, + {"linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", 0x9424}, + {"linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", 0x9425}, + {"linux/btrfs.h", "BTRFS_IOC_SEND", 0x9426}, + {"linux/btrfs.h", "BTRFS_IOC_DEVICES_READY", 0x9427}, + {"linux/btrfs.h", "BTRFS_IOC_QUOTA_CTL", 0x9428}, + {"linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", 0x9429}, + {"linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", 0x942a}, + {"linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", 0x942b}, + {"linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", 0x9431}, + {"linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", 0x9432}, + {"linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", 0x9434}, + {"linux/btrfs.h", "BTRFS_IOC_DEV_REPLACE", 0x9435}, + {"linux/nbd.h", "NBD_SET_SOCK", 0xab00}, + {"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01}, + {"linux/nbd.h", "NBD_SET_SIZE", 0xab02}, + {"linux/nbd.h", "NBD_DO_IT", 0xab03}, + {"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04}, + {"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05}, + {"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06}, + {"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07}, + {"linux/nbd.h", "NBD_DISCONNECT", 0xab08}, + {"linux/nbd.h", "NBD_SET_TIMEOUT", 0xab09}, + {"linux/nbd.h", "NBD_SET_FLAGS", 0xab0a}, + {"linux/raw.h", "RAW_SETBIND", 0xac00}, + {"linux/raw.h", "RAW_GETBIND", 0xac01}, + {"linux/kvm.h", "KVM_GET_API_VERSION", 0xae00}, + {"linux/kvm.h", "KVM_CREATE_VM", 0xae01}, + {"linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", 0xae02}, + {"linux/kvm.h", "KVM_CHECK_EXTENSION", 0xae03}, + {"linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", 0xae04}, + {"linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", 0xae05}, + {"linux/kvm.h", "KVM_S390_ENABLE_SIE", 0xae06}, + {"linux/kvm.h", "KVM_SET_MEMORY_REGION", 0xae40}, + {"linux/kvm.h", "KVM_CREATE_VCPU", 0xae41}, + {"linux/kvm.h", "KVM_GET_DIRTY_LOG", 0xae42}, + {"linux/kvm.h", "KVM_SET_MEMORY_ALIAS", 0xae43}, + {"linux/kvm.h", "KVM_SET_NR_MMU_PAGES", 0xae44}, + {"linux/kvm.h", "KVM_GET_NR_MMU_PAGES", 0xae45}, + {"linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", 0xae46}, + {"linux/kvm.h", "KVM_SET_TSS_ADDR", 0xae47}, + {"linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", 0xae48}, + {"linux/kvm.h", "KVM_S390_UCAS_MAP", 0xae50}, + {"linux/kvm.h", "KVM_S390_UCAS_UNMAP", 0xae51}, + {"linux/kvm.h", "KVM_S390_VCPU_FAULT", 0xae52}, + {"linux/kvm.h", "KVM_CREATE_IRQCHIP", 0xae60}, + {"linux/kvm.h", "KVM_IRQ_LINE", 0xae61}, + {"linux/kvm.h", "KVM_GET_IRQCHIP", 0xae62}, + {"linux/kvm.h", "KVM_SET_IRQCHIP", 0xae63}, + {"linux/kvm.h", "KVM_CREATE_PIT", 0xae64}, + {"linux/kvm.h", "KVM_GET_PIT", 0xae65}, + {"linux/kvm.h", "KVM_SET_PIT", 0xae66}, + {"linux/kvm.h", "KVM_IRQ_LINE_STATUS", 0xae67}, + {"linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", 0xae69}, + {"linux/kvm.h", "KVM_SET_GSI_ROUTING", 0xae6a}, + {"linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", 0xae70}, + {"linux/kvm.h", "KVM_REINJECT_CONTROL", 0xae71}, + {"linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", 0xae72}, + {"linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", 0xae73}, + {"linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", 0xae74}, + {"linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", 0xae75}, + {"linux/kvm.h", "KVM_IRQFD", 0xae76}, + {"linux/kvm.h", "KVM_CREATE_PIT2", 0xae77}, + {"linux/kvm.h", "KVM_SET_BOOT_CPU_ID", 0xae78}, + {"linux/kvm.h", "KVM_IOEVENTFD", 0xae79}, + {"linux/kvm.h", "KVM_XEN_HVM_CONFIG", 0xae7a}, + {"linux/kvm.h", "KVM_SET_CLOCK", 0xae7b}, + {"linux/kvm.h", "KVM_GET_CLOCK", 0xae7c}, + {"linux/kvm.h", "KVM_RUN", 0xae80}, + {"linux/kvm.h", "KVM_GET_REGS", 0xae81}, + {"linux/kvm.h", "KVM_SET_REGS", 0xae82}, + {"linux/kvm.h", "KVM_GET_SREGS", 0xae83}, + {"linux/kvm.h", "KVM_SET_SREGS", 0xae84}, + {"linux/kvm.h", "KVM_TRANSLATE", 0xae85}, + {"linux/kvm.h", "KVM_INTERRUPT", 0xae86}, + {"linux/kvm.h", "KVM_GET_MSRS", 0xae88}, + {"linux/kvm.h", "KVM_SET_MSRS", 0xae89}, + {"linux/kvm.h", "KVM_SET_CPUID", 0xae8a}, + {"linux/kvm.h", "KVM_SET_SIGNAL_MASK", 0xae8b}, + {"linux/kvm.h", "KVM_GET_FPU", 0xae8c}, + {"linux/kvm.h", "KVM_SET_FPU", 0xae8d}, + {"linux/kvm.h", "KVM_GET_LAPIC", 0xae8e}, + {"linux/kvm.h", "KVM_SET_LAPIC", 0xae8f}, + {"linux/kvm.h", "KVM_SET_CPUID2", 0xae90}, + {"linux/kvm.h", "KVM_GET_CPUID2", 0xae91}, + {"linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", 0xae92}, + {"linux/kvm.h", "KVM_SET_VAPIC_ADDR", 0xae93}, + {"linux/kvm.h", "KVM_S390_INTERRUPT", 0xae94}, + {"linux/kvm.h", "KVM_S390_STORE_STATUS", 0xae95}, + {"linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", 0xae96}, + {"linux/kvm.h", "KVM_S390_INITIAL_RESET", 0xae97}, + {"linux/kvm.h", "KVM_GET_MP_STATE", 0xae98}, + {"linux/kvm.h", "KVM_SET_MP_STATE", 0xae99}, + {"linux/kvm.h", "KVM_IA64_VCPU_GET_STACK", 0xae9a}, + {"linux/kvm.h", "KVM_NMI", 0xae9a}, + {"linux/kvm.h", "KVM_IA64_VCPU_SET_STACK", 0xae9b}, + {"linux/kvm.h", "KVM_SET_GUEST_DEBUG", 0xae9b}, + {"linux/kvm.h", "KVM_X86_SETUP_MCE", 0xae9c}, + {"linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", 0xae9d}, + {"linux/kvm.h", "KVM_X86_SET_MCE", 0xae9e}, + {"linux/kvm.h", "KVM_GET_PIT2", 0xae9f}, + {"linux/kvm.h", "KVM_GET_VCPU_EVENTS", 0xae9f}, + {"linux/kvm.h", "KVM_SET_PIT2", 0xaea0}, + {"linux/kvm.h", "KVM_SET_VCPU_EVENTS", 0xaea0}, + {"linux/kvm.h", "KVM_GET_DEBUGREGS", 0xaea1}, + {"linux/kvm.h", "KVM_PPC_GET_PVINFO", 0xaea1}, + {"linux/kvm.h", "KVM_SET_DEBUGREGS", 0xaea2}, + {"linux/kvm.h", "KVM_SET_TSC_KHZ", 0xaea2}, + {"linux/kvm.h", "KVM_ENABLE_CAP", 0xaea3}, + {"linux/kvm.h", "KVM_GET_TSC_KHZ", 0xaea3}, + {"linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", 0xaea4}, + {"linux/kvm.h", "KVM_GET_XSAVE", 0xaea4}, + {"linux/kvm.h", "KVM_SET_XSAVE", 0xaea5}, + {"linux/kvm.h", "KVM_SIGNAL_MSI", 0xaea5}, + {"linux/kvm.h", "KVM_GET_XCRS", 0xaea6}, + {"linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", 0xaea6}, + {"linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", 0xaea7}, + {"linux/kvm.h", "KVM_SET_XCRS", 0xaea7}, + {"linux/kvm.h", "KVM_CREATE_SPAPR_TCE", 0xaea8}, + {"linux/kvm.h", "KVM_ALLOCATE_RMA", 0xaea9}, + {"linux/kvm.h", "KVM_DIRTY_TLB", 0xaeaa}, + {"linux/kvm.h", "KVM_PPC_GET_HTAB_FD", 0xaeaa}, + {"linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", 0xaeab}, + {"linux/kvm.h", "KVM_GET_ONE_REG", 0xaeab}, + {"linux/kvm.h", "KVM_SET_ONE_REG", 0xaeac}, + {"linux/kvm.h", "KVM_KVMCLOCK_CTRL", 0xaead}, + {"linux/kvm.h", "KVM_ARM_VCPU_INIT", 0xaeae}, + {"linux/kvm.h", "KVM_GET_REG_LIST", 0xaeb0}, + {"linux/vhost.h", "VHOST_GET_FEATURES", 0xaf00}, + {"linux/vhost.h", "VHOST_SET_FEATURES", 0xaf00}, + {"linux/vhost.h", "VHOST_SET_OWNER", 0xaf01}, + {"linux/vhost.h", "VHOST_RESET_OWNER", 0xaf02}, + {"linux/vhost.h", "VHOST_SET_MEM_TABLE", 0xaf03}, + {"linux/vhost.h", "VHOST_SET_LOG_BASE", 0xaf04}, + {"linux/vhost.h", "VHOST_SET_LOG_FD", 0xaf07}, + {"linux/vhost.h", "VHOST_SET_VRING_NUM", 0xaf10}, + {"linux/vhost.h", "VHOST_SET_VRING_ADDR", 0xaf11}, + {"linux/vhost.h", "VHOST_GET_VRING_BASE", 0xaf12}, + {"linux/vhost.h", "VHOST_SET_VRING_BASE", 0xaf12}, + {"linux/vhost.h", "VHOST_SET_VRING_KICK", 0xaf20}, + {"linux/vhost.h", "VHOST_SET_VRING_CALL", 0xaf21}, + {"linux/vhost.h", "VHOST_SET_VRING_ERR", 0xaf22}, + {"linux/vhost.h", "VHOST_NET_SET_BACKEND", 0xaf30}, + {"linux/if_pppox.h", "PPPOEIOCSFWD", 0xb100}, + {"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101}, + {"linux/mmc/ioctl.h", "MMC_IOC_CMD", 0xb300}, + {"linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", 0xcd01}, + {"video/sisfb.h", "SISFB_GET_INFO_SIZE", 0xf300}, + {"video/sisfb.h", "SISFB_GET_INFO", 0xf301}, + {"video/sisfb.h", "SISFB_GET_VBRSTATUS", 0xf302}, + {"video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE", 0xf303}, + {"video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE", 0xf303}, + {"video/sisfb.h", "SISFB_GET_TVPOSOFFSET", 0xf304}, + {"video/sisfb.h", "SISFB_SET_TVPOSOFFSET", 0xf304}, + {"video/sisfb.h", "SISFB_COMMAND", 0xf305}, + {"video/sisfb.h", "SISFB_SET_LOCK", 0xf306}, + {"video/mbxfb.h", "MBXFB_IOCX_OVERLAY", 0xf400}, + {"video/mbxfb.h", "MBXFB_IOCG_ALPHA", 0xf401}, + {"video/mbxfb.h", "MBXFB_IOCS_ALPHA", 0xf402}, + {"video/mbxfb.h", "MBXFB_IOCS_PLANEORDER", 0xf403}, + {"video/mbxfb.h", "MBXFB_IOCS_REG", 0xf404}, + {"video/mbxfb.h", "MBXFB_IOCX_REG", 0xf405}, + {"linux/dm-ioctl.h", "DM_VERSION", 0xfd00}, + {"linux/dm-ioctl.h", "DM_REMOVE_ALL", 0xfd01}, + {"linux/dm-ioctl.h", "DM_LIST_DEVICES", 0xfd02}, + {"linux/dm-ioctl.h", "DM_DEV_CREATE", 0xfd03}, + {"linux/dm-ioctl.h", "DM_DEV_REMOVE", 0xfd04}, + {"linux/dm-ioctl.h", "DM_DEV_RENAME", 0xfd05}, + {"linux/dm-ioctl.h", "DM_DEV_SUSPEND", 0xfd06}, + {"linux/dm-ioctl.h", "DM_DEV_STATUS", 0xfd07}, + {"linux/dm-ioctl.h", "DM_DEV_WAIT", 0xfd08}, + {"linux/dm-ioctl.h", "DM_TABLE_LOAD", 0xfd09}, + {"linux/dm-ioctl.h", "DM_TABLE_CLEAR", 0xfd0a}, + {"linux/dm-ioctl.h", "DM_TABLE_DEPS", 0xfd0b}, + {"linux/dm-ioctl.h", "DM_TABLE_STATUS", 0xfd0c}, + {"linux/dm-ioctl.h", "DM_LIST_VERSIONS", 0xfd0d}, + {"linux/dm-ioctl.h", "DM_TARGET_MSG", 0xfd0e}, + {"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", 0xfd0f}, diff --git a/alice-strace/linux/ioctlent.sh b/alice-strace/linux/ioctlent.sh new file mode 100755 index 0000000..c483ba8 --- /dev/null +++ b/alice-strace/linux/ioctlent.sh @@ -0,0 +1,156 @@ +#! /bin/sh +# Copyright (c) 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. + +# Validate arg count. +case $# in +1) + dir="$1" + asm=asm + ;; +2) + dir="$1" + asm="$2" + ;; +*) + echo "usage: $0 include-directory [asm-subdirectory]" >&2 + exit 1 + ;; +esac + +lookup_ioctls() +{ + type="$1" + shift + + # Build the list of all ioctls + regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+0x'"$type"'..\>' + (cd "$dir" && for f; do grep "$regexp" "$f" "uapi/$f" 2>/dev/null; done) | + sed -ne "s,$asm/,asm/,g"' +s/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\(0x'"$type"'..\).*/ { "\1", "\2", \3 },/p' \ + >> ioctls.h +} + +> ioctls.h + +lookup_ioctls 03 linux/hdreg.h +lookup_ioctls 22 scsi/sg.h +lookup_ioctls 46 linux/fb.h +lookup_ioctls 4B linux/kd.h +lookup_ioctls 4C linux/loop.h +lookup_ioctls 53 linux/cdrom.h scsi/scsi.h scsi/scsi_ioctl.h +lookup_ioctls 54 $asm/ioctls.h asm-generic/ioctls.h +lookup_ioctls 56 linux/vt.h +lookup_ioctls '7[12]' linux/videotext.h +lookup_ioctls 89 $asm/sockios.h asm-generic/sockios.h linux/sockios.h +lookup_ioctls 8B linux/wireless.h + +if [ -e $dir/Kbuild ]; then + # kernel has exported user space headers, so query only them + files=$( + cd $dir || exit + find . -mindepth 2 -name Kbuild | \ + sed -e 's:^\./::' -e 's:/Kbuild:/*:' | \ + grep -v '^asm-' + echo "$asm/* asm-generic/*" + ) + # special case: some headers aren't exported directly + files="${files} media/* net/bluetooth/* pcmcia/*" +else + # older kernel so just assume some headers + files="linux/* $asm/* asm-generic/* scsi/* sound/*" +fi + +# Build the list of all ioctls +# Example output: +# { "asm/ioctls.h", "TIOCSWINSZ", 0x5414 }, +# { "asm/mce.h", "MCE_GETCLEAR_FLAGS", _IOC(_IOC_NONE,'M',3,0) }, +regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+_S\?\(IO\|IOW\|IOR\|IOWR\)\>' +(cd $dir && grep $regexp $files 2>/dev/null) | \ + sed -n \ + -e "s,$asm/,asm/,g" \ + -e 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*_S\?I.*(\([^[,]*\)[[:space:]]*,[[:space:]]*\([^,)]*\).*/ { "\1", "\2", _IOC(_IOC_NONE,\3,\4,0) },/p' \ + >> ioctls.h + +# Strip uapi/ prefix +sed -i 's|"uapi/|"|' ioctls.h + +# Sort and drop dups +sort -u -o ioctls.h ioctls.h + +> ioctldefs.h + +# Collect potential ioctl names. ('bases' is a bad name. Sigh) +# Some use a special base to offset their ioctls on. Extract that as well. +# Some use 2 defines: _IOC(_IOC_NONE,DM_IOCTL,DM_LIST_DEVICES_CMD,....) +bases=$(sed -n \ + -e 's/.*_IOC_NONE.*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]]*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]+,].*/\1\n\2/p' \ + -e 's/.*_IOC_NONE.*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]+,].*/\1/p' \ + ioctls.h | sort -u) + +for base in $bases; do + echo "Looking for $base" + regexp="^[[:space:]]*#[[:space:]]*define[[:space:]]\+$base" + line=$( (cd $dir && grep -h $regexp 2>/dev/null $files) | grep -v '\<_IO') + if [ x"$line" != x ]; then + echo "$base is a #define" # "($line)" + echo "$line" >> ioctldefs.h + fi + + if ! grep "\<$base\>" ioctldefs.h >/dev/null 2>/dev/null; then + # Not all ioctl's are defines ... some (like the DM_* stuff) + # are enums, so we have to extract that crap ourself + ( + cd $dir || exit + # -P: inhibit generation of linemarkers + ${CPP:-cpp} -P $(grep -l $base $files 2>/dev/null) | sed '/^$/d' | \ + awk -v base="$base" '{ + if ($1 == "enum") { + val = 0 + while ($NF != "};") { + if (!getline) + exit + gsub(/,/, "") + if ($0 ~ /=/) + val = $NF + if ($1 == base) { + print "#define " base " (" val ")" + exit + } + val++ + } + } + }' + ) >> ioctldefs.h + if ! grep "\<$base\>" ioctldefs.h >/dev/null 2>/dev/null; then + echo "Can't find the definition for $base" + else + echo "$base is an enum" + fi + fi +done + +# Sort and drop dups? +# sort -u ioctldefs1.h && mv ioctldefs1.h ioctldefs.h diff --git a/alice-strace/linux/ioctlsort.c b/alice-strace/linux/ioctlsort.c new file mode 100644 index 0000000..dab30f1 --- /dev/null +++ b/alice-strace/linux/ioctlsort.c @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include + +#include +#include + +#include "ioctldefs.h" +#include + +struct ioctlent { + const char* header; + const char* name; + unsigned long code; +}; + +struct ioctlent ioctls[] = { +#include "ioctls.h" +}; + +int nioctls = sizeof(ioctls) / sizeof(ioctls[0]); + +int compare(const void* a, const void* b) { + unsigned long code1 = ((struct ioctlent *) a)->code; + unsigned long code2 = ((struct ioctlent *) b)->code; + const char *name1 = ((struct ioctlent *) a)->name; + const char *name2 = ((struct ioctlent *) b)->name; + return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp(name1, name2); +} + +int main(int argc, char** argv) { + int i; + + /* ioctl_lookup() only looks at the NR and TYPE bits atm. */ + for (i = 0; i < nioctls; i++) + ioctls[i].code &= (_IOC_NRMASK << _IOC_NRSHIFT) | + (_IOC_TYPEMASK << _IOC_TYPESHIFT); + + qsort(ioctls, nioctls, sizeof(ioctls[0]), compare); + puts("\t/* Generated by ioctlsort */"); + for (i = 0; i < nioctls; i++) + if (i == 0 || ioctls[i].code != ioctls[i-1].code || + strcmp(ioctls[i].name, ioctls[i-1].name)) + printf("\t{\"%s\",\t\"%s\",\t%#06lx},\n", + ioctls[i].header, ioctls[i].name, ioctls[i].code); + + return 0; +} diff --git a/alice-strace/linux/m68k/ioctlent.h.in b/alice-strace/linux/m68k/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/m68k/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/m68k/syscallent.h b/alice-strace/linux/m68k/syscallent.h new file mode 100644 index 0000000..d3eec79 --- /dev/null +++ b/alice-strace/linux/m68k/syscallent.h @@ -0,0 +1,479 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "chown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 1, TD|TM, sys_old_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, sys_vm86old, "vm86old" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 4, 0, sys_cacheflush, "cacheflush" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, printargs, "getpagesize" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 5, TD, sys_pread, "pread64" }, /* 180 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 181 */ + { 3, TF, sys_chown, "lchown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "chown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + { 0, NF, sys_getgid, "getgid32" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */ + { 0, NF, sys_geteuid, "getegid32" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */ + { 2, 0, sys_setregid, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, TD, sys_fchown, "fchown32" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */ + { 3, TF, sys_chown, "lchown32" }, /* 212 */ + { 1, 0, sys_setuid, "setuid32" }, /* 213 */ + { 1, 0, sys_setgid, "setgid32" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 5, 0, NULL, NULL }, /* 218 */ + { 5, 0, NULL, NULL }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 0, 0, sys_gettid, "gettid" }, /* 221 */ + { 2, TS, sys_kill, "tkill" }, /* 222 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 223 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 224 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 225 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 226 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 227 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 228 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 229 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 230 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 231 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 232 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 233 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 234 */ + { 6, 0, sys_futex, "futex" }, /* 235 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 236 */ + { 3, TM, sys_mincore, "mincore" }, /* 237 */ + { 3, TM, sys_madvise, "madvise" }, /* 238 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 239 */ + { 4, TD, sys_readahead, "readahead" }, /* 240 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 241 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 242 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 243 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 244 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 245 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 246 */ + { 1, TP, sys_exit, "exit_group" }, /* 247 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 248 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 252 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 253 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 254 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 263 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 264 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 265 */ + { 2, TF, sys_utimes, "utimes" }, /* 266 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 267 */ + { 6, TM, sys_mbind, "mbind" }, /* 268 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 269 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 270 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 271 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 272 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 273 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */ + { 5, TP, sys_waitid, "waitid" }, /* 277 */ + { 5, 0, sys_vserver, "vserver" }, /* 278 */ + { 5, 0, sys_add_key, "add_key" }, /* 279 */ + { 5, 0, sys_request_key, "request_key" }, /* 280 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 281 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 284 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 285 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 286 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 287 */ + { 4, TD|TF, sys_openat, "openat" }, /* 288 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 293 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 301 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 302 */ + { 1, TP, sys_unshare, "unshare" }, /* 303 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 304 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 305 */ + { 6, TD, sys_splice, "splice" }, /* 306 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 307 */ + { 4, TD, sys_tee, "tee" }, /* 308 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 309 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 310 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 311 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 312 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 313 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 314 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 315 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 316 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 317 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 318 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 319 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 320 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 321 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 322 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 323 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 324 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 325 */ + { 3, TD, sys_dup3, "dup3" }, /* 326 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 327 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 328 */ + { 5, TD, sys_preadv, "preadv" }, /* 329 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 330 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 331 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 332 */ + { 0, 0, sys_get_thread_area, "get_thread_area"}, /* 333 */ + { 1, 0, sys_set_thread_area, "set_thread_area"}, /* 334 */ + { 6, 0, printargs, "atomic_comxchg_32"}, /* 335 */ + { 0, 0, printargs, "atomic_barrier"}, /* 336 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 337 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 338 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 339 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 340 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 341 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 342 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 343 */ + { 2, TD, sys_setns, "setns" }, /* 344 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 345 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 346 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 347 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 348 */ + { 5, 0, NULL, NULL }, /* 349 */ + { 5, 0, NULL, NULL }, /* 350 */ + { 5, 0, NULL, NULL }, /* 351 */ + { 5, 0, NULL, NULL }, /* 352 */ + { 5, 0, NULL, NULL }, /* 353 */ + { 5, 0, NULL, NULL }, /* 354 */ + { 5, 0, NULL, NULL }, /* 355 */ + { 5, 0, NULL, NULL }, /* 356 */ + { 5, 0, NULL, NULL }, /* 357 */ + { 5, 0, NULL, NULL }, /* 358 */ + { 5, 0, NULL, NULL }, /* 359 */ + { 5, 0, NULL, NULL }, /* 360 */ + { 5, 0, NULL, NULL }, /* 361 */ + { 5, 0, NULL, NULL }, /* 362 */ + { 5, 0, NULL, NULL }, /* 363 */ + { 5, 0, NULL, NULL }, /* 364 */ + { 5, 0, NULL, NULL }, /* 365 */ + { 5, 0, NULL, NULL }, /* 366 */ + { 5, 0, NULL, NULL }, /* 367 */ + { 5, 0, NULL, NULL }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ diff --git a/alice-strace/linux/metag/ioctlent.h.in b/alice-strace/linux/metag/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/metag/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/metag/syscallent.h b/alice-strace/linux/metag/syscallent.h new file mode 100644 index 0000000..9401ca4 --- /dev/null +++ b/alice-strace/linux/metag/syscallent.h @@ -0,0 +1,266 @@ + { 2, 0, sys_io_setup, "io_setup" }, /* 0 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 2 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 8 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 11 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 14 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 17 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */ + { 1, TD, sys_dup, "dup" }, /* 23 */ + { 3, TD, sys_dup3, "dup3" }, /* 24 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 25 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 29 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */ + { 2, TD, sys_flock, "flock" }, /* 32 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */ + { 2, TF, sys_umount2, "umount" }, /* 39 */ + { 5, TF, sys_mount, "mount" }, /* 40 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */ + { }, /* 42 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 43 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 45 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 47 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */ + { 1, TF, sys_chdir, "chdir" }, /* 49 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 50 */ + { 1, TF, sys_chroot, "chroot" }, /* 51 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */ + { 3, TD, sys_fchown, "fchown" }, /* 55 */ + { 4, TD|TF, sys_openat, "openat" }, /* 56 */ + { 1, TD, sys_close, "close" }, /* 57 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 58 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 59 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 60 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 61 */ + { 5, TD, sys_llseek, "_llseek" }, /* 62 */ + { 3, TD, sys_read, "read" }, /* 63 */ + { 3, TD, sys_write, "write" }, /* 64 */ + { 3, TD, sys_readv, "readv" }, /* 65 */ + { 3, TD, sys_writev, "writev" }, /* 66 */ + { 5, TD, sys_pread, "pread64" }, /* 67 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 68 */ + { 5, TD, sys_preadv, "preadv" }, /* 69 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 70 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 72 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 73 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */ + { 6, TD, sys_splice, "splice" }, /* 76 */ + { 4, TD, sys_tee, "tee" }, /* 77 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 80 */ + { 0, 0, sys_sync, "sync" }, /* 81 */ + { 1, TD, sys_fsync, "fsync" }, /* 82 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */ + { 1, TF, sys_acct, "acct" }, /* 89 */ + { 2, 0, sys_capget, "capget" }, /* 90 */ + { 2, 0, sys_capset, "capset" }, /* 91 */ + { 1, 0, sys_personality, "personality" }, /* 92 */ + { 1, TP, sys_exit, "exit" }, /* 93 */ + { 1, TP, sys_exit, "exit_group" }, /* 94 */ + { 5, TP, sys_waitid, "waitid" }, /* 95 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */ + { 1, TP, sys_unshare, "unshare" }, /* 97 */ + { 6, 0, sys_futex, "futex" }, /* 98 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 102 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 103 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */ + { 3, 0, sys_init_module, "init_module" }, /* 105 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 106 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 107 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */ + { 3, 0, sys_syslog, "syslog" }, /* 116 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 117 */ + { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 125 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 126 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */ + { 2, TS, sys_kill, "kill" }, /* 129 */ + { 2, TS, sys_kill, "tkill" }, /* 130 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 131 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 140 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 141 */ + { 4, 0, sys_reboot, "reboot" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 1, 0, sys_setgid, "setgid" }, /* 144 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 145 */ + { 1, 0, sys_setuid, "setuid" }, /* 146 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 147 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 148 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 149 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 150 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */ + { 1, 0, sys_times, "times" }, /* 153 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 154 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 155 */ + { 1, 0, sys_getsid, "getsid" }, /* 156 */ + { 0, 0, sys_setsid, "setsid" }, /* 157 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 158 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 159 */ + { 1, 0, sys_uname, "uname" }, /* 160 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 161 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 165 */ + { 1, 0, sys_umask, "umask" }, /* 166 */ + { 5, 0, sys_prctl, "prctl" }, /* 167 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 168 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */ + { 0, 0, sys_getpid, "getpid" }, /* 172 */ + { 0, 0, sys_getppid, "getppid" }, /* 173 */ + { 0, NF, sys_getuid, "getuid" }, /* 174 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 175 */ + { 0, NF, sys_getgid, "getgid" }, /* 176 */ + { 0, NF, sys_getegid, "getegid" }, /* 177 */ + { 0, 0, sys_gettid, "gettid" }, /* 178 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 180 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */ + { 2, TI, sys_msgget, "msgget" }, /* 186 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 187 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */ + { 3, TI, sys_semget, "semget" }, /* 190 */ + { 4, TI, sys_semctl, "semctl" }, /* 191 */ + { 4, TI, sys_semtimedop, "semtimedop" }, /* 192 */ + { 3, TI, sys_semop, "semop" }, /* 193 */ + { 3, TI, sys_shmget, "shmget" }, /* 194 */ + { 3, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 3, TI, sys_shmat, "shmat" }, /* 196 */ + { 1, TI, sys_shmdt, "shmdt" }, /* 197 */ + { 3, TN, sys_socket, "socket" }, /* 198 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 199 */ + { 3, TN, sys_bind, "bind" }, /* 200 */ + { 2, TN, sys_listen, "listen" }, /* 201 */ + { 3, TN, sys_accept, "accept" }, /* 202 */ + { 3, TN, sys_connect, "connect" }, /* 203 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 204 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 205 */ + { 6, TN, sys_sendto, "sendto" }, /* 206 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 210 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */ + { 4, TD, sys_readahead, "readahead" }, /* 213 */ + { 1, TM, sys_brk, "brk" }, /* 214 */ + { 2, TM, sys_munmap, "munmap" }, /* 215 */ + { 5, TM, sys_mremap, "mremap" }, /* 216 */ + { 5, 0, sys_add_key, "add_key" }, /* 217 */ + { 4, 0, sys_request_key, "request_key" }, /* 218 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 219 */ + { 5, TP, sys_clone, "clone" }, /* 220 */ + { 3, TF|TP, sys_execve, "execve" }, /* 221 */ + { 6, TD|TM, sys_mmap, "mmap2" }, /* 222 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 223 */ + { 2, TF, sys_swapon, "swapon" }, /* 224 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ + { 3, TM, sys_msync, "msync" }, /* 227 */ + { 2, TM, sys_mlock, "mlock" }, /* 228 */ + { 2, TM, sys_munlock, "munlock" }, /* 229 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 230 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 231 */ + { 3, TM, sys_mincore, "mincore" }, /* 232 */ + { 3, TM, sys_madvise, "madvise" }, /* 233 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */ + { 6, TM, sys_mbind, "mbind" }, /* 235 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 239 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */ + { 4, TN, sys_accept4, "accept4" }, /* 242 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */ + { }, /* 244 */ + { 2, 0, printargs, "metag_setglobalbit" }, /* 245 */ + { 1, 0, printargs, "metag_set_fpu_flags" }, /* 246 */ + { 1, 0, printargs, "metag_set_tls" }, /* 247 */ + { 0, 0, printargs, "metag_get_tls" }, /* 248 */ + + [249 ... 259] = { }, + + { 4, TP, sys_wait4, "wait4" }, /* 260 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 267 */ + { 2, TD, sys_setns, "setns" }, /* 268 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 272 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 273 */ diff --git a/alice-strace/linux/microblaze/ioctlent.h.in b/alice-strace/linux/microblaze/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/microblaze/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/microblaze/syscallent.h b/alice-strace/linux/microblaze/syscallent.h new file mode 100644 index 0000000..22b69c4 --- /dev/null +++ b/alice-strace/linux/microblaze/syscallent.h @@ -0,0 +1,409 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, sys_vm86old, "vm86old" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_vm86, "vm86" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 5, TD, sys_pread, "pread64" }, /* 180 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 181 */ + { 3, TF, sys_chown, "chown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "lchown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + { 0, NF, sys_getgid, "getgid32" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */ + { 0, NF, sys_geteuid, "getegid32" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */ + { 2, 0, sys_setregid, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, TD, sys_fchown, "fchown32" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */ + { 3, TF, sys_chown, "chown32" }, /* 212 */ + { 1, 0, sys_setuid, "setuid32" }, /* 213 */ + { 1, 0, sys_setgid, "setgid32" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 4, 0, NULL, NULL }, /* 222 */ + { 4, 0, NULL, NULL }, /* 223 */ + { 0, 0, sys_gettid, "gettid" }, /* 224 */ + { 4, TD, sys_readahead, "readahead" }, /* 225 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 226 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 229 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 232 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 235 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */ + { 2, TS, sys_kill, "tkill" }, /* 238 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */ + { 6, 0, sys_futex, "futex" }, /* 240 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 241 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 242 */ + { 1, 0, sys_set_thread_area, "set_thread_area"}, /* 243 */ + { 1, 0, sys_get_thread_area, "get_thread_area"}, /* 244 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 245 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 248 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */ + { 0, 0, NULL, NULL }, /* 251 */ + { 1, TP, sys_exit, "exit_group" }, /* 252 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 253 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 254 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 257 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 258 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 259 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 268 */ + { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 269 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 270 */ + { 2, TF, sys_utimes, "utimes" }, /* 271 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */ + { 5, 0, sys_vserver, "vserver" }, /* 273 */ + { 4, TM, sys_mbind, "mbind" }, /* 274 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 275 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 276 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 277 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 280 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */ + { 5, TP, sys_waitid, "waitid" }, /* 284 */ + { 5, 0, NULL, NULL }, /* 285 */ + { 5, 0, sys_add_key, "add_key" }, /* 286 */ + { 4, 0, sys_request_key, "request_key" }, /* 287 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 288 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */ + { 4, TD|TF, sys_openat, "openat" }, /* 295 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 300 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 303 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 308 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 309 */ + { 1, TP, sys_unshare, "unshare" }, /* 310 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 311 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 312 */ + { 6, TD, sys_splice, "splice" }, /* 313 */ + { 6, TD, sys_sync_file_range, "sync_file_range"}, /* 314 */ + { 4, TD, sys_tee, "tee" }, /* 315 */ + { 5, TD, sys_vmsplice, "vmsplice" }, /* 316 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 317 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 318 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 322 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 323 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 324 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 325 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 326 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 327 */ + { 4, TI, sys_semctl, "semctl" }, /* 328 */ + { 4, TI, sys_semget, "semget" }, /* 329 */ + { 4, TI, sys_semop, "semop" }, /* 330 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 331 */ + { 4, TI, sys_msgget, "msgget" }, /* 332 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 333 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 334 */ + { 4, TI, sys_shmat, "shmat" }, /* 335 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 336 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 337 */ + { 4, TI, sys_shmget, "shmget" }, /* 338 */ + { 4, TD|TS, printargs, "signalfd4" }, /* 339 */ + { 2, TD, printargs, "eventfd2" }, /* 340 */ + { 1, TD, printargs, "epoll_create1" }, /* 341 */ + { 3, TD, printargs, "dup3" }, /* 342 */ + { 2, TD, printargs, "pipe2" }, /* 343 */ + { 1, TD, printargs, "inotify_init1" }, /* 344 */ + { 3, TN, sys_socket, "socket" }, /* 345 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 346 */ + { 3, TN, sys_bind, "bind" }, /* 347 */ + { 2, TN, sys_listen, "listen" }, /* 348 */ + { 3, TN, sys_accept, "accept" }, /* 349 */ + { 3, TN, sys_connect, "connect" }, /* 350 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 351 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 352 */ + { 6, TN, sys_sendto, "sendto" }, /* 353 */ + { 4, TN, sys_send, "send" }, /* 354 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 355 */ + { 4, TN, sys_recv, "recv" }, /* 356 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 357 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 358 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 359 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 360 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 361 */ + { 4, TN, sys_accept4, "accept4" }, /* 362 */ + { 5, TD, sys_preadv, "preadv" }, /* 363 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 364 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 365 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 366 */ + { 5, TN, printargs, "recvmmsg" }, /* 367 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 368 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 369 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 370 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 371 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 372 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 373 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 374 */ + { 2, TD, sys_setns, "setns" }, /* 375 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 376 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 377 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 378 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 379 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 380 */ diff --git a/alice-strace/linux/mips/errnoent.h b/alice-strace/linux/mips/errnoent.h new file mode 100644 index 0000000..b22ee87 --- /dev/null +++ b/alice-strace/linux/mips/errnoent.h @@ -0,0 +1,1135 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "ENOMSG", /* 35 */ + "EIDRM", /* 36 */ + "ECHRNG", /* 37 */ + "EL2NSYNC", /* 38 */ + "EL3HLT", /* 39 */ + "EL3RST", /* 40 */ + "ELNRNG", /* 41 */ + "EUNATCH", /* 42 */ + "ENOCSI", /* 43 */ + "EL2HLT", /* 44 */ + "EDEADLK", /* 45 */ + "ENOLCK", /* 46 */ + "ERRNO_47", /* 47 */ + "ERRNO_48", /* 48 */ + "ERRNO_49", /* 49 */ + "EBADE", /* 50 */ + "EBADR", /* 51 */ + "EXFULL", /* 52 */ + "ENOANO", /* 53 */ + "EBADRQC", /* 54 */ + "EBADSLT", /* 55 */ + "EDEADLOCK", /* 56 */ + "ERRNO_57", /* 57 */ + "ERRNO_58", /* 58 */ + "EBFONT", /* 59 */ + "ENOSTR", /* 60 */ + "ENODATA", /* 61 */ + "ETIME", /* 62 */ + "ENOSR", /* 63 */ + "ENONET", /* 64 */ + "ENOPKG", /* 65 */ + "EREMOTE", /* 66 */ + "ENOLINK", /* 67 */ + "EADV", /* 68 */ + "ESRMNT", /* 69 */ + "ECOMM", /* 70 */ + "EPROTO", /* 71 */ + "ERRNO_72", /* 72 */ + "EDOTDOT", /* 73 */ + "EMULTIHOP", /* 74 */ + "ERRNO_75", /* 75 */ + "ERRNO_76", /* 76 */ + "EBADMSG", /* 77 */ + "ENAMETOOLONG", /* 78 */ + "EOVERFLOW", /* 79 */ + "ENOTUNIQ", /* 80 */ + "EBADFD", /* 81 */ + "EREMCHG", /* 82 */ + "ELIBACC", /* 83 */ + "ELIBBAD", /* 84 */ + "ELIBSCN", /* 85 */ + "ELIBMAX", /* 86 */ + "ELIBEXEC", /* 87 */ + "EILSEQ", /* 88 */ + "ENOSYS", /* 89 */ + "ELOOP", /* 90 */ + "ERESTART", /* 91 */ + "ESTRPIPE", /* 92 */ + "ENOTEMPTY", /* 93 */ + "EUSERS", /* 94 */ + "ENOTSOCK", /* 95 */ + "EDESTADDRREQ", /* 96 */ + "EMSGSIZE", /* 97 */ + "EPROTOTYPE", /* 98 */ + "ENOPROTOOPT", /* 99 */ + "ERRNO_100", /* 100 */ + "ERRNO_101", /* 101 */ + "ERRNO_102", /* 102 */ + "ERRNO_103", /* 103 */ + "ERRNO_104", /* 104 */ + "ERRNO_105", /* 105 */ + "ERRNO_106", /* 106 */ + "ERRNO_107", /* 107 */ + "ERRNO_108", /* 108 */ + "ERRNO_109", /* 109 */ + "ERRNO_110", /* 110 */ + "ERRNO_111", /* 111 */ + "ERRNO_112", /* 112 */ + "ERRNO_113", /* 113 */ + "ERRNO_114", /* 114 */ + "ERRNO_115", /* 115 */ + "ERRNO_116", /* 116 */ + "ERRNO_117", /* 117 */ + "ERRNO_118", /* 118 */ + "ERRNO_119", /* 119 */ + "EPROTONOSUPPORT", /* 120 */ + "ESOCKTNOSUPPORT", /* 121 */ + "EOPNOTSUPP", /* 122 */ + "EPFNOSUPPORT", /* 123 */ + "EAFNOSUPPORT", /* 124 */ + "EADDRINUSE", /* 125 */ + "EADDRNOTAVAIL", /* 126 */ + "ENETDOWN", /* 127 */ + "ENETUNREACH", /* 128 */ + "ENETRESET", /* 129 */ + "ECONNABORTED", /* 130 */ + "ECONNRESET", /* 131 */ + "ENOBUFS", /* 132 */ + "EISCONN", /* 133 */ + "ENOTCONN", /* 134 */ + "EUCLEAN", /* 135 */ + "ERRNO_136", /* 136 */ + "ENOTNAM", /* 137 */ + "ENAVAIL", /* 138 */ + "EISNAM", /* 139 */ + "EREMOTEIO", /* 140 */ + "EINIT", /* 141 */ + "EREMDEV", /* 142 */ + "ESHUTDOWN", /* 143 */ + "ETOOMANYREFS", /* 144 */ + "ETIMEDOUT", /* 145 */ + "ECONNREFUSED", /* 146 */ + "EHOSTDOWN", /* 147 */ + "EHOSTUNREACH", /* 148 */ + "EALREADY", /* 149 */ + "EINPROGRESS", /* 150 */ + "ESTALE", /* 151 */ + "ERRNO_152", /* 152 */ + "ERRNO_153", /* 153 */ + "ERRNO_154", /* 154 */ + "ERRNO_155", /* 155 */ + "ERRNO_156", /* 156 */ + "ERRNO_157", /* 157 */ + "ECANCELED", /* 158 */ + "ENOMEDIUM", /* 159 */ + "EMEDIUMTYPE", /* 160 */ + "ERRNO_161", /* 161 */ + "ERRNO_162", /* 162 */ + "ERRNO_163", /* 163 */ + "ERRNO_164", /* 164 */ + "ERRNO_165", /* 165 */ + "ERRNO_166", /* 166 */ + "ERRNO_167", /* 167 */ + "ERRNO_168", /* 168 */ + "ERRNO_169", /* 169 */ + "ERRNO_170", /* 170 */ + "ERRNO_171", /* 171 */ + "ERRNO_172", /* 172 */ + "ERRNO_173", /* 173 */ + "ERRNO_174", /* 174 */ + "ERRNO_175", /* 175 */ + "ERRNO_176", /* 176 */ + "ERRNO_177", /* 177 */ + "ERRNO_178", /* 178 */ + "ERRNO_179", /* 179 */ + "ERRNO_180", /* 180 */ + "ERRNO_181", /* 181 */ + "ERRNO_182", /* 182 */ + "ERRNO_183", /* 183 */ + "ERRNO_184", /* 184 */ + "ERRNO_185", /* 185 */ + "ERRNO_186", /* 186 */ + "ERRNO_187", /* 187 */ + "ERRNO_188", /* 188 */ + "ERRNO_189", /* 189 */ + "ERRNO_190", /* 190 */ + "ERRNO_191", /* 191 */ + "ERRNO_192", /* 192 */ + "ERRNO_193", /* 193 */ + "ERRNO_194", /* 194 */ + "ERRNO_195", /* 195 */ + "ERRNO_196", /* 196 */ + "ERRNO_197", /* 197 */ + "ERRNO_198", /* 198 */ + "ERRNO_199", /* 199 */ + "ERRNO_200", /* 200 */ + "ERRNO_201", /* 201 */ + "ERRNO_202", /* 202 */ + "ERRNO_203", /* 203 */ + "ERRNO_204", /* 204 */ + "ERRNO_205", /* 205 */ + "ERRNO_206", /* 206 */ + "ERRNO_207", /* 207 */ + "ERRNO_208", /* 208 */ + "ERRNO_209", /* 209 */ + "ERRNO_210", /* 210 */ + "ERRNO_211", /* 211 */ + "ERRNO_212", /* 212 */ + "ERRNO_213", /* 213 */ + "ERRNO_214", /* 214 */ + "ERRNO_215", /* 215 */ + "ERRNO_216", /* 216 */ + "ERRNO_217", /* 217 */ + "ERRNO_218", /* 218 */ + "ERRNO_219", /* 219 */ + "ERRNO_220", /* 220 */ + "ERRNO_221", /* 221 */ + "ERRNO_222", /* 222 */ + "ERRNO_223", /* 223 */ + "ERRNO_224", /* 224 */ + "ERRNO_225", /* 225 */ + "ERRNO_226", /* 226 */ + "ERRNO_227", /* 227 */ + "ERRNO_228", /* 228 */ + "ERRNO_229", /* 229 */ + "ERRNO_230", /* 230 */ + "ERRNO_231", /* 231 */ + "ERRNO_232", /* 232 */ + "ERRNO_233", /* 233 */ + "ERRNO_234", /* 234 */ + "ERRNO_235", /* 235 */ + "ERRNO_236", /* 236 */ + "ERRNO_237", /* 237 */ + "ERRNO_238", /* 238 */ + "ERRNO_239", /* 239 */ + "ERRNO_240", /* 240 */ + "ERRNO_241", /* 241 */ + "ERRNO_242", /* 242 */ + "ERRNO_243", /* 243 */ + "ERRNO_244", /* 244 */ + "ERRNO_245", /* 245 */ + "ERRNO_246", /* 246 */ + "ERRNO_247", /* 247 */ + "ERRNO_248", /* 248 */ + "ERRNO_249", /* 249 */ + "ERRNO_250", /* 250 */ + "ERRNO_251", /* 251 */ + "ERRNO_252", /* 252 */ + "ERRNO_253", /* 253 */ + "ERRNO_254", /* 254 */ + "ERRNO_255", /* 255 */ + "ERRNO_256", /* 256 */ + "ERRNO_257", /* 257 */ + "ERRNO_258", /* 258 */ + "ERRNO_259", /* 259 */ + "ERRNO_260", /* 260 */ + "ERRNO_261", /* 261 */ + "ERRNO_262", /* 262 */ + "ERRNO_263", /* 263 */ + "ERRNO_264", /* 264 */ + "ERRNO_265", /* 265 */ + "ERRNO_266", /* 266 */ + "ERRNO_267", /* 267 */ + "ERRNO_268", /* 268 */ + "ERRNO_269", /* 269 */ + "ERRNO_270", /* 270 */ + "ERRNO_271", /* 271 */ + "ERRNO_272", /* 272 */ + "ERRNO_273", /* 273 */ + "ERRNO_274", /* 274 */ + "ERRNO_275", /* 275 */ + "ERRNO_276", /* 276 */ + "ERRNO_277", /* 277 */ + "ERRNO_278", /* 278 */ + "ERRNO_279", /* 279 */ + "ERRNO_280", /* 280 */ + "ERRNO_281", /* 281 */ + "ERRNO_282", /* 282 */ + "ERRNO_283", /* 283 */ + "ERRNO_284", /* 284 */ + "ERRNO_285", /* 285 */ + "ERRNO_286", /* 286 */ + "ERRNO_287", /* 287 */ + "ERRNO_288", /* 288 */ + "ERRNO_289", /* 289 */ + "ERRNO_290", /* 290 */ + "ERRNO_291", /* 291 */ + "ERRNO_292", /* 292 */ + "ERRNO_293", /* 293 */ + "ERRNO_294", /* 294 */ + "ERRNO_295", /* 295 */ + "ERRNO_296", /* 296 */ + "ERRNO_297", /* 297 */ + "ERRNO_298", /* 298 */ + "ERRNO_299", /* 299 */ + "ERRNO_300", /* 300 */ + "ERRNO_301", /* 301 */ + "ERRNO_302", /* 302 */ + "ERRNO_303", /* 303 */ + "ERRNO_304", /* 304 */ + "ERRNO_305", /* 305 */ + "ERRNO_306", /* 306 */ + "ERRNO_307", /* 307 */ + "ERRNO_308", /* 308 */ + "ERRNO_309", /* 309 */ + "ERRNO_310", /* 310 */ + "ERRNO_311", /* 311 */ + "ERRNO_312", /* 312 */ + "ERRNO_313", /* 313 */ + "ERRNO_314", /* 314 */ + "ERRNO_315", /* 315 */ + "ERRNO_316", /* 316 */ + "ERRNO_317", /* 317 */ + "ERRNO_318", /* 318 */ + "ERRNO_319", /* 319 */ + "ERRNO_320", /* 320 */ + "ERRNO_321", /* 321 */ + "ERRNO_322", /* 322 */ + "ERRNO_323", /* 323 */ + "ERRNO_324", /* 324 */ + "ERRNO_325", /* 325 */ + "ERRNO_326", /* 326 */ + "ERRNO_327", /* 327 */ + "ERRNO_328", /* 328 */ + "ERRNO_329", /* 329 */ + "ERRNO_330", /* 330 */ + "ERRNO_331", /* 331 */ + "ERRNO_332", /* 332 */ + "ERRNO_333", /* 333 */ + "ERRNO_334", /* 334 */ + "ERRNO_335", /* 335 */ + "ERRNO_336", /* 336 */ + "ERRNO_337", /* 337 */ + "ERRNO_338", /* 338 */ + "ERRNO_339", /* 339 */ + "ERRNO_340", /* 340 */ + "ERRNO_341", /* 341 */ + "ERRNO_342", /* 342 */ + "ERRNO_343", /* 343 */ + "ERRNO_344", /* 344 */ + "ERRNO_345", /* 345 */ + "ERRNO_346", /* 346 */ + "ERRNO_347", /* 347 */ + "ERRNO_348", /* 348 */ + "ERRNO_349", /* 349 */ + "ERRNO_350", /* 350 */ + "ERRNO_351", /* 351 */ + "ERRNO_352", /* 352 */ + "ERRNO_353", /* 353 */ + "ERRNO_354", /* 354 */ + "ERRNO_355", /* 355 */ + "ERRNO_356", /* 356 */ + "ERRNO_357", /* 357 */ + "ERRNO_358", /* 358 */ + "ERRNO_359", /* 359 */ + "ERRNO_360", /* 360 */ + "ERRNO_361", /* 361 */ + "ERRNO_362", /* 362 */ + "ERRNO_363", /* 363 */ + "ERRNO_364", /* 364 */ + "ERRNO_365", /* 365 */ + "ERRNO_366", /* 366 */ + "ERRNO_367", /* 367 */ + "ERRNO_368", /* 368 */ + "ERRNO_369", /* 369 */ + "ERRNO_370", /* 370 */ + "ERRNO_371", /* 371 */ + "ERRNO_372", /* 372 */ + "ERRNO_373", /* 373 */ + "ERRNO_374", /* 374 */ + "ERRNO_375", /* 375 */ + "ERRNO_376", /* 376 */ + "ERRNO_377", /* 377 */ + "ERRNO_378", /* 378 */ + "ERRNO_379", /* 379 */ + "ERRNO_380", /* 380 */ + "ERRNO_381", /* 381 */ + "ERRNO_382", /* 382 */ + "ERRNO_383", /* 383 */ + "ERRNO_384", /* 384 */ + "ERRNO_385", /* 385 */ + "ERRNO_386", /* 386 */ + "ERRNO_387", /* 387 */ + "ERRNO_388", /* 388 */ + "ERRNO_389", /* 389 */ + "ERRNO_390", /* 390 */ + "ERRNO_391", /* 391 */ + "ERRNO_392", /* 392 */ + "ERRNO_393", /* 393 */ + "ERRNO_394", /* 394 */ + "ERRNO_395", /* 395 */ + "ERRNO_396", /* 396 */ + "ERRNO_397", /* 397 */ + "ERRNO_398", /* 398 */ + "ERRNO_399", /* 399 */ + "ERRNO_400", /* 400 */ + "ERRNO_401", /* 401 */ + "ERRNO_402", /* 402 */ + "ERRNO_403", /* 403 */ + "ERRNO_404", /* 404 */ + "ERRNO_405", /* 405 */ + "ERRNO_406", /* 406 */ + "ERRNO_407", /* 407 */ + "ERRNO_408", /* 408 */ + "ERRNO_409", /* 409 */ + "ERRNO_410", /* 410 */ + "ERRNO_411", /* 411 */ + "ERRNO_412", /* 412 */ + "ERRNO_413", /* 413 */ + "ERRNO_414", /* 414 */ + "ERRNO_415", /* 415 */ + "ERRNO_416", /* 416 */ + "ERRNO_417", /* 417 */ + "ERRNO_418", /* 418 */ + "ERRNO_419", /* 419 */ + "ERRNO_420", /* 420 */ + "ERRNO_421", /* 421 */ + "ERRNO_422", /* 422 */ + "ERRNO_423", /* 423 */ + "ERRNO_424", /* 424 */ + "ERRNO_425", /* 425 */ + "ERRNO_426", /* 426 */ + "ERRNO_427", /* 427 */ + "ERRNO_428", /* 428 */ + "ERRNO_429", /* 429 */ + "ERRNO_430", /* 430 */ + "ERRNO_431", /* 431 */ + "ERRNO_432", /* 432 */ + "ERRNO_433", /* 433 */ + "ERRNO_434", /* 434 */ + "ERRNO_435", /* 435 */ + "ERRNO_436", /* 436 */ + "ERRNO_437", /* 437 */ + "ERRNO_438", /* 438 */ + "ERRNO_439", /* 439 */ + "ERRNO_440", /* 440 */ + "ERRNO_441", /* 441 */ + "ERRNO_442", /* 442 */ + "ERRNO_443", /* 443 */ + "ERRNO_444", /* 444 */ + "ERRNO_445", /* 445 */ + "ERRNO_446", /* 446 */ + "ERRNO_447", /* 447 */ + "ERRNO_448", /* 448 */ + "ERRNO_449", /* 449 */ + "ERRNO_450", /* 450 */ + "ERRNO_451", /* 451 */ + "ERRNO_452", /* 452 */ + "ERRNO_453", /* 453 */ + "ERRNO_454", /* 454 */ + "ERRNO_455", /* 455 */ + "ERRNO_456", /* 456 */ + "ERRNO_457", /* 457 */ + "ERRNO_458", /* 458 */ + "ERRNO_459", /* 459 */ + "ERRNO_460", /* 460 */ + "ERRNO_461", /* 461 */ + "ERRNO_462", /* 462 */ + "ERRNO_463", /* 463 */ + "ERRNO_464", /* 464 */ + "ERRNO_465", /* 465 */ + "ERRNO_466", /* 466 */ + "ERRNO_467", /* 467 */ + "ERRNO_468", /* 468 */ + "ERRNO_469", /* 469 */ + "ERRNO_470", /* 470 */ + "ERRNO_471", /* 471 */ + "ERRNO_472", /* 472 */ + "ERRNO_473", /* 473 */ + "ERRNO_474", /* 474 */ + "ERRNO_475", /* 475 */ + "ERRNO_476", /* 476 */ + "ERRNO_477", /* 477 */ + "ERRNO_478", /* 478 */ + "ERRNO_479", /* 479 */ + "ERRNO_480", /* 480 */ + "ERRNO_481", /* 481 */ + "ERRNO_482", /* 482 */ + "ERRNO_483", /* 483 */ + "ERRNO_484", /* 484 */ + "ERRNO_485", /* 485 */ + "ERRNO_486", /* 486 */ + "ERRNO_487", /* 487 */ + "ERRNO_488", /* 488 */ + "ERRNO_489", /* 489 */ + "ERRNO_490", /* 490 */ + "ERRNO_491", /* 491 */ + "ERRNO_492", /* 492 */ + "ERRNO_493", /* 493 */ + "ERRNO_494", /* 494 */ + "ERRNO_495", /* 495 */ + "ERRNO_496", /* 496 */ + "ERRNO_497", /* 497 */ + "ERRNO_498", /* 498 */ + "ERRNO_499", /* 499 */ + "ERRNO_500", /* 500 */ + "ERRNO_501", /* 501 */ + "ERRNO_502", /* 502 */ + "ERRNO_503", /* 503 */ + "ERRNO_504", /* 504 */ + "ERRNO_505", /* 505 */ + "ERRNO_506", /* 506 */ + "ERRNO_507", /* 507 */ + "ERRNO_508", /* 508 */ + "ERRNO_509", /* 509 */ + "ERRNO_510", /* 510 */ + "ERRNO_511", /* 511 */ + "ERRNO_512", /* 512 */ + "ERRNO_513", /* 513 */ + "ERRNO_514", /* 514 */ + "ERRNO_515", /* 515 */ + "ERRNO_516", /* 516 */ + "ERRNO_517", /* 517 */ + "ERRNO_518", /* 518 */ + "ERRNO_519", /* 519 */ + "ERRNO_520", /* 520 */ + "ERRNO_521", /* 521 */ + "ERRNO_522", /* 522 */ + "ERRNO_523", /* 523 */ + "ERRNO_524", /* 524 */ + "ERRNO_525", /* 525 */ + "ERRNO_526", /* 526 */ + "ERRNO_527", /* 527 */ + "ERRNO_528", /* 528 */ + "ERRNO_529", /* 529 */ + "ERRNO_530", /* 530 */ + "ERRNO_531", /* 531 */ + "ERRNO_532", /* 532 */ + "ERRNO_533", /* 533 */ + "ERRNO_534", /* 534 */ + "ERRNO_535", /* 535 */ + "ERRNO_536", /* 536 */ + "ERRNO_537", /* 537 */ + "ERRNO_538", /* 538 */ + "ERRNO_539", /* 539 */ + "ERRNO_540", /* 540 */ + "ERRNO_541", /* 541 */ + "ERRNO_542", /* 542 */ + "ERRNO_543", /* 543 */ + "ERRNO_544", /* 544 */ + "ERRNO_545", /* 545 */ + "ERRNO_546", /* 546 */ + "ERRNO_547", /* 547 */ + "ERRNO_548", /* 548 */ + "ERRNO_549", /* 549 */ + "ERRNO_550", /* 550 */ + "ERRNO_551", /* 551 */ + "ERRNO_552", /* 552 */ + "ERRNO_553", /* 553 */ + "ERRNO_554", /* 554 */ + "ERRNO_555", /* 555 */ + "ERRNO_556", /* 556 */ + "ERRNO_557", /* 557 */ + "ERRNO_558", /* 558 */ + "ERRNO_559", /* 559 */ + "ERRNO_560", /* 560 */ + "ERRNO_561", /* 561 */ + "ERRNO_562", /* 562 */ + "ERRNO_563", /* 563 */ + "ERRNO_564", /* 564 */ + "ERRNO_565", /* 565 */ + "ERRNO_566", /* 566 */ + "ERRNO_567", /* 567 */ + "ERRNO_568", /* 568 */ + "ERRNO_569", /* 569 */ + "ERRNO_570", /* 570 */ + "ERRNO_571", /* 571 */ + "ERRNO_572", /* 572 */ + "ERRNO_573", /* 573 */ + "ERRNO_574", /* 574 */ + "ERRNO_575", /* 575 */ + "ERRNO_576", /* 576 */ + "ERRNO_577", /* 577 */ + "ERRNO_578", /* 578 */ + "ERRNO_579", /* 579 */ + "ERRNO_580", /* 580 */ + "ERRNO_581", /* 581 */ + "ERRNO_582", /* 582 */ + "ERRNO_583", /* 583 */ + "ERRNO_584", /* 584 */ + "ERRNO_585", /* 585 */ + "ERRNO_586", /* 586 */ + "ERRNO_587", /* 587 */ + "ERRNO_588", /* 588 */ + "ERRNO_589", /* 589 */ + "ERRNO_590", /* 590 */ + "ERRNO_591", /* 591 */ + "ERRNO_592", /* 592 */ + "ERRNO_593", /* 593 */ + "ERRNO_594", /* 594 */ + "ERRNO_595", /* 595 */ + "ERRNO_596", /* 596 */ + "ERRNO_597", /* 597 */ + "ERRNO_598", /* 598 */ + "ERRNO_599", /* 599 */ + "ERRNO_600", /* 600 */ + "ERRNO_601", /* 601 */ + "ERRNO_602", /* 602 */ + "ERRNO_603", /* 603 */ + "ERRNO_604", /* 604 */ + "ERRNO_605", /* 605 */ + "ERRNO_606", /* 606 */ + "ERRNO_607", /* 607 */ + "ERRNO_608", /* 608 */ + "ERRNO_609", /* 609 */ + "ERRNO_610", /* 610 */ + "ERRNO_611", /* 611 */ + "ERRNO_612", /* 612 */ + "ERRNO_613", /* 613 */ + "ERRNO_614", /* 614 */ + "ERRNO_615", /* 615 */ + "ERRNO_616", /* 616 */ + "ERRNO_617", /* 617 */ + "ERRNO_618", /* 618 */ + "ERRNO_619", /* 619 */ + "ERRNO_620", /* 620 */ + "ERRNO_621", /* 621 */ + "ERRNO_622", /* 622 */ + "ERRNO_623", /* 623 */ + "ERRNO_624", /* 624 */ + "ERRNO_625", /* 625 */ + "ERRNO_626", /* 626 */ + "ERRNO_627", /* 627 */ + "ERRNO_628", /* 628 */ + "ERRNO_629", /* 629 */ + "ERRNO_630", /* 630 */ + "ERRNO_631", /* 631 */ + "ERRNO_632", /* 632 */ + "ERRNO_633", /* 633 */ + "ERRNO_634", /* 634 */ + "ERRNO_635", /* 635 */ + "ERRNO_636", /* 636 */ + "ERRNO_637", /* 637 */ + "ERRNO_638", /* 638 */ + "ERRNO_639", /* 639 */ + "ERRNO_640", /* 640 */ + "ERRNO_641", /* 641 */ + "ERRNO_642", /* 642 */ + "ERRNO_643", /* 643 */ + "ERRNO_644", /* 644 */ + "ERRNO_645", /* 645 */ + "ERRNO_646", /* 646 */ + "ERRNO_647", /* 647 */ + "ERRNO_648", /* 648 */ + "ERRNO_649", /* 649 */ + "ERRNO_650", /* 650 */ + "ERRNO_651", /* 651 */ + "ERRNO_652", /* 652 */ + "ERRNO_653", /* 653 */ + "ERRNO_654", /* 654 */ + "ERRNO_655", /* 655 */ + "ERRNO_656", /* 656 */ + "ERRNO_657", /* 657 */ + "ERRNO_658", /* 658 */ + "ERRNO_659", /* 659 */ + "ERRNO_660", /* 660 */ + "ERRNO_661", /* 661 */ + "ERRNO_662", /* 662 */ + "ERRNO_663", /* 663 */ + "ERRNO_664", /* 664 */ + "ERRNO_665", /* 665 */ + "ERRNO_666", /* 666 */ + "ERRNO_667", /* 667 */ + "ERRNO_668", /* 668 */ + "ERRNO_669", /* 669 */ + "ERRNO_670", /* 670 */ + "ERRNO_671", /* 671 */ + "ERRNO_672", /* 672 */ + "ERRNO_673", /* 673 */ + "ERRNO_674", /* 674 */ + "ERRNO_675", /* 675 */ + "ERRNO_676", /* 676 */ + "ERRNO_677", /* 677 */ + "ERRNO_678", /* 678 */ + "ERRNO_679", /* 679 */ + "ERRNO_680", /* 680 */ + "ERRNO_681", /* 681 */ + "ERRNO_682", /* 682 */ + "ERRNO_683", /* 683 */ + "ERRNO_684", /* 684 */ + "ERRNO_685", /* 685 */ + "ERRNO_686", /* 686 */ + "ERRNO_687", /* 687 */ + "ERRNO_688", /* 688 */ + "ERRNO_689", /* 689 */ + "ERRNO_690", /* 690 */ + "ERRNO_691", /* 691 */ + "ERRNO_692", /* 692 */ + "ERRNO_693", /* 693 */ + "ERRNO_694", /* 694 */ + "ERRNO_695", /* 695 */ + "ERRNO_696", /* 696 */ + "ERRNO_697", /* 697 */ + "ERRNO_698", /* 698 */ + "ERRNO_699", /* 699 */ + "ERRNO_700", /* 700 */ + "ERRNO_701", /* 701 */ + "ERRNO_702", /* 702 */ + "ERRNO_703", /* 703 */ + "ERRNO_704", /* 704 */ + "ERRNO_705", /* 705 */ + "ERRNO_706", /* 706 */ + "ERRNO_707", /* 707 */ + "ERRNO_708", /* 708 */ + "ERRNO_709", /* 709 */ + "ERRNO_710", /* 710 */ + "ERRNO_711", /* 711 */ + "ERRNO_712", /* 712 */ + "ERRNO_713", /* 713 */ + "ERRNO_714", /* 714 */ + "ERRNO_715", /* 715 */ + "ERRNO_716", /* 716 */ + "ERRNO_717", /* 717 */ + "ERRNO_718", /* 718 */ + "ERRNO_719", /* 719 */ + "ERRNO_720", /* 720 */ + "ERRNO_721", /* 721 */ + "ERRNO_722", /* 722 */ + "ERRNO_723", /* 723 */ + "ERRNO_724", /* 724 */ + "ERRNO_725", /* 725 */ + "ERRNO_726", /* 726 */ + "ERRNO_727", /* 727 */ + "ERRNO_728", /* 728 */ + "ERRNO_729", /* 729 */ + "ERRNO_730", /* 730 */ + "ERRNO_731", /* 731 */ + "ERRNO_732", /* 732 */ + "ERRNO_733", /* 733 */ + "ERRNO_734", /* 734 */ + "ERRNO_735", /* 735 */ + "ERRNO_736", /* 736 */ + "ERRNO_737", /* 737 */ + "ERRNO_738", /* 738 */ + "ERRNO_739", /* 739 */ + "ERRNO_740", /* 740 */ + "ERRNO_741", /* 741 */ + "ERRNO_742", /* 742 */ + "ERRNO_743", /* 743 */ + "ERRNO_744", /* 744 */ + "ERRNO_745", /* 745 */ + "ERRNO_746", /* 746 */ + "ERRNO_747", /* 747 */ + "ERRNO_748", /* 748 */ + "ERRNO_749", /* 749 */ + "ERRNO_750", /* 750 */ + "ERRNO_751", /* 751 */ + "ERRNO_752", /* 752 */ + "ERRNO_753", /* 753 */ + "ERRNO_754", /* 754 */ + "ERRNO_755", /* 755 */ + "ERRNO_756", /* 756 */ + "ERRNO_757", /* 757 */ + "ERRNO_758", /* 758 */ + "ERRNO_759", /* 759 */ + "ERRNO_760", /* 760 */ + "ERRNO_761", /* 761 */ + "ERRNO_762", /* 762 */ + "ERRNO_763", /* 763 */ + "ERRNO_764", /* 764 */ + "ERRNO_765", /* 765 */ + "ERRNO_766", /* 766 */ + "ERRNO_767", /* 767 */ + "ERRNO_768", /* 768 */ + "ERRNO_769", /* 769 */ + "ERRNO_770", /* 770 */ + "ERRNO_771", /* 771 */ + "ERRNO_772", /* 772 */ + "ERRNO_773", /* 773 */ + "ERRNO_774", /* 774 */ + "ERRNO_775", /* 775 */ + "ERRNO_776", /* 776 */ + "ERRNO_777", /* 777 */ + "ERRNO_778", /* 778 */ + "ERRNO_779", /* 779 */ + "ERRNO_780", /* 780 */ + "ERRNO_781", /* 781 */ + "ERRNO_782", /* 782 */ + "ERRNO_783", /* 783 */ + "ERRNO_784", /* 784 */ + "ERRNO_785", /* 785 */ + "ERRNO_786", /* 786 */ + "ERRNO_787", /* 787 */ + "ERRNO_788", /* 788 */ + "ERRNO_789", /* 789 */ + "ERRNO_790", /* 790 */ + "ERRNO_791", /* 791 */ + "ERRNO_792", /* 792 */ + "ERRNO_793", /* 793 */ + "ERRNO_794", /* 794 */ + "ERRNO_795", /* 795 */ + "ERRNO_796", /* 796 */ + "ERRNO_797", /* 797 */ + "ERRNO_798", /* 798 */ + "ERRNO_799", /* 799 */ + "ERRNO_800", /* 800 */ + "ERRNO_801", /* 801 */ + "ERRNO_802", /* 802 */ + "ERRNO_803", /* 803 */ + "ERRNO_804", /* 804 */ + "ERRNO_805", /* 805 */ + "ERRNO_806", /* 806 */ + "ERRNO_807", /* 807 */ + "ERRNO_808", /* 808 */ + "ERRNO_809", /* 809 */ + "ERRNO_810", /* 810 */ + "ERRNO_811", /* 811 */ + "ERRNO_812", /* 812 */ + "ERRNO_813", /* 813 */ + "ERRNO_814", /* 814 */ + "ERRNO_815", /* 815 */ + "ERRNO_816", /* 816 */ + "ERRNO_817", /* 817 */ + "ERRNO_818", /* 818 */ + "ERRNO_819", /* 819 */ + "ERRNO_820", /* 820 */ + "ERRNO_821", /* 821 */ + "ERRNO_822", /* 822 */ + "ERRNO_823", /* 823 */ + "ERRNO_824", /* 824 */ + "ERRNO_825", /* 825 */ + "ERRNO_826", /* 826 */ + "ERRNO_827", /* 827 */ + "ERRNO_828", /* 828 */ + "ERRNO_829", /* 829 */ + "ERRNO_830", /* 830 */ + "ERRNO_831", /* 831 */ + "ERRNO_832", /* 832 */ + "ERRNO_833", /* 833 */ + "ERRNO_834", /* 834 */ + "ERRNO_835", /* 835 */ + "ERRNO_836", /* 836 */ + "ERRNO_837", /* 837 */ + "ERRNO_838", /* 838 */ + "ERRNO_839", /* 839 */ + "ERRNO_840", /* 840 */ + "ERRNO_841", /* 841 */ + "ERRNO_842", /* 842 */ + "ERRNO_843", /* 843 */ + "ERRNO_844", /* 844 */ + "ERRNO_845", /* 845 */ + "ERRNO_846", /* 846 */ + "ERRNO_847", /* 847 */ + "ERRNO_848", /* 848 */ + "ERRNO_849", /* 849 */ + "ERRNO_850", /* 850 */ + "ERRNO_851", /* 851 */ + "ERRNO_852", /* 852 */ + "ERRNO_853", /* 853 */ + "ERRNO_854", /* 854 */ + "ERRNO_855", /* 855 */ + "ERRNO_856", /* 856 */ + "ERRNO_857", /* 857 */ + "ERRNO_858", /* 858 */ + "ERRNO_859", /* 859 */ + "ERRNO_860", /* 860 */ + "ERRNO_861", /* 861 */ + "ERRNO_862", /* 862 */ + "ERRNO_863", /* 863 */ + "ERRNO_864", /* 864 */ + "ERRNO_865", /* 865 */ + "ERRNO_866", /* 866 */ + "ERRNO_867", /* 867 */ + "ERRNO_868", /* 868 */ + "ERRNO_869", /* 869 */ + "ERRNO_870", /* 870 */ + "ERRNO_871", /* 871 */ + "ERRNO_872", /* 872 */ + "ERRNO_873", /* 873 */ + "ERRNO_874", /* 874 */ + "ERRNO_875", /* 875 */ + "ERRNO_876", /* 876 */ + "ERRNO_877", /* 877 */ + "ERRNO_878", /* 878 */ + "ERRNO_879", /* 879 */ + "ERRNO_880", /* 880 */ + "ERRNO_881", /* 881 */ + "ERRNO_882", /* 882 */ + "ERRNO_883", /* 883 */ + "ERRNO_884", /* 884 */ + "ERRNO_885", /* 885 */ + "ERRNO_886", /* 886 */ + "ERRNO_887", /* 887 */ + "ERRNO_888", /* 888 */ + "ERRNO_889", /* 889 */ + "ERRNO_890", /* 890 */ + "ERRNO_891", /* 891 */ + "ERRNO_892", /* 892 */ + "ERRNO_893", /* 893 */ + "ERRNO_894", /* 894 */ + "ERRNO_895", /* 895 */ + "ERRNO_896", /* 896 */ + "ERRNO_897", /* 897 */ + "ERRNO_898", /* 898 */ + "ERRNO_899", /* 899 */ + "ERRNO_900", /* 900 */ + "ERRNO_901", /* 901 */ + "ERRNO_902", /* 902 */ + "ERRNO_903", /* 903 */ + "ERRNO_904", /* 904 */ + "ERRNO_905", /* 905 */ + "ERRNO_906", /* 906 */ + "ERRNO_907", /* 907 */ + "ERRNO_908", /* 908 */ + "ERRNO_909", /* 909 */ + "ERRNO_910", /* 910 */ + "ERRNO_911", /* 911 */ + "ERRNO_912", /* 912 */ + "ERRNO_913", /* 913 */ + "ERRNO_914", /* 914 */ + "ERRNO_915", /* 915 */ + "ERRNO_916", /* 916 */ + "ERRNO_917", /* 917 */ + "ERRNO_918", /* 918 */ + "ERRNO_919", /* 919 */ + "ERRNO_920", /* 920 */ + "ERRNO_921", /* 921 */ + "ERRNO_922", /* 922 */ + "ERRNO_923", /* 923 */ + "ERRNO_924", /* 924 */ + "ERRNO_925", /* 925 */ + "ERRNO_926", /* 926 */ + "ERRNO_927", /* 927 */ + "ERRNO_928", /* 928 */ + "ERRNO_929", /* 929 */ + "ERRNO_930", /* 930 */ + "ERRNO_931", /* 931 */ + "ERRNO_932", /* 932 */ + "ERRNO_933", /* 933 */ + "ERRNO_934", /* 934 */ + "ERRNO_935", /* 935 */ + "ERRNO_936", /* 936 */ + "ERRNO_937", /* 937 */ + "ERRNO_938", /* 938 */ + "ERRNO_939", /* 939 */ + "ERRNO_940", /* 940 */ + "ERRNO_941", /* 941 */ + "ERRNO_942", /* 942 */ + "ERRNO_943", /* 943 */ + "ERRNO_944", /* 944 */ + "ERRNO_945", /* 945 */ + "ERRNO_946", /* 946 */ + "ERRNO_947", /* 947 */ + "ERRNO_948", /* 948 */ + "ERRNO_949", /* 949 */ + "ERRNO_950", /* 950 */ + "ERRNO_951", /* 951 */ + "ERRNO_952", /* 952 */ + "ERRNO_953", /* 953 */ + "ERRNO_954", /* 954 */ + "ERRNO_955", /* 955 */ + "ERRNO_956", /* 956 */ + "ERRNO_957", /* 957 */ + "ERRNO_958", /* 958 */ + "ERRNO_959", /* 959 */ + "ERRNO_960", /* 960 */ + "ERRNO_961", /* 961 */ + "ERRNO_962", /* 962 */ + "ERRNO_963", /* 963 */ + "ERRNO_964", /* 964 */ + "ERRNO_965", /* 965 */ + "ERRNO_966", /* 966 */ + "ERRNO_967", /* 967 */ + "ERRNO_968", /* 968 */ + "ERRNO_969", /* 969 */ + "ERRNO_970", /* 970 */ + "ERRNO_971", /* 971 */ + "ERRNO_972", /* 972 */ + "ERRNO_973", /* 973 */ + "ERRNO_974", /* 974 */ + "ERRNO_975", /* 975 */ + "ERRNO_976", /* 976 */ + "ERRNO_977", /* 977 */ + "ERRNO_978", /* 978 */ + "ERRNO_979", /* 979 */ + "ERRNO_980", /* 980 */ + "ERRNO_981", /* 981 */ + "ERRNO_982", /* 982 */ + "ERRNO_983", /* 983 */ + "ERRNO_984", /* 984 */ + "ERRNO_985", /* 985 */ + "ERRNO_986", /* 986 */ + "ERRNO_987", /* 987 */ + "ERRNO_988", /* 988 */ + "ERRNO_989", /* 989 */ + "ERRNO_990", /* 990 */ + "ERRNO_991", /* 991 */ + "ERRNO_992", /* 992 */ + "ERRNO_993", /* 993 */ + "ERRNO_994", /* 994 */ + "ERRNO_995", /* 995 */ + "ERRNO_996", /* 996 */ + "ERRNO_997", /* 997 */ + "ERRNO_998", /* 998 */ + "ERRNO_999", /* 999 */ + "ECANCELED", /* 1000 */ + "ERRNO_1001", /* 1001 */ + "ERRNO_1002", /* 1002 */ + "ERRNO_1003", /* 1003 */ + "ERRNO_1004", /* 1004 */ + "ERRNO_1005", /* 1005 */ + "ERRNO_1006", /* 1006 */ + "ERRNO_1007", /* 1007 */ + "ERRNO_1008", /* 1008 */ + "ERRNO_1009", /* 1009 */ + "ERRNO_1010", /* 1010 */ + "ERRNO_1011", /* 1011 */ + "ERRNO_1012", /* 1012 */ + "ERRNO_1013", /* 1013 */ + "ERRNO_1014", /* 1014 */ + "ERRNO_1015", /* 1015 */ + "ERRNO_1016", /* 1016 */ + "ERRNO_1017", /* 1017 */ + "ERRNO_1018", /* 1018 */ + "ERRNO_1019", /* 1019 */ + "ERRNO_1020", /* 1020 */ + "ERRNO_1021", /* 1021 */ + "ERRNO_1022", /* 1022 */ + "ERRNO_1023", /* 1023 */ + "ERRNO_1024", /* 1024 */ + "ERRNO_1025", /* 1025 */ + "ERRNO_1026", /* 1026 */ + "ERRNO_1027", /* 1027 */ + "ERRNO_1028", /* 1028 */ + "ERRNO_1029", /* 1029 */ + "ERRNO_1030", /* 1030 */ + "ERRNO_1031", /* 1031 */ + "ERRNO_1032", /* 1032 */ + "ERRNO_1033", /* 1033 */ + "ERRNO_1034", /* 1034 */ + "ERRNO_1035", /* 1035 */ + "ERRNO_1036", /* 1036 */ + "ERRNO_1037", /* 1037 */ + "ERRNO_1038", /* 1038 */ + "ERRNO_1039", /* 1039 */ + "ERRNO_1040", /* 1040 */ + "ERRNO_1041", /* 1041 */ + "ERRNO_1042", /* 1042 */ + "ERRNO_1043", /* 1043 */ + "ERRNO_1044", /* 1044 */ + "ERRNO_1045", /* 1045 */ + "ERRNO_1046", /* 1046 */ + "ERRNO_1047", /* 1047 */ + "ERRNO_1048", /* 1048 */ + "ERRNO_1049", /* 1049 */ + "ERRNO_1050", /* 1050 */ + "ERRNO_1051", /* 1051 */ + "ERRNO_1052", /* 1052 */ + "ERRNO_1053", /* 1053 */ + "ERRNO_1054", /* 1054 */ + "ERRNO_1055", /* 1055 */ + "ERRNO_1056", /* 1056 */ + "ERRNO_1057", /* 1057 */ + "ERRNO_1058", /* 1058 */ + "ERRNO_1059", /* 1059 */ + "ERRNO_1060", /* 1060 */ + "ERRNO_1061", /* 1061 */ + "ERRNO_1062", /* 1062 */ + "ERRNO_1063", /* 1063 */ + "ERRNO_1064", /* 1064 */ + "ERRNO_1065", /* 1065 */ + "ERRNO_1066", /* 1066 */ + "ERRNO_1067", /* 1067 */ + "ERRNO_1068", /* 1068 */ + "ERRNO_1069", /* 1069 */ + "ERRNO_1070", /* 1070 */ + "ERRNO_1071", /* 1071 */ + "ERRNO_1072", /* 1072 */ + "ERRNO_1073", /* 1073 */ + "ERRNO_1074", /* 1074 */ + "ERRNO_1075", /* 1075 */ + "ERRNO_1076", /* 1076 */ + "ERRNO_1077", /* 1077 */ + "ERRNO_1078", /* 1078 */ + "ERRNO_1079", /* 1079 */ + "ERRNO_1080", /* 1080 */ + "ERRNO_1081", /* 1081 */ + "ERRNO_1082", /* 1082 */ + "ERRNO_1083", /* 1083 */ + "ERRNO_1084", /* 1084 */ + "ERRNO_1085", /* 1085 */ + "ERRNO_1086", /* 1086 */ + "ERRNO_1087", /* 1087 */ + "ERRNO_1088", /* 1088 */ + "ERRNO_1089", /* 1089 */ + "ERRNO_1090", /* 1090 */ + "ERRNO_1091", /* 1091 */ + "ERRNO_1092", /* 1092 */ + "ERRNO_1093", /* 1093 */ + "ERRNO_1094", /* 1094 */ + "ERRNO_1095", /* 1095 */ + "ERRNO_1096", /* 1096 */ + "ERRNO_1097", /* 1097 */ + "ERRNO_1098", /* 1098 */ + "ERRNO_1099", /* 1099 */ + "ERRNO_1100", /* 1100 */ + "ERRNO_1101", /* 1101 */ + "ERRNO_1102", /* 1102 */ + "ERRNO_1103", /* 1103 */ + "ERRNO_1104", /* 1104 */ + "ERRNO_1105", /* 1105 */ + "ERRNO_1106", /* 1106 */ + "ERRNO_1107", /* 1107 */ + "ERRNO_1108", /* 1108 */ + "ERRNO_1109", /* 1109 */ + "ERRNO_1110", /* 1110 */ + "ERRNO_1111", /* 1111 */ + "ERRNO_1112", /* 1112 */ + "ERRNO_1113", /* 1113 */ + "ERRNO_1114", /* 1114 */ + "ERRNO_1115", /* 1115 */ + "ERRNO_1116", /* 1116 */ + "ERRNO_1117", /* 1117 */ + "ERRNO_1118", /* 1118 */ + "ERRNO_1119", /* 1119 */ + "ERRNO_1120", /* 1120 */ + "ERRNO_1121", /* 1121 */ + "ERRNO_1122", /* 1122 */ + "ERRNO_1123", /* 1123 */ + "ERRNO_1124", /* 1124 */ + "ERRNO_1125", /* 1125 */ + "ERRNO_1126", /* 1126 */ + "ERRNO_1127", /* 1127 */ + "ERRNO_1128", /* 1128 */ + "ERRNO_1129", /* 1129 */ + "ERRNO_1130", /* 1130 */ + "ERRNO_1131", /* 1131 */ + "ERRNO_1132", /* 1132 */ + "EDQUOT", /* 1133 */ + "EMAXERRNO", /* 1134 */ diff --git a/alice-strace/linux/mips/ioctlent.h.in b/alice-strace/linux/mips/ioctlent.h.in new file mode 100644 index 0000000..15808a6 --- /dev/null +++ b/alice-strace/linux/mips/ioctlent.h.in @@ -0,0 +1,59 @@ + {"asm/ioctls.h", "TCGETS", 0x5401}, + {"asm/ioctls.h", "TCSETS", 0x5402}, + {"asm/ioctls.h", "TCSETSW", 0x5403}, + {"asm/ioctls.h", "TCSETSF", 0x5404}, + {"asm/ioctls.h", "TCGETA", 0x5405}, + {"asm/ioctls.h", "TCSETA", 0x5406}, + {"asm/ioctls.h", "TCSETAW", 0x5407}, + {"asm/ioctls.h", "TCSETAF", 0x5408}, + {"asm/ioctls.h", "TCSBRK", 0x5409}, + {"asm/ioctls.h", "TCXONC", 0x540a}, + {"asm/ioctls.h", "TCFLSH", 0x540b}, + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCGPGRP", 0x540f}, + {"asm/ioctls.h", "TIOCSPGRP", 0x5410}, + {"asm/ioctls.h", "TIOCOUTQ", 0x5411}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x5413}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x5414}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "FIONREAD", 0x541b}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "FIONBIO", 0x5421}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "FIONCLEX", 0x5450}, + {"asm/ioctls.h", "FIOCLEX", 0x5451}, + {"asm/ioctls.h", "FIOASYNC", 0x5452}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e}, + {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f}, diff --git a/alice-strace/linux/mips/ioctlent.sh b/alice-strace/linux/mips/ioctlent.sh new file mode 100755 index 0000000..52d8df5 --- /dev/null +++ b/alice-strace/linux/mips/ioctlent.sh @@ -0,0 +1,96 @@ +#!/bin/sh +# Copyright (c) 1993, 1994, 1995 Rick Sladkey +# All rights reserved. +# +# Copyright (c) 1995, 1996 Michael Elizabeth Chastain +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Files to find. +file_find='asm/*.h linux/*.h scsi/*.h' + +# Files to stop. +file_stop='asm/byteorder.h linux/config.h linux/pci.h linux/xd.h' + +# Defs to find. +# Work on the kernel source to convert all to df_iowr. +# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h. +df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+' +df_iowr='_IO|_IOR|_IOW|_IOWR' +df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]' +df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h +df_470N='470[0-9]' # linux/fs.h (only in 1.2.13) +df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h +df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13) +df_tail='([() ]|$)' +def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail" + +# Defs to stop. +ds_tail='_MAGIC|_PATCH' +ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13) +ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13) +def_stop="$ds_tail|$ds_fdmp|$ds_mtio" + +# Validate arg count. +if [ $# -ne 1 ] +then + echo "usage: $0 include-directory" >&2 + exit 1 +fi + +# Grep through the files. +( + # Construct list: find files minus stop files. + cd $1 || exit + file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u` + + # Grep matching #define lines. + # Transform to C structure form. + # Filter out stop list. + egrep "$def_find" $file_list | + sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' | + egrep -v "$def_stop" +) > ioctlent.tmp + +# Generate the output file. +echo '/* This file is automatically generated by ioctlent.sh */' +echo +echo '#include ' +echo +echo '/* Needed for */' +echo '#define BAYCOM_DEBUG' +echo +echo '/* Needed for */' +echo '#include ' +echo '#include ' +echo +awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u +echo +echo 'struct ioctlent ioctlent [] =' +echo '{' +cat ioctlent.tmp +echo '};' + +# Clean up. +rm -f ioctlent.tmp diff --git a/alice-strace/linux/mips/signalent.h b/alice-strace/linux/mips/signalent.h new file mode 100644 index 0000000..2cf746a --- /dev/null +++ b/alice-strace/linux/mips/signalent.h @@ -0,0 +1,32 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGIOT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGUSR1", /* 16 */ + "SIGUSR2", /* 17 */ + "SIGCHLD", /* 18 */ + "SIGPWR", /* 19 */ + "SIGWINCH", /* 20 */ + "SIGURG", /* 21 */ + "SIGIO", /* 22 */ + "SIGSTOP", /* 23 */ + "SIGTSTP", /* 24 */ + "SIGCONT", /* 25 */ + "SIGTTIN", /* 26 */ + "SIGTTOU", /* 27 */ + "SIGVTALRM", /* 28 */ + "SIGPROF", /* 29 */ + "SIGXCPU", /* 30 */ + "SIGXFSZ", /* 31 */ diff --git a/alice-strace/linux/mips/syscallent-compat.h b/alice-strace/linux/mips/syscallent-compat.h new file mode 100644 index 0000000..696108f --- /dev/null +++ b/alice-strace/linux/mips/syscallent-compat.h @@ -0,0 +1,870 @@ + { 0, 0, printargs, "svr4_syscall" }, /* 000 */ + { 0, 0, printargs, "svr4_exit" }, /* 001 */ + { 0, 0, printargs, "svr4_fork" }, /* 002 */ + { 0, 0, printargs, "svr4_read" }, /* 003 */ + { 0, 0, printargs, "svr4_write" }, /* 004 */ + { 0, 0, printargs, "svr4_open" }, /* 005 */ + { 0, 0, printargs, "svr4_close" }, /* 006 */ + { 0, 0, printargs, "svr4_wait" }, /* 007 */ + { 0, 0, printargs, "svr4_creat" }, /* 008 */ + { 0, 0, printargs, "svr4_link" }, /* 009 */ + { 0, 0, printargs, "svr4_unlink" }, /* 010 */ + { 0, 0, printargs, "svr4_exec" }, /* 011 */ + { 0, 0, printargs, "svr4_chdir" }, /* 012 */ + { 0, 0, printargs, "svr4_gtime" }, /* 013 */ + { 0, 0, printargs, "svr4_mknod" }, /* 014 */ + { 0, 0, printargs, "svr4_chmod" }, /* 015 */ + { 0, 0, printargs, "svr4_chown" }, /* 016 */ + { 0, TM, printargs, "svr4_sbreak" }, /* 017 */ + { 0, 0, printargs, "svr4_stat" }, /* 018 */ + { 0, 0, printargs, "svr4_lseek" }, /* 019 */ + { 0, 0, printargs, "svr4_getpid" }, /* 020 */ + { 0, 0, printargs, "svr4_mount" }, /* 021 */ + { 0, 0, printargs, "svr4_umount" }, /* 022 */ + { 0, 0, printargs, "svr4_setuid" }, /* 023 */ + { 0, 0, printargs, "svr4_getuid" }, /* 024 */ + { 0, 0, printargs, "svr4_stime" }, /* 025 */ + { 0, 0, printargs, "svr4_ptrace" }, /* 026 */ + { 0, 0, printargs, "svr4_alarm" }, /* 027 */ + { 0, 0, printargs, "svr4_fstat" }, /* 028 */ + { 0, 0, printargs, "svr4_pause" }, /* 029 */ + { 0, 0, printargs, "svr4_utime" }, /* 030 */ + { 0, 0, printargs, "svr4_stty" }, /* 031 */ + { 0, 0, printargs, "svr4_gtty" }, /* 032 */ + { 0, 0, printargs, "svr4_access" }, /* 033 */ + { 0, 0, printargs, "svr4_nice" }, /* 034 */ + { 0, 0, printargs, "svr4_statfs" }, /* 035 */ + { 0, 0, printargs, "svr4_sync" }, /* 036 */ + { 0, 0, printargs, "svr4_kill" }, /* 037 */ + { 0, 0, printargs, "svr4_fstatfs" }, /* 038 */ + { 0, 0, printargs, "svr4_setpgrp" }, /* 039 */ + { 0, 0, printargs, "svr4_cxenix" }, /* 040 */ + { 0, 0, printargs, "svr4_dup" }, /* 041 */ + { 0, 0, printargs, "svr4_pipe" }, /* 042 */ + { 0, 0, printargs, "svr4_times" }, /* 043 */ + { 0, 0, printargs, "svr4_profil" }, /* 044 */ + { 0, 0, printargs, "svr4_plock" }, /* 045 */ + { 0, 0, printargs, "svr4_setgid" }, /* 046 */ + { 0, 0, printargs, "svr4_getgid" }, /* 047 */ + { 0, 0, printargs, "svr4_sig" }, /* 048 */ + { 0, 0, printargs, "svr4_msgsys" }, /* 049 */ + { 0, 0, printargs, "svr4_sysmips" }, /* 050 */ + { 0, 0, printargs, "svr4_sysacct" }, /* 051 */ + { 0, 0, printargs, "svr4_shmsys" }, /* 052 */ + { 0, 0, printargs, "svr4_semsys" }, /* 053 */ + { 0, 0, printargs, "svr4_ioctl" }, /* 054 */ + { 0, 0, printargs, "svr4_uadmin" }, /* 055 */ + { 0, 0, printargs, "svr4_exch" }, /* 056 */ + { 0, 0, printargs, "svr4_utssys" }, /* 057 */ + { 0, 0, printargs, "svr4_fsync" }, /* 058 */ + { 0, 0, printargs, "svr4_exece" }, /* 059 */ + { 0, 0, printargs, "svr4_umask" }, /* 060 */ + { 0, 0, printargs, "svr4_chroot" }, /* 061 */ + { 0, 0, printargs, "svr4_fcntl" }, /* 062 */ + { 0, 0, printargs, "svr4_ulimit" }, /* 063 */ + { 0, 0, NULL, NULL }, /* 064 */ + { 0, 0, NULL, NULL }, /* 065 */ + { 0, 0, NULL, NULL }, /* 066 */ + { 0, 0, NULL, NULL }, /* 067 */ + { 0, 0, NULL, NULL }, /* 068 */ + { 0, 0, NULL, NULL }, /* 069 */ + { 0, 0, printargs, "svr4_advfs" }, /* 070 */ + { 0, 0, printargs, "svr4_unadvfs" }, /* 071 */ + { 0, 0, NULL, NULL }, /* 072 */ + { 0, 0, NULL, NULL }, /* 073 */ + { 0, 0, printargs, "svr4_rfstart" }, /* 074 */ + { 0, 0, NULL, NULL }, /* 075 */ + { 0, 0, printargs, "svr4_rdebug" }, /* 076 */ + { 0, 0, printargs, "svr4_rfstop" }, /* 077 */ + { 0, 0, printargs, "svr4_rfsys" }, /* 078 */ + { 0, 0, printargs, "svr4_rmdir" }, /* 079 */ + { 0, 0, printargs, "svr4_mkdir" }, /* 080 */ + { 0, 0, printargs, "svr4_getdents" }, /* 081 */ + { 0, 0, printargs, "svr4_libattach" }, /* 082 */ + { 0, 0, printargs, "svr4_libdetach" }, /* 083 */ + { 0, 0, printargs, "svr4_sysfs" }, /* 084 */ + { 0, 0, printargs, "svr4_getmsg" }, /* 085 */ + { 0, 0, printargs, "svr4_putmsg" }, /* 086 */ + { 0, 0, printargs, "svr4_poll" }, /* 087 */ + { 0, 0, printargs, "svr4_lstat" }, /* 088 */ + { 0, 0, printargs, "svr4_symlink" }, /* 089 */ + { 0, 0, printargs, "svr4_readlink" }, /* 090 */ + { 0, 0, printargs, "svr4_setgroups" }, /* 091 */ + { 0, 0, printargs, "svr4_getgroups" }, /* 092 */ + { 0, 0, printargs, "svr4_fchmod" }, /* 093 */ + { 0, 0, printargs, "svr4_fchown" }, /* 094 */ + { 0, 0, printargs, "svr4_sigprocmask" }, /* 095 */ + { 0, 0, printargs, "svr4_sigsuspend" }, /* 096 */ + { 0, 0, printargs, "svr4_sigaltstack" }, /* 097 */ + { 0, 0, printargs, "svr4_sigaction" }, /* 098 */ + { 0, 0, printargs, "svr4_sigpending" }, /* 099 */ + { 0, 0, printargs, "svr4_setcontext" }, /* 0100 */ + { 0, 0, printargs, "svr4_evsys" }, /* 0101 */ + { 0, 0, printargs, "svr4_evtrapret" }, /* 0102 */ + { 0, 0, printargs, "svr4_statvfs" }, /* 0103 */ + { 0, 0, printargs, "svr4_fstatvfs" }, /* 0104 */ + { 0, 0, NULL, NULL }, /* 105 */ + { 0, 0, printargs, "svr4_nfssys" }, /* 0106 */ + { 0, 0, printargs, "svr4_waitid" }, /* 0107 */ + { 0, 0, printargs, "svr4_sigsendset" }, /* 0108 */ + { 0, 0, printargs, "svr4_hrtsys" }, /* 0109 */ + { 0, 0, printargs, "svr4_acancel" }, /* 0110 */ + { 0, 0, printargs, "svr4_async" }, /* 0111 */ + { 0, 0, printargs, "svr4_priocntlset" }, /* 0112 */ + { 0, 0, printargs, "svr4_pathconf" }, /* 0113 */ + { 0, TM, printargs, "svr4_mincore" }, /* 0114 */ + { 0, TD|TM, printargs, "svr4_mmap" }, /* 0115 */ + { 0, TM, printargs, "svr4_mprotect" }, /* 0116 */ + { 0, TM, printargs, "svr4_munmap" }, /* 0117 */ + { 0, 0, printargs, "svr4_fpathconf" }, /* 0118 */ + { 0, 0, printargs, "svr4_vfork" }, /* 0119 */ + { 0, 0, printargs, "svr4_fchdir" }, /* 0120 */ + { 0, 0, printargs, "svr4_readv" }, /* 0121 */ + { 0, 0, printargs, "svr4_writev" }, /* 0122 */ + { 0, 0, printargs, "svr4_xstat" }, /* 0123 */ + { 0, 0, printargs, "svr4_lxstat" }, /* 0124 */ + { 0, 0, printargs, "svr4_fxstat" }, /* 0125 */ + { 0, 0, printargs, "svr4_xmknod" }, /* 0126 */ + { 0, 0, printargs, "svr4_clocal" }, /* 0127 */ + { 0, 0, printargs, "svr4_setrlimit" }, /* 0128 */ + { 0, 0, printargs, "svr4_getrlimit" }, /* 0129 */ + { 0, 0, printargs, "svr4_lchown" }, /* 0130 */ + { 0, 0, printargs, "svr4_memcntl" }, /* 0131 */ + { 0, 0, printargs, "svr4_getpmsg" }, /* 0132 */ + { 0, 0, printargs, "svr4_putpmsg" }, /* 0133 */ + { 0, 0, printargs, "svr4_rename" }, /* 0134 */ + { 0, 0, printargs, "svr4_nuname" }, /* 0135 */ + { 0, 0, printargs, "svr4_setegid" }, /* 0136 */ + { 0, 0, printargs, "svr4_sysconf" }, /* 0137 */ + { 0, 0, printargs, "svr4_adjtime" }, /* 0138 */ + { 0, 0, printargs, "svr4_sysinfo" }, /* 0139 */ + { 0, 0, NULL, NULL }, /* 140 */ + { 0, 0, printargs, "svr4_seteuid" }, /* 0141 */ + { 0, 0, printargs, "svr4_PYRAMID_statis" }, /* 0142 */ + { 0, 0, printargs, "svr4_PYRAMID_tuning" }, /* 0143 */ + { 0, 0, printargs, "svr4_PYRAMID_forcerr" }, /* 0144 */ + { 0, 0, printargs, "svr4_PYRAMID_mpcntl" }, /* 0145 */ + { 0, 0, NULL, NULL }, /* 146 */ + { 0, 0, NULL, NULL }, /* 147 */ + { 0, 0, NULL, NULL }, /* 148 */ + { 0, 0, NULL, NULL }, /* 149 */ + { 0, 0, NULL, NULL }, /* 150 */ + { 0, 0, NULL, NULL }, /* 151 */ + { 0, 0, NULL, NULL }, /* 152 */ + { 0, 0, NULL, NULL }, /* 153 */ + { 0, 0, NULL, NULL }, /* 154 */ + { 0, 0, NULL, NULL }, /* 155 */ + { 0, 0, NULL, NULL }, /* 156 */ + { 0, 0, NULL, NULL }, /* 157 */ + { 0, 0, NULL, NULL }, /* 158 */ + { 0, 0, NULL, NULL }, /* 159 */ + { 0, 0, NULL, NULL }, /* 160 */ + { 0, 0, NULL, NULL }, /* 161 */ + { 0, 0, NULL, NULL }, /* 162 */ + { 0, 0, NULL, NULL }, /* 163 */ + { 0, 0, NULL, NULL }, /* 164 */ + { 0, 0, NULL, NULL }, /* 165 */ + { 0, 0, NULL, NULL }, /* 166 */ + { 0, 0, NULL, NULL }, /* 167 */ + { 0, 0, NULL, NULL }, /* 168 */ + { 0, 0, NULL, NULL }, /* 169 */ + { 0, 0, NULL, NULL }, /* 170 */ + { 0, 0, NULL, NULL }, /* 171 */ + { 0, 0, NULL, NULL }, /* 172 */ + { 0, 0, NULL, NULL }, /* 173 */ + { 0, 0, NULL, NULL }, /* 174 */ + { 0, 0, NULL, NULL }, /* 175 */ + { 0, 0, NULL, NULL }, /* 176 */ + { 0, 0, NULL, NULL }, /* 177 */ + { 0, 0, NULL, NULL }, /* 178 */ + { 0, 0, NULL, NULL }, /* 179 */ + { 0, 0, NULL, NULL }, /* 180 */ + { 0, 0, NULL, NULL }, /* 181 */ + { 0, 0, NULL, NULL }, /* 182 */ + { 0, 0, NULL, NULL }, /* 183 */ + { 0, 0, NULL, NULL }, /* 184 */ + { 0, 0, NULL, NULL }, /* 185 */ + { 0, 0, NULL, NULL }, /* 186 */ + { 0, 0, NULL, NULL }, /* 187 */ + { 0, 0, NULL, NULL }, /* 188 */ + { 0, 0, NULL, NULL }, /* 189 */ + { 0, 0, NULL, NULL }, /* 190 */ + { 0, 0, NULL, NULL }, /* 191 */ + { 0, 0, NULL, NULL }, /* 192 */ + { 0, 0, NULL, NULL }, /* 193 */ + { 0, 0, NULL, NULL }, /* 194 */ + { 0, 0, NULL, NULL }, /* 195 */ + { 0, 0, NULL, NULL }, /* 196 */ + { 0, 0, NULL, NULL }, /* 197 */ + { 0, 0, NULL, NULL }, /* 198 */ + { 0, 0, NULL, NULL }, /* 199 */ + { 0, 0, NULL, NULL }, /* 200 */ + { 0, 0, printargs, "svr4_aread" }, /* 0201 */ + { 0, 0, printargs, "svr4_awrite" }, /* 0202 */ + { 0, 0, printargs, "svr4_listio" }, /* 0203 */ + { 0, 0, printargs, "svr4_mips_acancel" }, /* 0204 */ + { 0, 0, printargs, "svr4_astatus" }, /* 0205 */ + { 0, 0, printargs, "svr4_await" }, /* 0206 */ + { 0, 0, printargs, "svr4_areadv" }, /* 0207 */ + { 0, 0, printargs, "svr4_awritev" }, /* 0208 */ + + [209 ... 999] = { }, /* 999 */ /* end of SVR4 */ + + { 0, 0, printargs, "sysv_syscall" }, /* 1000 */ /* start of SYSV */ + { 0, 0, printargs, "sysv_exit" }, /* 1001 */ + { 0, 0, printargs, "sysv_fork" }, /* 1002 */ + { 0, 0, printargs, "sysv_read" }, /* 1003 */ + { 0, 0, printargs, "sysv_write" }, /* 1004 */ + { 0, 0, printargs, "sysv_open" }, /* 1005 */ + { 0, 0, printargs, "sysv_close" }, /* 1006 */ + { 0, 0, printargs, "sysv_wait" }, /* 1007 */ + { 0, 0, printargs, "sysv_creat" }, /* 1008 */ + { 0, 0, printargs, "sysv_link" }, /* 1009 */ + { 0, 0, printargs, "sysv_unlink" }, /* 1010 */ + { 0, 0, printargs, "sysv_execv" }, /* 1011 */ + { 0, 0, printargs, "sysv_chdir" }, /* 1012 */ + { 0, 0, printargs, "sysv_time" }, /* 1013 */ + { 0, 0, printargs, "sysv_mknod" }, /* 1014 */ + { 0, 0, printargs, "sysv_chmod" }, /* 1015 */ + { 0, 0, printargs, "sysv_chown" }, /* 1016 */ + { 0, TM, printargs, "sysv_brk" }, /* 1017 */ + { 0, 0, printargs, "sysv_stat" }, /* 1018 */ + { 0, 0, printargs, "sysv_lseek" }, /* 1019 */ + { 0, 0, printargs, "sysv_getpid" }, /* 1020 */ + { 0, 0, printargs, "sysv_mount" }, /* 1021 */ + { 0, 0, printargs, "sysv_umount" }, /* 1022 */ + { 0, 0, printargs, "sysv_setuid" }, /* 1023 */ + { 0, 0, printargs, "sysv_getuid" }, /* 1024 */ + { 0, 0, printargs, "sysv_stime" }, /* 1025 */ + { 0, 0, printargs, "sysv_ptrace" }, /* 1026 */ + { 0, 0, printargs, "sysv_alarm" }, /* 1027 */ + { 0, 0, printargs, "sysv_fstat" }, /* 1028 */ + { 0, 0, printargs, "sysv_pause" }, /* 1029 */ + { 0, 0, printargs, "sysv_utime" }, /* 1030 */ + { 0, 0, printargs, "sysv_stty" }, /* 1031 */ + { 0, 0, printargs, "sysv_gtty" }, /* 1032 */ + { 0, 0, printargs, "sysv_access" }, /* 1033 */ + { 0, 0, printargs, "sysv_nice" }, /* 1034 */ + { 0, 0, printargs, "sysv_statfs" }, /* 1035 */ + { 0, 0, printargs, "sysv_sync" }, /* 1036 */ + { 0, 0, printargs, "sysv_kill" }, /* 1037 */ + { 0, 0, printargs, "sysv_fstatfs" }, /* 1038 */ + { 0, 0, printargs, "sysv_setpgrp" }, /* 1039 */ + { 0, 0, printargs, "sysv_syssgi" }, /* 1040 */ + { 0, 0, printargs, "sysv_dup" }, /* 1041 */ + { 0, 0, printargs, "sysv_pipe" }, /* 1042 */ + { 0, 0, printargs, "sysv_times" }, /* 1043 */ + { 0, 0, printargs, "sysv_profil" }, /* 1044 */ + { 0, 0, printargs, "sysv_plock" }, /* 1045 */ + { 0, 0, printargs, "sysv_setgid" }, /* 1046 */ + { 0, 0, printargs, "sysv_getgid" }, /* 1047 */ + { 0, 0, printargs, "sysv_sig" }, /* 1048 */ + { 0, 0, printargs, "sysv_msgsys" }, /* 1049 */ + { 0, 0, printargs, "sysv_sysmips" }, /* 1050 */ + { 0, 0, printargs, "sysv_acct" }, /* 1051 */ + { 0, 0, printargs, "sysv_shmsys" }, /* 1052 */ + { 0, 0, printargs, "sysv_semsys" }, /* 1053 */ + { 0, 0, printargs, "sysv_ioctl" }, /* 1054 */ + { 0, 0, printargs, "sysv_uadmin" }, /* 1055 */ + { 0, 0, printargs, "sysv_sysmp" }, /* 1056 */ + { 0, 0, printargs, "sysv_utssys" }, /* 1057 */ + { 0, 0, NULL, NULL }, /* 1058 */ + { 0, 0, printargs, "sysv_execve" }, /* 1059 */ + { 0, 0, printargs, "sysv_umask" }, /* 1060 */ + { 0, 0, printargs, "sysv_chroot" }, /* 1061 */ + { 0, 0, printargs, "sysv_fcntl" }, /* 1062 */ + { 0, 0, printargs, "sysv_ulimit" }, /* 1063 */ + { 0, 0, NULL, NULL }, /* 1064 */ + { 0, 0, NULL, NULL }, /* 1065 */ + { 0, 0, NULL, NULL }, /* 1066 */ + { 0, 0, NULL, NULL }, /* 1067 */ + { 0, 0, NULL, NULL }, /* 1068 */ + { 0, 0, NULL, NULL }, /* 1069 */ + { 0, 0, printargs, "sysv_advfs" }, /* 1070 */ + { 0, 0, printargs, "sysv_unadvfs" }, /* 1071 */ + { 0, 0, printargs, "sysv_rmount" }, /* 1072 */ + { 0, 0, printargs, "sysv_rumount" }, /* 1073 */ + { 0, 0, printargs, "sysv_rfstart" }, /* 1074 */ + { 0, 0, printargs, "sysv_getrlimit64" }, /* 1075 */ + { 0, 0, printargs, "sysv_setrlimit64" }, /* 1076 */ + { 0, 0, printargs, "sysv_nanosleep" }, /* 1077 */ + { 0, 0, printargs, "sysv_lseek64" }, /* 1078 */ + { 0, 0, printargs, "sysv_rmdir" }, /* 1079 */ + { 0, 0, printargs, "sysv_mkdir" }, /* 1080 */ + { 0, 0, printargs, "sysv_getdents" }, /* 1081 */ + { 0, 0, printargs, "sysv_sginap" }, /* 1082 */ + { 0, 0, printargs, "sysv_sgikopt" }, /* 1083 */ + { 0, 0, printargs, "sysv_sysfs" }, /* 1084 */ + { 0, 0, printargs, "sysv_getmsg" }, /* 1085 */ + { 0, 0, printargs, "sysv_putmsg" }, /* 1086 */ + { 0, 0, printargs, "sysv_poll" }, /* 1087 */ + { 0, 0, printargs, "sysv_sigreturn" }, /* 1088 */ + { 0, 0, printargs, "sysv_accept" }, /* 1089 */ + { 0, 0, printargs, "sysv_bind" }, /* 1090 */ + { 0, 0, printargs, "sysv_connect" }, /* 1091 */ + { 0, 0, printargs, "sysv_gethostid" }, /* 1092 */ + { 0, 0, printargs, "sysv_getpeername" }, /* 1093 */ + { 0, 0, printargs, "sysv_getsockname" }, /* 1094 */ + { 0, 0, printargs, "sysv_getsockopt" }, /* 1095 */ + { 0, 0, printargs, "sysv_listen" }, /* 1096 */ + { 0, 0, printargs, "sysv_recv" }, /* 1097 */ + { 0, 0, printargs, "sysv_recvfrom" }, /* 1098 */ + { 0, 0, printargs, "sysv_recvmsg" }, /* 1099 */ + { 0, 0, printargs, "sysv_select" }, /* 1100 */ + { 0, 0, printargs, "sysv_send" }, /* 1101 */ + { 0, 0, printargs, "sysv_sendmsg" }, /* 1102 */ + { 0, 0, printargs, "sysv_sendto" }, /* 1103 */ + { 0, 0, printargs, "sysv_sethostid" }, /* 1104 */ + { 0, 0, printargs, "sysv_setsockopt" }, /* 1105 */ + { 0, 0, printargs, "sysv_shutdown" }, /* 1106 */ + { 0, 0, printargs, "sysv_socket" }, /* 1107 */ + { 0, 0, printargs, "sysv_gethostname" }, /* 1108 */ + { 0, 0, printargs, "sysv_sethostname" }, /* 1109 */ + { 0, 0, printargs, "sysv_getdomainname" }, /* 1110 */ + { 0, 0, printargs, "sysv_setdomainname" }, /* 1111 */ + { 0, 0, printargs, "sysv_truncate" }, /* 1112 */ + { 0, 0, printargs, "sysv_ftruncate" }, /* 1113 */ + { 0, 0, printargs, "sysv_rename" }, /* 1114 */ + { 0, 0, printargs, "sysv_symlink" }, /* 1115 */ + { 0, 0, printargs, "sysv_readlink" }, /* 1116 */ + { 0, 0, printargs, "sysv_lstat" }, /* 1117 */ + { 0, 0, printargs, "sysv_nfsmount" }, /* 1118 */ + { 0, 0, printargs, "sysv_nfssvc" }, /* 1119 */ + { 0, 0, printargs, "sysv_getfh" }, /* 1120 */ + { 0, 0, printargs, "sysv_async_daemon" }, /* 1121 */ + { 0, 0, printargs, "sysv_exportfs" }, /* 1122 */ + { 0, 0, printargs, "sysv_setregid" }, /* 1123 */ + { 0, 0, printargs, "sysv_setreuid" }, /* 1124 */ + { 0, 0, printargs, "sysv_getitimer" }, /* 1125 */ + { 0, 0, printargs, "sysv_setitimer" }, /* 1126 */ + { 0, 0, printargs, "sysv_adjtime" }, /* 1127 */ + { 0, 0, printargs, "sysv_BSD_getime" }, /* 1128 */ + { 0, 0, printargs, "sysv_sproc" }, /* 1129 */ + { 0, 0, printargs, "sysv_prctl" }, /* 1130 */ + { 0, 0, printargs, "sysv_procblk" }, /* 1131 */ + { 0, 0, printargs, "sysv_sprocsp" }, /* 1132 */ + { 0, 0, printargs, "sysv_sgigsc" }, /* 1133 */ + { 0, TD|TM, printargs, "sysv_mmap" }, /* 1134 */ + { 0, TM, printargs, "sysv_munmap" }, /* 1135 */ + { 0, TM, printargs, "sysv_mprotect" }, /* 1136 */ + { 0, TM, printargs, "sysv_msync" }, /* 1137 */ + { 0, TM, printargs, "sysv_madvise" }, /* 1138 */ + { 0, 0, printargs, "sysv_pagelock" }, /* 1139 */ + { 0, 0, printargs, "sysv_getpagesize" }, /* 1140 */ + { 0, TF, printargs, "sysv_quotactl" }, /* 1141 */ + { 0, 0, printargs, "sysv_libdetach" }, /* 1142 */ + { 0, 0, printargs, "sysv_BSDgetpgrp" }, /* 1143 */ + { 0, 0, printargs, "sysv_BSDsetpgrp" }, /* 1144 */ + { 0, 0, printargs, "sysv_vhangup" }, /* 1145 */ + { 0, 0, printargs, "sysv_fsync" }, /* 1146 */ + { 0, 0, printargs, "sysv_fchdir" }, /* 1147 */ + { 0, 0, printargs, "sysv_getrlimit" }, /* 1148 */ + { 0, 0, printargs, "sysv_setrlimit" }, /* 1149 */ + { 0, 0, printargs, "sysv_cacheflush" }, /* 1150 */ + { 0, 0, printargs, "sysv_cachectl" }, /* 1151 */ + { 0, 0, printargs, "sysv_fchown" }, /* 1152 */ + { 0, 0, printargs, "sysv_fchmod" }, /* 1153 */ + { 0, 0, printargs, "sysv_wait3" }, /* 1154 */ + { 0, 0, printargs, "sysv_socketpair" }, /* 1155 */ + { 0, 0, printargs, "sysv_sysinfo" }, /* 1156 */ + { 0, 0, printargs, "sysv_nuname" }, /* 1157 */ + { 0, 0, printargs, "sysv_xstat" }, /* 1158 */ + { 0, 0, printargs, "sysv_lxstat" }, /* 1159 */ + { 0, 0, printargs, "sysv_fxstat" }, /* 1160 */ + { 0, 0, printargs, "sysv_xmknod" }, /* 1161 */ + { 0, 0, printargs, "sysv_ksigaction" }, /* 1162 */ + { 0, 0, printargs, "sysv_sigpending" }, /* 1163 */ + { 0, 0, printargs, "sysv_sigprocmask" }, /* 1164 */ + { 0, 0, printargs, "sysv_sigsuspend" }, /* 1165 */ + { 0, 0, printargs, "sysv_sigpoll" }, /* 1166 */ + { 0, 0, printargs, "sysv_swapctl" }, /* 1167 */ + { 0, 0, printargs, "sysv_getcontext" }, /* 1168 */ + { 0, 0, printargs, "sysv_setcontext" }, /* 1169 */ + { 0, 0, printargs, "sysv_waitsys" }, /* 1170 */ + { 0, 0, printargs, "sysv_sigstack" }, /* 1171 */ + { 0, 0, printargs, "sysv_sigaltstack" }, /* 1172 */ + { 0, 0, printargs, "sysv_sigsendset" }, /* 1173 */ + { 0, 0, printargs, "sysv_statvfs" }, /* 1174 */ + { 0, 0, printargs, "sysv_fstatvfs" }, /* 1175 */ + { 0, 0, printargs, "sysv_getpmsg" }, /* 1176 */ + { 0, 0, printargs, "sysv_putpmsg" }, /* 1177 */ + { 0, 0, printargs, "sysv_lchown" }, /* 1178 */ + { 0, 0, printargs, "sysv_priocntl" }, /* 1179 */ + { 0, 0, printargs, "sysv_ksigqueue" }, /* 1180 */ + { 0, 0, printargs, "sysv_readv" }, /* 1181 */ + { 0, 0, printargs, "sysv_writev" }, /* 1182 */ + { 0, 0, printargs, "sysv_truncate64" }, /* 1183 */ + { 0, 0, printargs, "sysv_ftruncate64" }, /* 1184 */ + { 0, TD|TM, printargs, "sysv_mmap64" }, /* 1185 */ + { 0, 0, printargs, "sysv_dmi" }, /* 1186 */ + { 0, 0, printargs, "sysv_pread" }, /* 1187 */ + { 0, 0, printargs, "sysv_pwrite" }, /* 1188 */ + + [1189 ... 1999] = { }, /* 1999 */ /* end of SYSV */ + + { 0, 0, printargs, "bsd43_syscall" }, /* 2000 */ /* start of BSD 4.3 */ + { 0, 0, printargs, "bsd43_exit" }, /* 2001 */ + { 0, 0, printargs, "bsd43_fork" }, /* 2002 */ + { 0, 0, printargs, "bsd43_read" }, /* 2003 */ + { 0, 0, printargs, "bsd43_write" }, /* 2004 */ + { 0, 0, printargs, "bsd43_open" }, /* 2005 */ + { 0, 0, printargs, "bsd43_close" }, /* 2006 */ + { 0, 0, printargs, "bsd43_wait" }, /* 2007 */ + { 0, 0, printargs, "bsd43_creat" }, /* 2008 */ + { 0, 0, printargs, "bsd43_link" }, /* 2009 */ + { 0, 0, printargs, "bsd43_unlink" }, /* 2010 */ + { 0, 0, printargs, "bsd43_exec" }, /* 2011 */ + { 0, 0, printargs, "bsd43_chdir" }, /* 2012 */ + { 0, 0, printargs, "bsd43_time" }, /* 2013 */ + { 0, 0, printargs, "bsd43_mknod" }, /* 2014 */ + { 0, 0, printargs, "bsd43_chmod" }, /* 2015 */ + { 0, 0, printargs, "bsd43_chown" }, /* 2016 */ + { 0, TM, printargs, "bsd43_sbreak" }, /* 2017 */ + { 0, 0, printargs, "bsd43_oldstat" }, /* 2018 */ + { 0, 0, printargs, "bsd43_lseek" }, /* 2019 */ + { 0, 0, printargs, "bsd43_getpid" }, /* 2020 */ + { 0, 0, printargs, "bsd43_oldmount" }, /* 2021 */ + { 0, 0, printargs, "bsd43_umount" }, /* 2022 */ + { 0, 0, printargs, "bsd43_setuid" }, /* 2023 */ + { 0, 0, printargs, "bsd43_getuid" }, /* 2024 */ + { 0, 0, printargs, "bsd43_stime" }, /* 2025 */ + { 0, 0, printargs, "bsd43_ptrace" }, /* 2026 */ + { 0, 0, printargs, "bsd43_alarm" }, /* 2027 */ + { 0, 0, printargs, "bsd43_oldfstat" }, /* 2028 */ + { 0, 0, printargs, "bsd43_pause" }, /* 2029 */ + { 0, 0, printargs, "bsd43_utime" }, /* 2030 */ + { 0, 0, printargs, "bsd43_stty" }, /* 2031 */ + { 0, 0, printargs, "bsd43_gtty" }, /* 2032 */ + { 0, 0, printargs, "bsd43_access" }, /* 2033 */ + { 0, 0, printargs, "bsd43_nice" }, /* 2034 */ + { 0, 0, printargs, "bsd43_ftime" }, /* 2035 */ + { 0, 0, printargs, "bsd43_sync" }, /* 2036 */ + { 0, 0, printargs, "bsd43_kill" }, /* 2037 */ + { 0, 0, printargs, "bsd43_stat" }, /* 2038 */ + { 0, 0, printargs, "bsd43_oldsetpgrp" }, /* 2039 */ + { 0, 0, printargs, "bsd43_lstat" }, /* 2040 */ + { 0, 0, printargs, "bsd43_dup" }, /* 2041 */ + { 0, 0, printargs, "bsd43_pipe" }, /* 2042 */ + { 0, 0, printargs, "bsd43_times" }, /* 2043 */ + { 0, 0, printargs, "bsd43_profil" }, /* 2044 */ + { 0, 0, printargs, "bsd43_msgsys" }, /* 2045 */ + { 0, 0, printargs, "bsd43_setgid" }, /* 2046 */ + { 0, 0, printargs, "bsd43_getgid" }, /* 2047 */ + { 0, 0, printargs, "bsd43_ssig" }, /* 2048 */ + { 0, 0, NULL, NULL }, /* 2049 */ + { 0, 0, NULL, NULL }, /* 2050 */ + { 0, 0, printargs, "bsd43_sysacct" }, /* 2051 */ + { 0, 0, printargs, "bsd43_phys" }, /* 2052 */ + { 0, 0, printargs, "bsd43_lock" }, /* 2053 */ + { 0, 0, printargs, "bsd43_ioctl" }, /* 2054 */ + { 0, 0, printargs, "bsd43_reboot" }, /* 2055 */ + { 0, 0, printargs, "bsd43_mpxchan" }, /* 2056 */ + { 0, 0, printargs, "bsd43_symlink" }, /* 2057 */ + { 0, 0, printargs, "bsd43_readlink" }, /* 2058 */ + { 0, 0, printargs, "bsd43_execve" }, /* 2059 */ + { 0, 0, printargs, "bsd43_umask" }, /* 2060 */ + { 0, 0, printargs, "bsd43_chroot" }, /* 2061 */ + { 0, 0, printargs, "bsd43_fstat" }, /* 2062 */ + { 0, 0, NULL, NULL }, /* 2063 */ + { 0, 0, printargs, "bsd43_getpagesize" }, /* 2064 */ + { 0, TM, printargs, "bsd43_mremap" }, /* 2065 */ + { 0, 0, printargs, "bsd43_vfork" }, /* 2066 */ + { 0, 0, printargs, "bsd43_vread" }, /* 2067 */ + { 0, 0, printargs, "bsd43_vwrite" }, /* 2068 */ + { 0, TM, printargs, "bsd43_sbrk" }, /* 2069 */ + { 0, 0, printargs, "bsd43_sstk" }, /* 2070 */ + { 0, TD|TM, printargs, "bsd43_mmap" }, /* 2071 */ + { 0, 0, printargs, "bsd43_vadvise" }, /* 2072 */ + { 0, TM, printargs, "bsd43_munmap" }, /* 2073 */ + { 0, TM, printargs, "bsd43_mprotect" }, /* 2074 */ + { 0, TM, printargs, "bsd43_madvise" }, /* 2075 */ + { 0, 0, printargs, "bsd43_vhangup" }, /* 2076 */ + { 0, 0, printargs, "bsd43_vlimit" }, /* 2077 */ + { 0, TM, printargs, "bsd43_mincore" }, /* 2078 */ + { 0, 0, printargs, "bsd43_getgroups" }, /* 2079 */ + { 0, 0, printargs, "bsd43_setgroups" }, /* 2080 */ + { 0, 0, printargs, "bsd43_getpgrp" }, /* 2081 */ + { 0, 0, printargs, "bsd43_setpgrp" }, /* 2082 */ + { 0, 0, printargs, "bsd43_setitimer" }, /* 2083 */ + { 0, 0, printargs, "bsd43_wait3" }, /* 2084 */ + { 0, 0, printargs, "bsd43_swapon" }, /* 2085 */ + { 0, 0, printargs, "bsd43_getitimer" }, /* 2086 */ + { 0, 0, printargs, "bsd43_gethostname" }, /* 2087 */ + { 0, 0, printargs, "bsd43_sethostname" }, /* 2088 */ + { 0, 0, printargs, "bsd43_getdtablesize" }, /* 2089 */ + { 0, 0, printargs, "bsd43_dup2" }, /* 2090 */ + { 0, 0, printargs, "bsd43_getdopt" }, /* 2091 */ + { 0, 0, printargs, "bsd43_fcntl" }, /* 2092 */ + { 0, 0, printargs, "bsd43_select" }, /* 2093 */ + { 0, 0, printargs, "bsd43_setdopt" }, /* 2094 */ + { 0, 0, printargs, "bsd43_fsync" }, /* 2095 */ + { 0, 0, printargs, "bsd43_setpriority" }, /* 2096 */ + { 0, 0, printargs, "bsd43_socket" }, /* 2097 */ + { 0, 0, printargs, "bsd43_connect" }, /* 2098 */ + { 0, 0, printargs, "bsd43_oldaccept" }, /* 2099 */ + { 0, 0, printargs, "bsd43_getpriority" }, /* 2100 */ + { 0, 0, printargs, "bsd43_send" }, /* 2101 */ + { 0, 0, printargs, "bsd43_recv" }, /* 2102 */ + { 0, 0, printargs, "bsd43_sigreturn" }, /* 2103 */ + { 0, 0, printargs, "bsd43_bind" }, /* 2104 */ + { 0, 0, printargs, "bsd43_setsockopt" }, /* 2105 */ + { 0, 0, printargs, "bsd43_listen" }, /* 2106 */ + { 0, 0, printargs, "bsd43_vtimes" }, /* 2107 */ + { 0, 0, printargs, "bsd43_sigvec" }, /* 2108 */ + { 0, 0, printargs, "bsd43_sigblock" }, /* 2109 */ + { 0, 0, printargs, "bsd43_sigsetmask" }, /* 2110 */ + { 0, 0, printargs, "bsd43_sigpause" }, /* 2111 */ + { 0, 0, printargs, "bsd43_sigstack" }, /* 2112 */ + { 0, 0, printargs, "bsd43_oldrecvmsg" }, /* 2113 */ + { 0, 0, printargs, "bsd43_oldsendmsg" }, /* 2114 */ + { 0, 0, printargs, "bsd43_vtrace" }, /* 2115 */ + { 0, 0, printargs, "bsd43_gettimeofday" }, /* 2116 */ + { 0, 0, printargs, "bsd43_getrusage" }, /* 2117 */ + { 0, 0, printargs, "bsd43_getsockopt" }, /* 2118 */ + { 0, 0, NULL, NULL }, /* 2119 */ + { 0, 0, printargs, "bsd43_readv" }, /* 2120 */ + { 0, 0, printargs, "bsd43_writev" }, /* 2121 */ + { 0, 0, printargs, "bsd43_settimeofday" }, /* 2122 */ + { 0, 0, printargs, "bsd43_fchown" }, /* 2123 */ + { 0, 0, printargs, "bsd43_fchmod" }, /* 2124 */ + { 0, 0, printargs, "bsd43_oldrecvfrom" }, /* 2125 */ + { 0, 0, printargs, "bsd43_setreuid" }, /* 2126 */ + { 0, 0, printargs, "bsd43_setregid" }, /* 2127 */ + { 0, 0, printargs, "bsd43_rename" }, /* 2128 */ + { 0, 0, printargs, "bsd43_truncate" }, /* 2129 */ + { 0, 0, printargs, "bsd43_ftruncate" }, /* 2130 */ + { 0, 0, printargs, "bsd43_flock" }, /* 2131 */ + { 0, 0, printargs, "bsd43_semsys" }, /* 2132 */ + { 0, 0, printargs, "bsd43_sendto" }, /* 2133 */ + { 0, 0, printargs, "bsd43_shutdown" }, /* 2134 */ + { 0, 0, printargs, "bsd43_socketpair" }, /* 2135 */ + { 0, 0, printargs, "bsd43_mkdir" }, /* 2136 */ + { 0, 0, printargs, "bsd43_rmdir" }, /* 2137 */ + { 0, 0, printargs, "bsd43_utimes" }, /* 2138 */ + { 0, 0, printargs, "bsd43_sigcleanup" }, /* 2139 */ + { 0, 0, printargs, "bsd43_adjtime" }, /* 2140 */ + { 0, 0, printargs, "bsd43_oldgetpeername" }, /* 2141 */ + { 0, 0, printargs, "bsd43_gethostid" }, /* 2142 */ + { 0, 0, printargs, "bsd43_sethostid" }, /* 2143 */ + { 0, 0, printargs, "bsd43_getrlimit" }, /* 2144 */ + { 0, 0, printargs, "bsd43_setrlimit" }, /* 2145 */ + { 0, 0, printargs, "bsd43_killpg" }, /* 2146 */ + { 0, 0, printargs, "bsd43_shmsys" }, /* 2147 */ + { 0, 0, printargs, "bsd43_quota" }, /* 2148 */ + { 0, 0, printargs, "bsd43_qquota" }, /* 2149 */ + { 0, 0, printargs, "bsd43_oldgetsockname" }, /* 2150 */ + { 0, 0, printargs, "bsd43_sysmips" }, /* 2151 */ + { 0, 0, printargs, "bsd43_cacheflush" }, /* 2152 */ + { 0, 0, printargs, "bsd43_cachectl" }, /* 2153 */ + { 0, 0, printargs, "bsd43_debug" }, /* 2154 */ + { 0, 0, NULL, NULL }, /* 2155 */ + { 0, 0, NULL, NULL }, /* 2156 */ + { 0, 0, printargs, "bsd43_nfs_mount" }, /* 2157 */ + { 0, 0, printargs, "bsd43_nfs_svc" }, /* 2158 */ + { 0, 0, printargs, "bsd43_getdirentries" }, /* 2159 */ + { 0, 0, printargs, "bsd43_statfs" }, /* 2160 */ + { 0, 0, printargs, "bsd43_fstatfs" }, /* 2161 */ + { 0, 0, printargs, "bsd43_unmount" }, /* 2162 */ + { 0, 0, printargs, "bsd43_async_daemon" }, /* 2163 */ + { 0, 0, printargs, "bsd43_nfs_getfh" }, /* 2164 */ + { 0, 0, printargs, "bsd43_getdomainname" }, /* 2165 */ + { 0, 0, printargs, "bsd43_setdomainname" }, /* 2166 */ + { 0, 0, printargs, "bsd43_pcfs_mount" }, /* 2167 */ + { 0, TF, printargs, "bsd43_quotactl" }, /* 2168 */ + { 0, 0, printargs, "bsd43_oldexportfs" }, /* 2169 */ + { 0, 0, printargs, "bsd43_smount" }, /* 2170 */ + { 0, 0, printargs, "bsd43_mipshwconf" }, /* 2171 */ + { 0, 0, printargs, "bsd43_exportfs" }, /* 2172 */ + { 0, 0, printargs, "bsd43_nfsfh_open" }, /* 2173 */ + { 0, 0, printargs, "bsd43_libattach" }, /* 2174 */ + { 0, 0, printargs, "bsd43_libdetach" }, /* 2175 */ + { 0, 0, printargs, "bsd43_accept" }, /* 2176 */ + { 0, 0, NULL, NULL }, /* 2177 */ + { 0, 0, NULL, NULL }, /* 2178 */ + { 0, 0, printargs, "bsd43_recvmsg" }, /* 2179 */ + { 0, 0, printargs, "bsd43_recvfrom" }, /* 2180 */ + { 0, 0, printargs, "bsd43_sendmsg" }, /* 2181 */ + { 0, 0, printargs, "bsd43_getpeername" }, /* 2182 */ + { 0, 0, printargs, "bsd43_getsockname" }, /* 2183 */ + { 0, 0, printargs, "bsd43_aread" }, /* 2184 */ + { 0, 0, printargs, "bsd43_awrite" }, /* 2185 */ + { 0, 0, printargs, "bsd43_listio" }, /* 2186 */ + { 0, 0, printargs, "bsd43_acancel" }, /* 2187 */ + { 0, 0, printargs, "bsd43_astatus" }, /* 2188 */ + { 0, 0, printargs, "bsd43_await" }, /* 2189 */ + { 0, 0, printargs, "bsd43_areadv" }, /* 2190 */ + { 0, 0, printargs, "bsd43_awritev" }, /* 2191 */ + + [2192 ... 2999] = { }, /* 2999 */ /* end of BSD 4.3 */ + + { 0, 0, printargs, "posix_syscall" }, /* 3000 */ /* start of POSIX */ + { 0, 0, printargs, "posix_exit" }, /* 3001 */ + { 0, 0, printargs, "posix_fork" }, /* 3002 */ + { 0, 0, printargs, "posix_read" }, /* 3003 */ + { 0, 0, printargs, "posix_write" }, /* 3004 */ + { 0, 0, printargs, "posix_open" }, /* 3005 */ + { 0, 0, printargs, "posix_close" }, /* 3006 */ + { 0, 0, printargs, "posix_wait" }, /* 3007 */ + { 0, 0, printargs, "posix_creat" }, /* 3008 */ + { 0, 0, printargs, "posix_link" }, /* 3009 */ + { 0, 0, printargs, "posix_unlink" }, /* 3010 */ + { 0, 0, printargs, "posix_exec" }, /* 3011 */ + { 0, 0, printargs, "posix_chdir" }, /* 3012 */ + { 0, 0, printargs, "posix_gtime" }, /* 3013 */ + { 0, 0, printargs, "posix_mknod" }, /* 3014 */ + { 0, 0, printargs, "posix_chmod" }, /* 3015 */ + { 0, 0, printargs, "posix_chown" }, /* 3016 */ + { 0, TM, printargs, "posix_sbreak" }, /* 3017 */ + { 0, 0, printargs, "posix_stat" }, /* 3018 */ + { 0, 0, printargs, "posix_lseek" }, /* 3019 */ + { 0, 0, printargs, "posix_getpid" }, /* 3020 */ + { 0, 0, printargs, "posix_mount" }, /* 3021 */ + { 0, 0, printargs, "posix_umount" }, /* 3022 */ + { 0, 0, printargs, "posix_setuid" }, /* 3023 */ + { 0, 0, printargs, "posix_getuid" }, /* 3024 */ + { 0, 0, printargs, "posix_stime" }, /* 3025 */ + { 0, 0, printargs, "posix_ptrace" }, /* 3026 */ + { 0, 0, printargs, "posix_alarm" }, /* 3027 */ + { 0, 0, printargs, "posix_fstat" }, /* 3028 */ + { 0, 0, printargs, "posix_pause" }, /* 3029 */ + { 0, 0, printargs, "posix_utime" }, /* 3030 */ + { 0, 0, printargs, "posix_stty" }, /* 3031 */ + { 0, 0, printargs, "posix_gtty" }, /* 3032 */ + { 0, 0, printargs, "posix_access" }, /* 3033 */ + { 0, 0, printargs, "posix_nice" }, /* 3034 */ + { 0, 0, printargs, "posix_statfs" }, /* 3035 */ + { 0, 0, printargs, "posix_sync" }, /* 3036 */ + { 0, 0, printargs, "posix_kill" }, /* 3037 */ + { 0, 0, printargs, "posix_fstatfs" }, /* 3038 */ + { 0, 0, printargs, "posix_getpgrp" }, /* 3039 */ + { 0, 0, printargs, "posix_syssgi" }, /* 3040 */ + { 0, 0, printargs, "posix_dup" }, /* 3041 */ + { 0, 0, printargs, "posix_pipe" }, /* 3042 */ + { 0, 0, printargs, "posix_times" }, /* 3043 */ + { 0, 0, printargs, "posix_profil" }, /* 3044 */ + { 0, 0, printargs, "posix_lock" }, /* 3045 */ + { 0, 0, printargs, "posix_setgid" }, /* 3046 */ + { 0, 0, printargs, "posix_getgid" }, /* 3047 */ + { 0, 0, printargs, "posix_sig" }, /* 3048 */ + { 0, 0, printargs, "posix_msgsys" }, /* 3049 */ + { 0, 0, printargs, "posix_sysmips" }, /* 3050 */ + { 0, 0, printargs, "posix_sysacct" }, /* 3051 */ + { 0, 0, printargs, "posix_shmsys" }, /* 3052 */ + { 0, 0, printargs, "posix_semsys" }, /* 3053 */ + { 0, 0, printargs, "posix_ioctl" }, /* 3054 */ + { 0, 0, printargs, "posix_uadmin" }, /* 3055 */ + { 0, 0, printargs, "posix_exch" }, /* 3056 */ + { 0, 0, printargs, "posix_utssys" }, /* 3057 */ + { 0, 0, NULL, NULL }, /* 3058 */ + { 0, 0, printargs, "posix_exece" }, /* 3059 */ + { 0, 0, printargs, "posix_umask" }, /* 3060 */ + { 0, 0, printargs, "posix_chroot" }, /* 3061 */ + { 0, 0, printargs, "posix_fcntl" }, /* 3062 */ + { 0, 0, printargs, "posix_ulimit" }, /* 3063 */ + { 0, 0, NULL, NULL }, /* 3064 */ + { 0, 0, NULL, NULL }, /* 3065 */ + { 0, 0, NULL, NULL }, /* 3066 */ + { 0, 0, NULL, NULL }, /* 3067 */ + { 0, 0, NULL, NULL }, /* 3068 */ + { 0, 0, NULL, NULL }, /* 3069 */ + { 0, 0, printargs, "posix_advfs" }, /* 3070 */ + { 0, 0, printargs, "posix_unadvfs" }, /* 3071 */ + { 0, 0, printargs, "posix_rmount" }, /* 3072 */ + { 0, 0, printargs, "posix_rumount" }, /* 3073 */ + { 0, 0, printargs, "posix_rfstart" }, /* 3074 */ + { 0, 0, NULL, NULL }, /* 3075 */ + { 0, 0, printargs, "posix_rdebug" }, /* 3076 */ + { 0, 0, printargs, "posix_rfstop" }, /* 3077 */ + { 0, 0, printargs, "posix_rfsys" }, /* 3078 */ + { 0, 0, printargs, "posix_rmdir" }, /* 3079 */ + { 0, 0, printargs, "posix_mkdir" }, /* 3080 */ + { 0, 0, printargs, "posix_getdents" }, /* 3081 */ + { 0, 0, printargs, "posix_sginap" }, /* 3082 */ + { 0, 0, printargs, "posix_sgikopt" }, /* 3083 */ + { 0, 0, printargs, "posix_sysfs" }, /* 3084 */ + { 0, 0, printargs, "posix_getmsg" }, /* 3085 */ + { 0, 0, printargs, "posix_putmsg" }, /* 3086 */ + { 0, 0, printargs, "posix_poll" }, /* 3087 */ + { 0, 0, printargs, "posix_sigreturn" }, /* 3088 */ + { 0, 0, printargs, "posix_accept" }, /* 3089 */ + { 0, 0, printargs, "posix_bind" }, /* 3090 */ + { 0, 0, printargs, "posix_connect" }, /* 3091 */ + { 0, 0, printargs, "posix_gethostid" }, /* 3092 */ + { 0, 0, printargs, "posix_getpeername" }, /* 3093 */ + { 0, 0, printargs, "posix_getsockname" }, /* 3094 */ + { 0, 0, printargs, "posix_getsockopt" }, /* 3095 */ + { 0, 0, printargs, "posix_listen" }, /* 3096 */ + { 0, 0, printargs, "posix_recv" }, /* 3097 */ + { 0, 0, printargs, "posix_recvfrom" }, /* 3098 */ + { 0, 0, printargs, "posix_recvmsg" }, /* 3099 */ + { 0, 0, printargs, "posix_select" }, /* 3100 */ + { 0, 0, printargs, "posix_send" }, /* 3101 */ + { 0, 0, printargs, "posix_sendmsg" }, /* 3102 */ + { 0, 0, printargs, "posix_sendto" }, /* 3103 */ + { 0, 0, printargs, "posix_sethostid" }, /* 3104 */ + { 0, 0, printargs, "posix_setsockopt" }, /* 3105 */ + { 0, 0, printargs, "posix_shutdown" }, /* 3106 */ + { 0, 0, printargs, "posix_socket" }, /* 3107 */ + { 0, 0, printargs, "posix_gethostname" }, /* 3108 */ + { 0, 0, printargs, "posix_sethostname" }, /* 3109 */ + { 0, 0, printargs, "posix_getdomainname" }, /* 3110 */ + { 0, 0, printargs, "posix_setdomainname" }, /* 3111 */ + { 0, 0, printargs, "posix_truncate" }, /* 3112 */ + { 0, 0, printargs, "posix_ftruncate" }, /* 3113 */ + { 0, 0, printargs, "posix_rename" }, /* 3114 */ + { 0, 0, printargs, "posix_symlink" }, /* 3115 */ + { 0, 0, printargs, "posix_readlink" }, /* 3116 */ + { 0, 0, printargs, "posix_lstat" }, /* 3117 */ + { 0, 0, printargs, "posix_nfs_mount" }, /* 3118 */ + { 0, 0, printargs, "posix_nfs_svc" }, /* 3119 */ + { 0, 0, printargs, "posix_nfs_getfh" }, /* 3120 */ + { 0, 0, printargs, "posix_async_daemon" }, /* 3121 */ + { 0, 0, printargs, "posix_exportfs" }, /* 3122 */ + { 0, 0, printargs, "posix_SGI_setregid" }, /* 3123 */ + { 0, 0, printargs, "posix_SGI_setreuid" }, /* 3124 */ + { 0, 0, printargs, "posix_getitimer" }, /* 3125 */ + { 0, 0, printargs, "posix_setitimer" }, /* 3126 */ + { 0, 0, printargs, "posix_adjtime" }, /* 3127 */ + { 0, 0, printargs, "posix_SGI_bsdgettime" }, /* 3128 */ + { 0, 0, printargs, "posix_SGI_sproc" }, /* 3129 */ + { 0, 0, printargs, "posix_SGI_prctl" }, /* 3130 */ + { 0, 0, printargs, "posix_SGI_blkproc" }, /* 3131 */ + { 0, 0, NULL, NULL }, /* 3132 */ + { 0, 0, printargs, "posix_SGI_sgigsc" }, /* 3133 */ + { 0, TD|TM, printargs, "posix_SGI_mmap" }, /* 3134 */ + { 0, TM, printargs, "posix_SGI_munmap" }, /* 3135 */ + { 0, TM, printargs, "posix_SGI_mprotect" }, /* 3136 */ + { 0, TM, printargs, "posix_SGI_msync" }, /* 3137 */ + { 0, TM, printargs, "posix_SGI_madvise" }, /* 3138 */ + { 0, 0, printargs, "posix_SGI_mpin" }, /* 3139 */ + { 0, 0, printargs, "posix_SGI_getpagesize" }, /* 3140 */ + { 0, 0, printargs, "posix_SGI_libattach" }, /* 3141 */ + { 0, 0, printargs, "posix_SGI_libdetach" }, /* 3142 */ + { 0, 0, printargs, "posix_SGI_getpgrp" }, /* 3143 */ + { 0, 0, printargs, "posix_SGI_setpgrp" }, /* 3144 */ + { 0, 0, NULL, NULL }, /* 3145 */ + { 0, 0, NULL, NULL }, /* 3146 */ + { 0, 0, NULL, NULL }, /* 3147 */ + { 0, 0, NULL, NULL }, /* 3148 */ + { 0, 0, NULL, NULL }, /* 3149 */ + { 0, 0, printargs, "posix_cacheflush" }, /* 3150 */ + { 0, 0, printargs, "posix_cachectl" }, /* 3151 */ + { 0, 0, printargs, "posix_fchown" }, /* 3152 */ + { 0, 0, printargs, "posix_fchmod" }, /* 3153 */ + { 0, 0, printargs, "posix_wait3" }, /* 3154 */ + { 0, TD|TM, printargs, "posix_mmap" }, /* 3155 */ + { 0, TM, printargs, "posix_munmap" }, /* 3156 */ + { 0, TM, printargs, "posix_madvise" }, /* 3157 */ + { 0, 0, printargs, "posix_BSD_getpagesize" }, /* 3158 */ + { 0, 0, printargs, "posix_setreuid" }, /* 3159 */ + { 0, 0, printargs, "posix_setregid" }, /* 3160 */ + { 0, 0, printargs, "posix_setpgid" }, /* 3161 */ + { 0, 0, printargs, "posix_getgroups" }, /* 3162 */ + { 0, 0, printargs, "posix_setgroups" }, /* 3163 */ + { 0, 0, printargs, "posix_gettimeofday" }, /* 3164 */ + { 0, 0, printargs, "posix_getrusage" }, /* 3165 */ + { 0, 0, printargs, "posix_getrlimit" }, /* 3166 */ + { 0, 0, printargs, "posix_setrlimit" }, /* 3167 */ + { 0, 0, printargs, "posix_waitpid" }, /* 3168 */ + { 0, 0, printargs, "posix_dup2" }, /* 3169 */ + { 0, 0, NULL, NULL }, /* 3170 */ + { 0, 0, NULL, NULL }, /* 3171 */ + { 0, 0, NULL, NULL }, /* 3172 */ + { 0, 0, NULL, NULL }, /* 3173 */ + { 0, 0, NULL, NULL }, /* 3174 */ + { 0, 0, NULL, NULL }, /* 3175 */ + { 0, 0, NULL, NULL }, /* 3176 */ + { 0, 0, NULL, NULL }, /* 3177 */ + { 0, 0, NULL, NULL }, /* 3178 */ + { 0, 0, NULL, NULL }, /* 3179 */ + { 0, 0, NULL, NULL }, /* 3180 */ + { 0, 0, NULL, NULL }, /* 3181 */ + { 0, 0, NULL, NULL }, /* 3182 */ + { 0, 0, NULL, NULL }, /* 3183 */ + { 0, 0, NULL, NULL }, /* 3184 */ + { 0, 0, NULL, NULL }, /* 3185 */ + { 0, 0, NULL, NULL }, /* 3186 */ + { 0, 0, NULL, NULL }, /* 3187 */ + { 0, 0, NULL, NULL }, /* 3188 */ + { 0, 0, NULL, NULL }, /* 3189 */ + { 0, 0, NULL, NULL }, /* 3190 */ + { 0, 0, NULL, NULL }, /* 3191 */ + { 0, 0, NULL, NULL }, /* 3192 */ + { 0, 0, NULL, NULL }, /* 3193 */ + { 0, 0, NULL, NULL }, /* 3194 */ + { 0, 0, NULL, NULL }, /* 3195 */ + { 0, 0, NULL, NULL }, /* 3196 */ + { 0, 0, NULL, NULL }, /* 3197 */ + { 0, 0, NULL, NULL }, /* 3198 */ + { 0, 0, NULL, NULL }, /* 3199 */ + { 0, 0, NULL, NULL }, /* 3200 */ + { 0, 0, NULL, NULL }, /* 3201 */ + { 0, 0, NULL, NULL }, /* 3202 */ + { 0, 0, NULL, NULL }, /* 3203 */ + { 0, 0, NULL, NULL }, /* 3204 */ + { 0, 0, NULL, NULL }, /* 3205 */ + { 0, 0, NULL, NULL }, /* 3206 */ + { 0, 0, NULL, NULL }, /* 3207 */ + { 0, 0, NULL, NULL }, /* 3208 */ + { 0, 0, NULL, NULL }, /* 3209 */ + { 0, 0, NULL, NULL }, /* 3210 */ + { 0, 0, NULL, NULL }, /* 3211 */ + { 0, 0, NULL, NULL }, /* 3212 */ + { 0, 0, NULL, NULL }, /* 3213 */ + { 0, 0, NULL, NULL }, /* 3214 */ + { 0, 0, NULL, NULL }, /* 3215 */ + { 0, 0, NULL, NULL }, /* 3216 */ + { 0, 0, NULL, NULL }, /* 3217 */ + { 0, 0, NULL, NULL }, /* 3218 */ + { 0, 0, NULL, NULL }, /* 3219 */ + { 0, 0, NULL, NULL }, /* 3220 */ + { 0, 0, NULL, NULL }, /* 3221 */ + { 0, 0, NULL, NULL }, /* 3222 */ + { 0, 0, NULL, NULL }, /* 3223 */ + { 0, 0, NULL, NULL }, /* 3224 */ + { 0, 0, NULL, NULL }, /* 3225 */ + { 0, 0, NULL, NULL }, /* 3226 */ + { 0, 0, NULL, NULL }, /* 3227 */ + { 0, 0, NULL, NULL }, /* 3228 */ + { 0, 0, NULL, NULL }, /* 3229 */ + { 0, 0, NULL, NULL }, /* 3230 */ + { 0, 0, NULL, NULL }, /* 3231 */ + { 0, 0, NULL, NULL }, /* 3232 */ + { 0, 0, NULL, NULL }, /* 3233 */ + { 0, 0, NULL, NULL }, /* 3234 */ + { 0, 0, NULL, NULL }, /* 3235 */ + { 0, 0, NULL, NULL }, /* 3236 */ + { 0, 0, NULL, NULL }, /* 3237 */ + { 0, 0, NULL, NULL }, /* 3238 */ + { 0, 0, NULL, NULL }, /* 3239 */ + { 0, 0, NULL, NULL }, /* 3240 */ + { 0, 0, NULL, NULL }, /* 3241 */ + { 0, 0, NULL, NULL }, /* 3242 */ + { 0, 0, NULL, NULL }, /* 3243 */ + { 0, 0, NULL, NULL }, /* 3244 */ + { 0, 0, NULL, NULL }, /* 3245 */ + { 0, 0, NULL, NULL }, /* 3246 */ + { 0, 0, NULL, NULL }, /* 3247 */ + { 0, 0, NULL, NULL }, /* 3248 */ + { 0, 0, NULL, NULL }, /* 3249 */ + { 0, 0, NULL, NULL }, /* 3250 */ + { 0, 0, NULL, NULL }, /* 3251 */ + { 0, 0, NULL, NULL }, /* 3252 */ + { 0, 0, NULL, NULL }, /* 3253 */ + { 0, 0, NULL, NULL }, /* 3254 */ + { 0, 0, NULL, NULL }, /* 3255 */ + { 0, 0, NULL, NULL }, /* 3256 */ + { 0, 0, NULL, NULL }, /* 3257 */ + { 0, 0, NULL, NULL }, /* 3258 */ + { 0, 0, NULL, NULL }, /* 3259 */ + { 0, 0, printargs, "posix_netboot" }, /* 3260 */ + { 0, 0, printargs, "posix_netunboot" }, /* 3261 */ + { 0, 0, printargs, "posix_rdump" }, /* 3262 */ + { 0, 0, printargs, "posix_setsid" }, /* 3263 */ + { 0, 0, printargs, "posix_getmaxsig" }, /* 3264 */ + { 0, 0, printargs, "posix_sigpending" }, /* 3265 */ + { 0, 0, printargs, "posix_sigprocmask" }, /* 3266 */ + { 0, 0, printargs, "posix_sigsuspend" }, /* 3267 */ + { 0, 0, printargs, "posix_sigaction" }, /* 3268 */ + + [3269 ... 3999] = { }, /* 3999 */ /* end of POSIX */ diff --git a/alice-strace/linux/mips/syscallent-n32.h b/alice-strace/linux/mips/syscallent-n32.h new file mode 100644 index 0000000..69453b1 --- /dev/null +++ b/alice-strace/linux/mips/syscallent-n32.h @@ -0,0 +1,630 @@ +#if defined LINUX_MIPSN32 + /* For an N32 strace decode the N32 64-bit syscalls. */ + { 3, TD, sys_read, "read" }, /* 6000 */ /* start of Linux N32 */ + { 3, TD, sys_write, "write" }, /* 6001 */ + { 3, TD|TF, sys_open, "open" }, /* 6002 */ + { 1, TD, sys_close, "close" }, /* 6003 */ + { 2, TF, sys_stat64, "stat" }, /* 6004 */ + { 2, TD, sys_fstat64, "fstat" }, /* 6005 */ + { 2, TF, sys_lstat64, "lstat" }, /* 6006 */ + { 3, TD, sys_poll, "poll" }, /* 6007 */ + { 3, TD, sys_lseek, "lseek" }, /* 6008 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 6009 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 6010 */ + { 2, TM, sys_munmap, "munmap" }, /* 6011 */ + { 1, TM, sys_brk, "brk" }, /* 6012 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 6013 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 6014 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 6015 */ + { 4, TD, sys_pread, "pread64" }, /* 6016 */ + { 4, TD, sys_pwrite, "pwrite64" }, /* 6017 */ + { 3, TD, sys_readv, "readv" }, /* 6018 */ + { 3, TD, sys_writev, "writev" }, /* 6019 */ + { 2, TF, sys_access, "access" }, /* 6020 */ + { 1, TD, sys_pipe, "pipe" }, /* 6021 */ + { 5, TD, sys_select, "_newselect" }, /* 6022 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 6023 */ + { 5, TM, sys_mremap, "mremap" }, /* 6024 */ + { 3, TM, sys_msync, "msync" }, /* 6025 */ + { 3, TM, sys_mincore, "mincore" }, /* 6026 */ + { 3, TM, sys_madvise, "madvise" }, /* 6027 */ + { 3, TI, sys_shmget, "shmget" }, /* 6028 */ + { 3, TI, sys_shmat, "shmat" }, /* 6029 */ + { 3, TI, sys_shmctl, "shmctl" }, /* 6030 */ + { 1, TD, sys_dup, "dup" }, /* 6031 */ + { 2, TD, sys_dup2, "dup2" }, /* 6032 */ + { 0, TS, sys_pause, "pause" }, /* 6033 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 6034 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 6035 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 6036 */ + { 1, 0, sys_alarm, "alarm" }, /* 6037 */ + { 0, 0, sys_getpid, "getpid" }, /* 6038 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 6039 */ + { 3, TN, sys_socket, "socket" }, /* 6040 */ + { 3, TN, sys_connect, "connect" }, /* 6041 */ + { 3, TN, sys_accept, "accept" }, /* 6042 */ + { 6, TN, sys_sendto, "sendto" }, /* 6043 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 6044 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 6045 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 6046 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 6047 */ + { 3, TN, sys_bind, "bind" }, /* 6048 */ + { 2, TN, sys_listen, "listen" }, /* 6049 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 6050 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 6051 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 6052 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 6053 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 6054 */ + { 2, TP, sys_clone, "clone" }, /* 6055 */ + { 0, TP, sys_fork, "fork" }, /* 6056 */ + { 3, TF|TP, sys_execve, "execve" }, /* 6057 */ + { 1, TP, sys_exit, "exit" }, /* 6058 */ + { 4, TP, sys_wait4, "wait4" }, /* 6059 */ + { 2, TS, sys_kill, "kill" }, /* 6060 */ + { 1, 0, sys_uname, "uname" }, /* 6061 */ + { 3, TI, sys_semget, "semget" }, /* 6062 */ + { 3, TI, printargs, "semop" }, /* 6063 */ + { 4, TI, sys_semctl, "semctl" }, /* 6064 */ + { 1, TI, sys_shmdt, "shmdt" }, /* 6065 */ + { 2, TI, sys_msgget, "msgget" }, /* 6066 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 6067 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 6068 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 6069 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 6070 */ + { 2, TD, sys_flock, "flock" }, /* 6071 */ + { 1, TD, sys_fsync, "fsync" }, /* 6072 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 6073 */ + { 2, TF, sys_truncate64, "truncate" }, /* 6074 */ + { 2, TD, sys_ftruncate64, "ftruncate" }, /* 6075 */ + { 3, TD, sys_getdents, "getdents" }, /* 6076 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 6077 */ + { 1, TF, sys_chdir, "chdir" }, /* 6078 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 6079 */ + { 2, TF, sys_rename, "rename" }, /* 6080 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 6081 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 6082 */ + { 2, TD|TF, sys_creat, "creat" }, /* 6083 */ + { 2, TF, sys_link, "link" }, /* 6084 */ + { 1, TF, sys_unlink, "unlink" }, /* 6085 */ + { 2, TF, sys_symlink, "symlink" }, /* 6086 */ + { 3, TF, sys_readlink, "readlink" }, /* 6087 */ + { 2, TF, sys_chmod, "chmod" }, /* 6088 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 6089 */ + { 3, TF, sys_chown, "chown" }, /* 6090 */ + { 3, TD, sys_fchown, "fchown" }, /* 6091 */ + { 3, TF, sys_chown, "lchown" }, /* 6092 */ + { 1, 0, sys_umask, "umask" }, /* 6093 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 6094 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 6095 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 6096 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 6097 */ + { 1, 0, sys_times, "times" }, /* 6098 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 6099 */ + { 0, NF, sys_getuid, "getuid" }, /* 6100 */ + { 3, 0, sys_syslog, "syslog" }, /* 6101 */ + { 0, NF, sys_getgid, "getgid" }, /* 6102 */ + { 1, 0, sys_setuid, "setuid" }, /* 6103 */ + { 1, 0, sys_setgid, "setgid" }, /* 6104 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 6105 */ + { 0, NF, sys_getegid, "getegid" }, /* 6106 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 6107 */ + { 0, 0, sys_getppid, "getppid" }, /* 6108 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 6109 */ + { 0, 0, sys_setsid, "setsid" }, /* 6110 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 6111 */ + { 2, 0, sys_setregid, "setregid" }, /* 6112 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 6113 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 6114 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 6115 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 6116 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 6117 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 6118 */ + { 0, 0, sys_getpgid, "getpgid" }, /* 6119 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 6120 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 6121 */ + { 1, 0, sys_getsid, "getsid" }, /* 6122 */ + { 2, 0, sys_capget, "capget" }, /* 6123 */ + { 2, 0, sys_capset, "capset" }, /* 6124 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 6125 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 6126 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 6127 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 6128 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 6129 */ + { 2, TF, sys_utime, "utime" }, /* 6130 */ + { 3, TF, sys_mknod, "mknod" }, /* 6131 */ + { 1, 0, sys_personality, "personality" }, /* 6132 */ + { 2, 0, sys_ustat, "ustat" }, /* 6133 */ + { 3, TF, sys_statfs, "statfs" }, /* 6134 */ + { 3, TD, sys_fstatfs, "fstatfs" }, /* 6135 */ + { 5, 0, sys_sysfs, "sysfs" }, /* 6136 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 6137 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 6138 */ + { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 6139 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 6140 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 6141 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 6142 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 6143 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 6144 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 6145 */ + { 2, TM, sys_mlock, "mlock" }, /* 6146 */ + { 2, TM, sys_munlock, "munlock" }, /* 6147 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 6148 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 6149 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 6150 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 6151 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 6152 */ + { 5, 0, sys_prctl, "prctl" }, /* 6153 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 6154 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 6155 */ + { 1, TF, sys_chroot, "chroot" }, /* 6156 */ + { 0, 0, sys_sync, "sync" }, /* 6157 */ + { 1, TF, sys_acct, "acct" }, /* 6158 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 6159 */ + { 5, TF, sys_mount, "mount" }, /* 6160 */ + { 2, TF, sys_umount2, "umount2" }, /* 6161 */ + { 2, TF, sys_swapon, "swapon" }, /* 6162 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 6163 */ + { 4, 0, sys_reboot, "reboot" }, /* 6164 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 6165 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 6166 */ + { 2, 0, sys_create_module, "create_module" }, /* 6167 */ + { 4, 0, sys_init_module, "init_module" }, /* 6168 */ + { 1, 0, sys_delete_module, "delete_module" }, /* 6169 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 6170 */ + { 5, 0, sys_query_module, "query_module" }, /* 6171 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 6172 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 6173 */ + { 5, TN, printargs, "getpmsg" }, /* 6174 */ + { 5, TN, printargs, "putpmsg" }, /* 6175 */ + { 0, 0, sys_afs_syscall, "afs_syscall" }, /* 6176 */ + { 0, 0, printargs, "reserved177" }, /* 6177 */ + { 0, 0, sys_gettid, "gettid" }, /* 6178 */ + { 3, TD, sys_readahead, "readahead" }, /* 6179 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 6180 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6181 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 6182 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 6183 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 6184 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 6185 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 6186 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 6187 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 6188 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 6189 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 6190 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 6191 */ + { 2, TS, sys_kill, "tkill" }, /* 6192 */ + { 1, 0, sys_time, "time" }, /* 6193 */ + { 6, 0, sys_futex, "futex" }, /* 6194 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 6195 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 6196 */ + { 3, 0, printargs, "cacheflush" }, /* 6197 */ + { 3, 0, printargs, "cachectl" }, /* 6198 */ + { 4, 0, sys_sysmips, "sysmips" }, /* 6199 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 6200 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 6201 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 6202 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 6203 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 6204 */ + { 1, TP, sys_exit, "exit_group" }, /* 6205 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 6206 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 6207 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 6208 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 6209 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 6210 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 6211 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 6212 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 6213 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 6214 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 6215 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 6216 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 6217 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 6218 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 6219 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 6220 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 6221 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 6222 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 6223 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 6224 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 6225 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 6226 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 6227 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 6228 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 6229 */ + { 2, TF, sys_utimes, "utimes" }, /* 6230 */ + { 6, TM, sys_mbind, "mbind" }, /* 6231 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 6232 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 6233 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 6234 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 6235 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 6236 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 6237 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 6238 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 6239 */ + { 5, 0, sys_vserver, "vserver" }, /* 6240 */ + { 5, TP, sys_waitid, "waitid" }, /* 6241 */ + [6242] = { }, + { 5, 0, sys_add_key, "add_key" }, /* 6243 */ + { 4, 0, sys_request_key, "request_key" }, /* 6244 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 6245 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 6246 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 6247 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 6248 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 6249 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 6250 */ + { 4, TD|TF, sys_openat, "openat" }, /* 6251 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 6252 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 6253 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 6254 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 6255 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 6256 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 6257 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 6258 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 6259 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 6260 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 6261 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 6262 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 6263 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 6264 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 6265 */ + { 1, TP, sys_unshare, "unshare" }, /* 6266 */ + { 6, TD, sys_splice, "splice" }, /* 6267 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 6268 */ + { 4, TD, sys_tee, "tee" }, /* 6269 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 6270 */ + { 6, TM, printargs, "move_pages" }, /* 6271 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 6272 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 6273 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 6274 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 6275 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 6276 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 6277 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 6278 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 6279 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 6280 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 6281 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 6282 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 6283 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 6284 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 6285 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 6286 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 6287 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 6288 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 6289 */ + { 3, TD, sys_dup3, "dup3" }, /* 6290 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 6291 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 6292 */ + { 4, TD, sys_preadv, "preadv" }, /* 6293 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 6294 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 6295 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 6296 */ + { 4, TN, sys_accept4, "accept4" }, /* 6297 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 6298 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 6299 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 6300 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 6301 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 6302 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 6303 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 6304 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 6305 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 6306 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 6307 */ + { 2, TD, sys_setns, "setns" }, /* 6308 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 6309 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 6310 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 6311 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 6312 */ +#else + { 0, 0, printargs, "n32_read" }, /* 6000 */ + { 0, 0, printargs, "n32_write" }, /* 6001 */ + { 0, 0, printargs, "n32_open" }, /* 6002 */ + { 0, 0, printargs, "n32_close" }, /* 6003 */ + { 0, 0, printargs, "n32_stat" }, /* 6004 */ + { 0, 0, printargs, "n32_fstat" }, /* 6005 */ + { 0, 0, printargs, "n32_lstat" }, /* 6006 */ + { 0, 0, printargs, "n32_poll" }, /* 6007 */ + { 0, 0, printargs, "n32_lseek" }, /* 6008 */ + { 0, TD|TM, printargs, "n32_mmap" }, /* 6009 */ + { 0, TM, printargs, "n32_mprotect" }, /* 6010 */ + { 0, TM, printargs, "n32_munmap" }, /* 6011 */ + { 0, TM, printargs, "n32_brk" }, /* 6012 */ + { 0, 0, printargs, "n32_rt_sigaction" }, /* 6013 */ + { 0, 0, printargs, "n32_rt_sigprocmask" }, /* 6014 */ + { 0, 0, printargs, "n32_ioctl" }, /* 6015 */ + { 0, 0, printargs, "n32_pread64" }, /* 6016 */ + { 0, 0, printargs, "n32_pwrite64" }, /* 6017 */ + { 0, 0, printargs, "n32_readv" }, /* 6018 */ + { 0, 0, printargs, "n32_writev" }, /* 6019 */ + { 0, 0, printargs, "n32_access" }, /* 6020 */ + { 0, 0, printargs, "n32_pipe" }, /* 6021 */ + { 0, 0, printargs, "n32__newselect" }, /* 6022 */ + { 0, 0, printargs, "n32_sched_yield" }, /* 6023 */ + { 0, TM, printargs, "n32_mremap" }, /* 6024 */ + { 0, TM, printargs, "n32_msync" }, /* 6025 */ + { 0, TM, printargs, "n32_mincore" }, /* 6026 */ + { 0, TM, printargs, "n32_madvise" }, /* 6027 */ + { 0, 0, printargs, "n32_shmget" }, /* 6028 */ + { 0, 0, printargs, "n32_shmat" }, /* 6029 */ + { 0, 0, printargs, "n32_shmctl" }, /* 6030 */ + { 0, 0, printargs, "n32_dup" }, /* 6031 */ + { 0, 0, printargs, "n32_dup2" }, /* 6032 */ + { 0, 0, printargs, "n32_pause" }, /* 6033 */ + { 0, 0, printargs, "n32_nanosleep" }, /* 6034 */ + { 0, 0, printargs, "n32_getitimer" }, /* 6035 */ + { 0, 0, printargs, "n32_setitimer" }, /* 6036 */ + { 0, 0, printargs, "n32_alarm" }, /* 6037 */ + { 0, 0, printargs, "n32_getpid" }, /* 6038 */ + { 0, 0, printargs, "n32_sendfile" }, /* 6039 */ + { 0, 0, printargs, "n32_socket" }, /* 6040 */ + { 0, 0, printargs, "n32_connect" }, /* 6041 */ + { 0, 0, printargs, "n32_accept" }, /* 6042 */ + { 0, 0, printargs, "n32_sendto" }, /* 6043 */ + { 0, 0, printargs, "n32_recvfrom" }, /* 6044 */ + { 0, 0, printargs, "n32_sendmsg" }, /* 6045 */ + { 0, 0, printargs, "n32_recvmsg" }, /* 6046 */ + { 0, 0, printargs, "n32_shutdown" }, /* 6047 */ + { 0, 0, printargs, "n32_bind" }, /* 6048 */ + { 0, 0, printargs, "n32_listen" }, /* 6049 */ + { 0, 0, printargs, "n32_getsockname" }, /* 6050 */ + { 0, 0, printargs, "n32_getpeername" }, /* 6051 */ + { 0, 0, printargs, "n32_socketpair" }, /* 6052 */ + { 0, 0, printargs, "n32_setsockopt" }, /* 6053 */ + { 0, 0, printargs, "n32_getsockopt" }, /* 6054 */ + { 0, 0, printargs, "n32_clone" }, /* 6055 */ + { 0, 0, printargs, "n32_fork" }, /* 6056 */ + { 0, 0, printargs, "n32_execve" }, /* 6057 */ + { 0, 0, printargs, "n32_exit" }, /* 6058 */ + { 0, 0, printargs, "n32_wait4" }, /* 6059 */ + { 0, 0, printargs, "n32_kill" }, /* 6060 */ + { 0, 0, printargs, "n32_uname" }, /* 6061 */ + { 0, 0, printargs, "n32_semget" }, /* 6062 */ + { 0, 0, printargs, "n32_semop" }, /* 6063 */ + { 0, 0, printargs, "n32_semctl" }, /* 6064 */ + { 0, 0, printargs, "n32_shmdt" }, /* 6065 */ + { 0, 0, printargs, "n32_msgget" }, /* 6066 */ + { 0, 0, printargs, "n32_msgsnd" }, /* 6067 */ + { 0, 0, printargs, "n32_msgrcv" }, /* 6068 */ + { 0, 0, printargs, "n32_msgctl" }, /* 6069 */ + { 0, 0, printargs, "n32_fcntl" }, /* 6070 */ + { 0, 0, printargs, "n32_flock" }, /* 6071 */ + { 0, 0, printargs, "n32_fsync" }, /* 6072 */ + { 0, 0, printargs, "n32_fdatasync" }, /* 6073 */ + { 0, 0, printargs, "n32_truncate" }, /* 6074 */ + { 0, 0, printargs, "n32_ftruncate" }, /* 6075 */ + { 0, 0, printargs, "n32_getdents" }, /* 6076 */ + { 0, 0, printargs, "n32_getcwd" }, /* 6077 */ + { 0, 0, printargs, "n32_chdir" }, /* 6078 */ + { 0, 0, printargs, "n32_fchdir" }, /* 6079 */ + { 0, 0, printargs, "n32_rename" }, /* 6080 */ + { 0, 0, printargs, "n32_mkdir" }, /* 6081 */ + { 0, 0, printargs, "n32_rmdir" }, /* 6082 */ + { 0, 0, printargs, "n32_creat" }, /* 6083 */ + { 0, 0, printargs, "n32_link" }, /* 6084 */ + { 0, 0, printargs, "n32_unlink" }, /* 6085 */ + { 0, 0, printargs, "n32_symlink" }, /* 6086 */ + { 0, 0, printargs, "n32_readlink" }, /* 6087 */ + { 0, 0, printargs, "n32_chmod" }, /* 6088 */ + { 0, 0, printargs, "n32_fchmod" }, /* 6089 */ + { 0, 0, printargs, "n32_chown" }, /* 6090 */ + { 0, 0, printargs, "n32_fchown" }, /* 6091 */ + { 0, 0, printargs, "n32_lchown" }, /* 6092 */ + { 0, 0, printargs, "n32_umask" }, /* 6093 */ + { 0, 0, printargs, "n32_gettimeofday" }, /* 6094 */ + { 0, 0, printargs, "n32_getrlimit" }, /* 6095 */ + { 0, 0, printargs, "n32_getrusage" }, /* 6096 */ + { 0, 0, printargs, "n32_sysinfo" }, /* 6097 */ + { 0, 0, printargs, "n32_times" }, /* 6098 */ + { 0, 0, printargs, "n32_ptrace" }, /* 6099 */ + { 0, 0, printargs, "n32_getuid" }, /* 6100 */ + { 0, 0, printargs, "n32_syslog" }, /* 6101 */ + { 0, 0, printargs, "n32_getgid" }, /* 6102 */ + { 0, 0, printargs, "n32_setuid" }, /* 6103 */ + { 0, 0, printargs, "n32_setgid" }, /* 6104 */ + { 0, 0, printargs, "n32_geteuid" }, /* 6105 */ + { 0, 0, printargs, "n32_getegid" }, /* 6106 */ + { 0, 0, printargs, "n32_setpgid" }, /* 6107 */ + { 0, 0, printargs, "n32_getppid" }, /* 6108 */ + { 0, 0, printargs, "n32_getpgrp" }, /* 6109 */ + { 0, 0, printargs, "n32_setsid" }, /* 6110 */ + { 0, 0, printargs, "n32_setreuid" }, /* 6111 */ + { 0, 0, printargs, "n32_setregid" }, /* 6112 */ + { 0, 0, printargs, "n32_getgroups" }, /* 6113 */ + { 0, 0, printargs, "n32_setgroups" }, /* 6114 */ + { 0, 0, printargs, "n32_setresuid" }, /* 6115 */ + { 0, 0, printargs, "n32_getresuid" }, /* 6116 */ + { 0, 0, printargs, "n32_setresgid" }, /* 6117 */ + { 0, 0, printargs, "n32_getresgid" }, /* 6118 */ + { 0, 0, printargs, "n32_getpgid" }, /* 6119 */ + { 0, 0, printargs, "n32_setfsuid" }, /* 6120 */ + { 0, 0, printargs, "n32_setfsgid" }, /* 6121 */ + { 0, 0, printargs, "n32_getsid" }, /* 6122 */ + { 0, 0, printargs, "n32_capget" }, /* 6123 */ + { 0, 0, printargs, "n32_capset" }, /* 6124 */ + { 0, 0, printargs, "n32_rt_sigpending" }, /* 6125 */ + { 0, 0, printargs, "n32_rt_sigtimedwait" }, /* 6126 */ + { 0, 0, printargs, "n32_rt_sigqueueinfo" }, /* 6127 */ + { 0, 0, printargs, "n32_rt_sigsuspend" }, /* 6128 */ + { 0, 0, printargs, "n32_sigaltstack" }, /* 6129 */ + { 0, 0, printargs, "n32_utime" }, /* 6130 */ + { 0, 0, printargs, "n32_mknod" }, /* 6131 */ + { 0, 0, printargs, "n32_personality" }, /* 6132 */ + { 0, 0, printargs, "n32_ustat" }, /* 6133 */ + { 0, 0, printargs, "n32_statfs" }, /* 6134 */ + { 0, 0, printargs, "n32_fstatfs" }, /* 6135 */ + { 0, 0, printargs, "n32_sysfs" }, /* 6136 */ + { 0, 0, printargs, "n32_getpriority" }, /* 6137 */ + { 0, 0, printargs, "n32_setpriority" }, /* 6138 */ + { 0, 0, printargs, "n32_sched_setparam" }, /* 6139 */ + { 0, 0, printargs, "n32_sched_getparam" }, /* 6140 */ + { 0, 0, printargs, "n32_sched_setscheduler"}, /* 6141 */ + { 0, 0, printargs, "n32_sched_getscheduler"}, /* 6142 */ + { 0, 0, printargs, "n32_sched_get_priority_max"}, /* 6143 */ + { 0, 0, printargs, "n32_sched_get_priority_min"}, /* 6144 */ + { 0, 0, printargs, "n32_sched_rr_get_interval"}, /* 6145 */ + { 0, TM, printargs, "n32_mlock" }, /* 6146 */ + { 0, TM, printargs, "n32_munlock" }, /* 6147 */ + { 0, TM, printargs, "n32_mlockall" }, /* 6148 */ + { 0, TM, printargs, "n32_munlockall" }, /* 6149 */ + { 0, 0, printargs, "n32_vhangup" }, /* 6150 */ + { 0, 0, printargs, "n32_pivot_root" }, /* 6151 */ + { 0, 0, printargs, "n32__sysctl" }, /* 6152 */ + { 0, 0, printargs, "n32_prctl" }, /* 6153 */ + { 0, 0, printargs, "n32_adjtimex" }, /* 6154 */ + { 0, 0, printargs, "n32_setrlimit" }, /* 6155 */ + { 0, 0, printargs, "n32_chroot" }, /* 6156 */ + { 0, 0, printargs, "n32_sync" }, /* 6157 */ + { 0, 0, printargs, "n32_acct" }, /* 6158 */ + { 0, 0, printargs, "n32_settimeofday" }, /* 6159 */ + { 0, 0, printargs, "n32_mount" }, /* 6160 */ + { 0, 0, printargs, "n32_umount2" }, /* 6161 */ + { 0, 0, printargs, "n32_swapon" }, /* 6162 */ + { 0, 0, printargs, "n32_swapoff" }, /* 6163 */ + { 0, 0, printargs, "n32_reboot" }, /* 6164 */ + { 0, 0, printargs, "n32_sethostname" }, /* 6165 */ + { 0, 0, printargs, "n32_setdomainname" }, /* 6166 */ + { 0, 0, printargs, "n32_create_module" }, /* 6167 */ + { 0, 0, printargs, "n32_init_module" }, /* 6168 */ + { 0, 0, printargs, "n32_delete_module" }, /* 6169 */ + { 0, 0, printargs, "n32_get_kernel_syms" }, /* 6170 */ + { 0, 0, printargs, "n32_query_module" }, /* 6171 */ + { 0, TF, printargs, "n32_quotactl" }, /* 6172 */ + { 0, 0, printargs, "n32_nfsservctl" }, /* 6173 */ + { 0, 0, printargs, "n32_getpmsg" }, /* 6174 */ + { 0, 0, printargs, "n32_putpmsg" }, /* 6175 */ + { 0, 0, printargs, "n32_afs_syscall" }, /* 6176 */ + { 0, 0, printargs, "n32_reserved177" }, /* 6177 */ + { 0, 0, printargs, "n32_gettid" }, /* 6178 */ + { 0, 0, printargs, "n32_readahead" }, /* 6179 */ + { 0, 0, printargs, "n32_setxattr" }, /* 6180 */ + { 0, 0, printargs, "n32_lsetxattr" }, /* 6181 */ + { 0, 0, printargs, "n32_fsetxattr" }, /* 6182 */ + { 0, 0, printargs, "n32_getxattr" }, /* 6183 */ + { 0, 0, printargs, "n32_lgetxattr" }, /* 6184 */ + { 0, 0, printargs, "n32_fgetxattr" }, /* 6185 */ + { 0, 0, printargs, "n32_listxattr" }, /* 6186 */ + { 0, 0, printargs, "n32_llistxattr" }, /* 6187 */ + { 0, 0, printargs, "n32_flistxattr" }, /* 6188 */ + { 0, 0, printargs, "n32_removexattr" }, /* 6189 */ + { 0, 0, printargs, "n32_lremovexattr" }, /* 6190 */ + { 0, 0, printargs, "n32_fremovexattr" }, /* 6191 */ + { 0, 0, printargs, "n32_tkill" }, /* 6192 */ + { 0, 0, printargs, "n32_time" }, /* 6193 */ + { 0, 0, printargs, "n32_futex" }, /* 6194 */ + { 0, 0, printargs, "n32_sched_setaffinity" }, /* 6195 */ + { 0, 0, printargs, "n32_sched_getaffinity" }, /* 6196 */ + { 0, 0, printargs, "n32_cacheflush" }, /* 6197 */ + { 0, 0, printargs, "n32_cachectl" }, /* 6198 */ + { 0, 0, printargs, "n32_sysmips" }, /* 6199 */ + { 0, 0, printargs, "n32_io_setup" }, /* 6200 */ + { 0, 0, printargs, "n32_io_destroy" }, /* 6201 */ + { 0, 0, printargs, "n32_io_getevents" }, /* 6202 */ + { 0, 0, printargs, "n32_io_submit" }, /* 6203 */ + { 0, 0, printargs, "n32_io_cancel" }, /* 6204 */ + { 1, TP, printargs, "n32_exit_group" }, /* 6205 */ + { 0, 0, printargs, "n32_lookup_dcookie" }, /* 6206 */ + { 0, 0, printargs, "n32_epoll_create" }, /* 6207 */ + { 0, 0, printargs, "n32_epoll_ctl" }, /* 6208 */ + { 0, 0, printargs, "n32_epoll_wait" }, /* 6209 */ + { 0, TM, printargs, "n32_remap_file_pages" }, /* 6210 */ + { 0, 0, printargs, "n32_rt_sigreturn" }, /* 6211 */ + { 0, 0, printargs, "n32_fcntl64" }, /* 6212 */ + { 0, 0, printargs, "n32_set_tid_address" }, /* 6213 */ + { 0, 0, printargs, "n32_restart_syscall" }, /* 6214 */ + { 0, 0, printargs, "n32_semtimedop" }, /* 6215 */ + { 0, 0, printargs, "n32_fadvise64" }, /* 6216 */ + { 0, 0, printargs, "n32_statfs64" }, /* 6217 */ + { 0, 0, printargs, "n32_fstatfs64" }, /* 6218 */ + { 0, 0, printargs, "n32_sendfile64" }, /* 6219 */ + { 3, 0, printargs, "n32_timer_create" }, /* 6220 */ + { 4, 0, printargs, "n32_timer_settime" }, /* 6221 */ + { 2, 0, printargs, "n32_timer_gettime" }, /* 6222 */ + { 1, 0, printargs, "n32_timer_getoverrun" }, /* 6223 */ + { 1, 0, printargs, "n32_timer_delete" }, /* 6224 */ + { 2, 0, printargs, "n32_clock_settime" }, /* 6225 */ + { 2, 0, printargs, "n32_clock_gettime" }, /* 6226 */ + { 2, 0, printargs, "n32_clock_getres" }, /* 6227 */ + { 4, 0, printargs, "n32_clock_nanosleep" }, /* 6228 */ + { 3, 0, printargs, "n32_tgkill" }, /* 6229 */ + { 2, 0, printargs, "n32_utimes" }, /* 6230 */ + { 6, TM, printargs, "n32_mbind" }, /* 6231 */ + { 5, TM, printargs, "n32_get_mempolicy" }, /* 6232 */ + { 3, TM, printargs, "n32_set_mempolicy" }, /* 6233 */ + { 4, 0, printargs, "n32_mq_open" }, /* 6234 */ + { 1, 0, printargs, "n32_mq_unlink" }, /* 6235 */ + { 5, 0, printargs, "n32_mq_timedsend" }, /* 6236 */ + { 5, 0, printargs, "n32_mq_timedreceive" }, /* 6237 */ + { 2, 0, printargs, "n32_mq_notify" }, /* 6238 */ + { 3, 0, printargs, "n32_mq_getsetattr" }, /* 6239 */ + { 5, 0, printargs, "n32_vserver" }, /* 6240 */ + { 5, TP, printargs, "n32_waitid" }, /* 6241 */ + { 0, 0, printargs, "n32_SYS_6242" }, /* 6242 */ + { 5, 0, printargs, "n32_add_key" }, /* 6243 */ + { 4, 0, printargs, "n32_request_key" }, /* 6244 */ + { 5, 0, printargs, "n32_keyctl" }, /* 6245 */ + { 1, 0, printargs, "n32_set_thread_area" }, /* 6246 */ + { 0, TD, printargs, "n32_inotify_init" }, /* 6247 */ + { 3, TD, printargs, "n32_inotify_add_watch" }, /* 6248 */ + { 2, TD, printargs, "n32_inotify_rm_watch" }, /* 6249 */ + { 4, TM, printargs, "n32_migrate_pages" }, /* 6250 */ + { 4, TD|TF, printargs, "n32_openat" }, /* 6251 */ + { 3, TD|TF, printargs, "n32_mkdirat" }, /* 6252 */ + { 4, TD|TF, printargs, "n32_mknodat" }, /* 6253 */ + { 5, TD|TF, printargs, "n32_fchownat" }, /* 6254 */ + { 3, TD|TF, printargs, "n32_futimesat" }, /* 6255 */ + { 4, TD|TF, printargs, "n32_newfstatat" }, /* 6256 */ + { 3, TD|TF, printargs, "n32_unlinkat" }, /* 6257 */ + { 4, TD|TF, printargs, "n32_renameat" }, /* 6258 */ + { 5, TD|TF, printargs, "n32_linkat" }, /* 6259 */ + { 3, TD|TF, printargs, "n32_symlinkat" }, /* 6260 */ + { 4, TD|TF, printargs, "n32_readlinkat" }, /* 6261 */ + { 3, TD|TF, printargs, "n32_fchmodat" }, /* 6262 */ + { 3, TD|TF, printargs, "n32_faccessat" }, /* 6263 */ + { 6, TD, printargs, "n32_pselect6" }, /* 6264 */ + { 5, TD, printargs, "n32_ppoll" }, /* 6265 */ + { 1, TP, printargs, "n32_unshare" }, /* 6266 */ + { 6, TD, printargs, "n32_splice" }, /* 6267 */ + { 4, TD, printargs, "n32_sync_file_range" }, /* 6268 */ + { 4, TD, printargs, "n32_tee" }, /* 6269 */ + { 4, TD, printargs, "n32_vmsplice" }, /* 6270 */ + { 6, TM, printargs, "n32_move_pages" }, /* 6271 */ + { 2, 0, printargs, "n32_set_robust_list" }, /* 6272 */ + { 3, 0, printargs, "n32_get_robust_list" }, /* 6273 */ + { 5, 0, printargs, "n32_kexec_load" }, /* 6274 */ + { 3, 0, printargs, "n32_getcpu" }, /* 6275 */ + { 5, TD, printargs, "n32_epoll_pwait" }, /* 6276 */ + { 3, 0, printargs, "n32_ioprio_set" }, /* 6277 */ + { 2, 0, printargs, "n32_ioprio_get" }, /* 6278 */ + { 4, TD|TF, printargs, "n32_utimensat" }, /* 6279 */ + { 3, TD|TS, printargs, "n32_signalfd" }, /* 6280 */ + { 4, TD, printargs, "n32_timerfd" }, /* 6281 */ + { 1, TD, printargs, "n32_eventfd" }, /* 6282 */ + { 6, TD, printargs, "n32_fallocate" }, /* 6283 */ + { 2, TD, printargs, "n32_timerfd_create" }, /* 6284 */ + { 2, TD, printargs, "n32_timerfd_gettime" }, /* 6285 */ + { 4, TD, printargs, "n32_timerfd_settime" }, /* 6286 */ + { 4, TD|TS, printargs, "n32_signalfd4" }, /* 6287 */ + { 2, TD, printargs, "n32_eventfd2" }, /* 6288 */ + { 1, TD, printargs, "n32_epoll_create1" }, /* 6289 */ + { 3, TD, printargs, "n32_dup3" }, /* 6290 */ + { 2, TD, printargs, "n32_pipe2" }, /* 6291 */ + { 1, TD, printargs, "n32_inotify_init1" }, /* 6292 */ + { 5, TD, printargs, "n32_preadv" }, /* 6293 */ + { 5, TD, printargs, "n32_pwritev" }, /* 6294 */ + { 4, TP|TS, printargs, "n32_rt_tgsigqueueinfo" }, /* 6295 */ + { 5, TD, printargs, "n32_perf_event_open" }, /* 6296 */ + { 4, TN, printargs, "n32_accept4" }, /* 6297 */ + { 5, TN, printargs, "n32_recvmmsg" }, /* 6298 */ + { 3, TD, printargs, "n32_getdents64" }, /* 6299 */ + { 2, 0, printargs, "n32_fanotify_init" }, /* 6300 */ + { 5, 0, printargs, "n32_fanotify_mark" }, /* 6301 */ + { 4, 0, printargs, "n32_prlimit64" }, /* 6302 */ + { 5, TD|TF, printargs, "n32_name_to_handle_at" }, /* 6303 */ + { 3, TD, printargs, "n32_open_by_handle_at" }, /* 6304 */ + { 2, 0, printargs, "n32_clock_adjtime" }, /* 6305 */ + { 1, TD, printargs, "n32_syncfs" }, /* 6306 */ + { 4, TN, printargs, "n32_sendmmsg" }, /* 6307 */ + { 2, TD, printargs, "n32_setns" }, /* 6308 */ + { 6, 0, printargs, "n32_process_vm_readv" }, /* 6309 */ + { 6, 0, printargs, "n32_process_vm_writev" }, /* 6310 */ + { 5, 0, printargs, "n32_kcmp" }, /* 6311 */ + { 3, TD, printargs, "n32_finit_module" }, /* 6312 */ +#endif diff --git a/alice-strace/linux/mips/syscallent-n64.h b/alice-strace/linux/mips/syscallent-n64.h new file mode 100644 index 0000000..dd5da40 --- /dev/null +++ b/alice-strace/linux/mips/syscallent-n64.h @@ -0,0 +1,621 @@ +#if defined LINUX_MIPSN64 + /* For an N64 strace decode the N64 64-bit syscalls. */ + { 3, TD, sys_read, "read" }, /* 5000 */ /* start of Linux N64 */ + { 3, TD, sys_write, "write" }, /* 5001 */ + { 3, TD|TF, sys_open, "open" }, /* 5002 */ + { 1, TD, sys_close, "close" }, /* 5003 */ + { 2, TF, sys_stat, "stat" }, /* 5004 */ + { 2, TD, sys_fstat, "fstat" }, /* 5005 */ + { 2, TF, sys_lstat, "lstat" }, /* 5006 */ + { 3, TD, sys_poll, "poll" }, /* 5007 */ + { 3, TD, sys_lseek, "lseek" }, /* 5008 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 5009 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 5010 */ + { 2, TM, sys_munmap, "munmap" }, /* 5011 */ + { 1, TM, sys_brk, "brk" }, /* 5012 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 5013 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 5014 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 5015 */ + { 4, TD, sys_pread, "pread64" }, /* 5016 */ + { 4, TD, sys_pwrite, "pwrite64" }, /* 5017 */ + { 3, TD, sys_readv, "readv" }, /* 5018 */ + { 3, TD, sys_writev, "writev" }, /* 5019 */ + { 2, TF, sys_access, "access" }, /* 5020 */ + { 1, TD, sys_pipe, "pipe" }, /* 5021 */ + { 5, TD, sys_select, "_newselect" }, /* 5022 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 5023 */ + { 5, TM, sys_mremap, "mremap" }, /* 5024 */ + { 3, TM, sys_msync, "msync" }, /* 5025 */ + { 3, TM, sys_mincore, "mincore" }, /* 5026 */ + { 3, TM, sys_madvise, "madvise" }, /* 5027 */ + { 3, TI, sys_shmget, "shmget" }, /* 5028 */ + { 3, TI, sys_shmat, "shmat" }, /* 5029 */ + { 3, TI, sys_shmctl, "shmctl" }, /* 5030 */ + { 1, TD, sys_dup, "dup" }, /* 5031 */ + { 2, TD, sys_dup2, "dup2" }, /* 5032 */ + { 0, TS, sys_pause, "pause" }, /* 5033 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 5034 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 5035 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 5036 */ + { 1, 0, sys_alarm, "alarm" }, /* 5037 */ + { 0, 0, sys_getpid, "getpid" }, /* 5038 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 5039 */ + { 3, TN, sys_socket, "socket" }, /* 5040 */ + { 3, TN, sys_connect, "connect" }, /* 5041 */ + { 3, TN, sys_accept, "accept" }, /* 5042 */ + { 6, TN, sys_sendto, "sendto" }, /* 5043 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 5044 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 5045 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 5046 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 5047 */ + { 3, TN, sys_bind, "bind" }, /* 5048 */ + { 2, TN, sys_listen, "listen" }, /* 5049 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 5050 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 5051 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 5052 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 5053 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 5054 */ + { 2, TP, sys_clone, "clone" }, /* 5055 */ + { 0, TP, sys_fork, "fork" }, /* 5056 */ + { 3, TF|TP, sys_execve, "execve" }, /* 5057 */ + { 1, TP, sys_exit, "exit" }, /* 5058 */ + { 4, TP, sys_wait4, "wait4" }, /* 5059 */ + { 2, TS, sys_kill, "kill" }, /* 5060 */ + { 1, 0, sys_uname, "uname" }, /* 5061 */ + { 3, TI, sys_semget, "semget" }, /* 5062 */ + { 3, TI, printargs, "semop" }, /* 5063 */ + { 4, TI, sys_semctl, "semctl" }, /* 5064 */ + { 1, TI, sys_shmdt, "shmdt" }, /* 5065 */ + { 2, TI, sys_msgget, "msgget" }, /* 5066 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 5067 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 5068 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 5069 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 5070 */ + { 2, TD, sys_flock, "flock" }, /* 5071 */ + { 1, TD, sys_fsync, "fsync" }, /* 5072 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 5073 */ + { 2, TF, sys_truncate, "truncate" }, /* 5074 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 5075 */ + { 3, TD, sys_getdents, "getdents" }, /* 5076 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 5077 */ + { 1, TF, sys_chdir, "chdir" }, /* 5078 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 5079 */ + { 2, TF, sys_rename, "rename" }, /* 5080 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 5081 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 5082 */ + { 2, TD|TF, sys_creat, "creat" }, /* 5083 */ + { 2, TF, sys_link, "link" }, /* 5084 */ + { 1, TF, sys_unlink, "unlink" }, /* 5085 */ + { 2, TF, sys_symlink, "symlink" }, /* 5086 */ + { 3, TF, sys_readlink, "readlink" }, /* 5087 */ + { 2, TF, sys_chmod, "chmod" }, /* 5088 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 5089 */ + { 3, TF, sys_chown, "chown" }, /* 5090 */ + { 3, TD, sys_fchown, "fchown" }, /* 5091 */ + { 3, TF, sys_chown, "lchown" }, /* 5092 */ + { 1, 0, sys_umask, "umask" }, /* 5093 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 5094 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 5095 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 5096 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 5097 */ + { 1, 0, sys_times, "times" }, /* 5098 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 5099 */ + { 0, NF, sys_getuid, "getuid" }, /* 5100 */ + { 3, 0, sys_syslog, "syslog" }, /* 5101 */ + { 0, NF, sys_getgid, "getgid" }, /* 5102 */ + { 1, 0, sys_setuid, "setuid" }, /* 5103 */ + { 1, 0, sys_setgid, "setgid" }, /* 5104 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 5105 */ + { 0, NF, sys_getegid, "getegid" }, /* 5106 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 5107 */ + { 0, 0, sys_getppid, "getppid" }, /* 5108 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 5109 */ + { 0, 0, sys_setsid, "setsid" }, /* 5110 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 5111 */ + { 2, 0, sys_setregid, "setregid" }, /* 5112 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 5113 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 5114 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 5115 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 5116 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 5117 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 5118 */ + { 0, 0, sys_getpgid, "getpgid" }, /* 5119 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 5120 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 5121 */ + { 1, 0, sys_getsid, "getsid" }, /* 5122 */ + { 2, 0, sys_capget, "capget" }, /* 5123 */ + { 2, 0, sys_capset, "capset" }, /* 5124 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 5125 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 5126 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 5127 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 5128 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 5129 */ + { 2, TF, sys_utime, "utime" }, /* 5130 */ + { 3, TF, sys_mknod, "mknod" }, /* 5131 */ + { 1, 0, sys_personality, "personality" }, /* 5132 */ + { 2, 0, sys_ustat, "ustat" }, /* 5133 */ + { 3, TF, sys_statfs, "statfs" }, /* 5134 */ + { 3, TD, sys_fstatfs, "fstatfs" }, /* 5135 */ + { 5, 0, sys_sysfs, "sysfs" }, /* 5136 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 5137 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 5138 */ + { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 5139 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 5140 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 5141 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 5142 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 5143 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 5144 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 5145 */ + { 2, TM, sys_mlock, "mlock" }, /* 5146 */ + { 2, TM, sys_munlock, "munlock" }, /* 5147 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 5148 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 5149 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 5150 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 5151 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 5152 */ + { 5, 0, sys_prctl, "prctl" }, /* 5153 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 5154 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 5155 */ + { 1, TF, sys_chroot, "chroot" }, /* 5156 */ + { 0, 0, sys_sync, "sync" }, /* 5157 */ + { 1, TF, sys_acct, "acct" }, /* 5158 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 5159 */ + { 5, TF, sys_mount, "mount" }, /* 5160 */ + { 2, TF, sys_umount2, "umount2" }, /* 5161 */ + { 2, TF, sys_swapon, "swapon" }, /* 5162 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 5163 */ + { 4, 0, sys_reboot, "reboot" }, /* 5164 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 5165 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 5166 */ + { 2, 0, sys_create_module, "create_module" }, /* 5167 */ + { 4, 0, sys_init_module, "init_module" }, /* 5168 */ + { 1, 0, sys_delete_module, "delete_module" }, /* 5169 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 5170 */ + { 5, 0, sys_query_module, "query_module" }, /* 5171 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 5172 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 5173 */ + { 5, TN, printargs, "getpmsg" }, /* 5174 */ + { 5, TN, printargs, "putpmsg" }, /* 5175 */ + { 0, 0, sys_afs_syscall, "afs_syscall" }, /* 5176 */ + { 0, 0, printargs, "reserved177" }, /* 5177 */ + { 0, 0, sys_gettid, "gettid" }, /* 5178 */ + { 3, TD, sys_readahead, "readahead" }, /* 5179 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5180 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 5181 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 5182 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 5183 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 5184 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 5185 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 5186 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 5187 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 5188 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 5189 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 5190 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 5191 */ + { 2, TS, sys_kill, "tkill" }, /* 5192 */ + { 1, 0, sys_time, "time" }, /* 5193 */ + { 6, 0, sys_futex, "futex" }, /* 5194 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 5195 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 5196 */ + { 3, 0, printargs, "cacheflush" }, /* 5197 */ + { 3, 0, printargs, "cachectl" }, /* 5198 */ + { 4, 0, sys_sysmips, "sysmips" }, /* 5199 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 5200 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 5201 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 5202 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 5203 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 5204 */ + { 1, TP, sys_exit, "exit_group" }, /* 5205 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 5206 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 5207 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 5208 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 5209 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 5210 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 5211 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 5212 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 5213 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 5214 */ + { 4, TD, sys_fadvise64_64, "fadvise64_64" }, /* 5215 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 5216 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 5217 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 5218 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 5219 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 5220 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 5221 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 5222 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 5223 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 5224 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 5225 */ + { 2, TF, sys_utimes, "utimes" }, /* 5226 */ + { 6, TM, sys_mbind, "mbind" }, /* 5227 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 5228 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 5229 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 5230 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 5231 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 5232 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 5233 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 5234 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 5235 */ + { 5, 0, sys_vserver, "vserver" }, /* 5236 */ + { 5, TP, sys_waitid, "waitid" }, /* 5237 */ + [5238] = { }, + { 5, 0, sys_add_key, "add_key" }, /* 5239 */ + { 4, 0, sys_request_key, "request_key" }, /* 5230 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 5241 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 5242 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 5243 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 5244 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 5245 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 5246 */ + { 4, TD|TF, sys_openat, "openat" }, /* 5247 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 5248 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 5249 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 5250 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 5251 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 5252 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 5253 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 5254 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 5255 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 5256 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 5257 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 5258 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 5259 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 5260 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 5261 */ + { 1, TP, sys_unshare, "unshare" }, /* 5262 */ + { 6, TD, sys_splice, "splice" }, /* 5263 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 5264 */ + { 4, TD, sys_tee, "tee" }, /* 5265 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 5266 */ + { 6, TM, printargs, "move_pages" }, /* 5267 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 5268 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 5269 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 5270 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 5271 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 5272 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 5273 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 5274 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 5275 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 5276 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 5277 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 5278 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 5279 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 5280 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 5281 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 5282 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 5283 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 5284 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 5285 */ + { 3, TD, sys_dup3, "dup3" }, /* 5286 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 5287 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 5288 */ + { 4, TD, sys_preadv, "preadv" }, /* 5289 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 5290 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 5291 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 5292 */ + { 4, TN, sys_accept4, "accept4" }, /* 5293 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 5294 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 5295 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 5296 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 5297 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 5298 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 5299 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 5300 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 5301 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 5302 */ + { 2, TD, sys_setns, "setns" }, /* 5303 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 5304 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 5305 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 5306 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 5307 */ +#else + { 0, 0, printargs, "n64_read" }, /* 5000 */ + { 0, 0, printargs, "n64_write" }, /* 5001 */ + { 0, 0, printargs, "n64_open" }, /* 5002 */ + { 0, 0, printargs, "n64_close" }, /* 5003 */ + { 0, 0, printargs, "n64_stat" }, /* 5004 */ + { 0, 0, printargs, "n64_fstat" }, /* 5005 */ + { 0, 0, printargs, "n64_lstat" }, /* 5006 */ + { 0, 0, printargs, "n64_poll" }, /* 5007 */ + { 0, 0, printargs, "n64_lseek" }, /* 5008 */ + { 0, TD|TM, printargs, "n64_mmap" }, /* 5009 */ + { 0, TM, printargs, "n64_mprotect" }, /* 5010 */ + { 0, TM, printargs, "n64_munmap" }, /* 5011 */ + { 0, TM, printargs, "n64_brk" }, /* 5012 */ + { 0, 0, printargs, "n64_rt_sigaction" }, /* 5013 */ + { 0, 0, printargs, "n64_rt_sigprocmask" }, /* 5014 */ + { 0, 0, printargs, "n64_ioctl" }, /* 5015 */ + { 0, 0, printargs, "n64_pread" }, /* 5016 */ + { 0, 0, printargs, "n64_pwrite" }, /* 5017 */ + { 0, 0, printargs, "n64_readv" }, /* 5018 */ + { 0, 0, printargs, "n64_writev" }, /* 5019 */ + { 0, 0, printargs, "n64_access" }, /* 5020 */ + { 0, 0, printargs, "n64_pipe" }, /* 5021 */ + { 0, 0, printargs, "n64__newselect" }, /* 5022 */ + { 0, 0, printargs, "n64_sched_yield" }, /* 5023 */ + { 0, TM, printargs, "n64_mremap" }, /* 5024 */ + { 0, TM, printargs, "n64_msync" }, /* 5025 */ + { 0, TM, printargs, "n64_mincore" }, /* 5026 */ + { 0, TM, printargs, "n64_madvise" }, /* 5027 */ + { 0, 0, printargs, "n64_shmget" }, /* 5028 */ + { 0, 0, printargs, "n64_shmat" }, /* 5029 */ + { 0, 0, printargs, "n64_shmctl" }, /* 5030 */ + { 0, 0, printargs, "n64_dup" }, /* 5031 */ + { 0, 0, printargs, "n64_dup2" }, /* 5032 */ + { 0, 0, printargs, "n64_pause" }, /* 5033 */ + { 0, 0, printargs, "n64_nanosleep" }, /* 5034 */ + { 0, 0, printargs, "n64_getitimer" }, /* 5035 */ + { 0, 0, printargs, "n64_setitimer" }, /* 5036 */ + { 0, 0, printargs, "n64_alarm" }, /* 5037 */ + { 0, 0, printargs, "n64_getpid" }, /* 5038 */ + { 0, 0, printargs, "n64_sendfile" }, /* 5039 */ + { 0, 0, printargs, "n64_socketcall" }, /* 5040 */ + { 0, 0, printargs, "n64_connect" }, /* 5041 */ + { 0, 0, printargs, "n64_accept" }, /* 5042 */ + { 0, 0, printargs, "n64_sendto" }, /* 5043 */ + { 0, 0, printargs, "n64_recvfrom" }, /* 5044 */ + { 0, 0, printargs, "n64_sendmsg" }, /* 5045 */ + { 0, 0, printargs, "n64_recvmsg" }, /* 5046 */ + { 0, 0, printargs, "n64_shutdown" }, /* 5047 */ + { 0, 0, printargs, "n64_bind" }, /* 5048 */ + { 0, 0, printargs, "n64_listen" }, /* 5049 */ + { 0, 0, printargs, "n64_getsockname" }, /* 5050 */ + { 0, 0, printargs, "n64_getpeername" }, /* 5051 */ + { 0, 0, printargs, "n64_socketpair" }, /* 5052 */ + { 0, 0, printargs, "n64_setsockopt" }, /* 5053 */ + { 0, 0, printargs, "n64_getsockopt" }, /* 5054 */ + { 0, 0, printargs, "n64_clone" }, /* 5055 */ + { 0, 0, printargs, "n64_fork" }, /* 5056 */ + { 0, 0, printargs, "n64_execve" }, /* 5057 */ + { 0, 0, printargs, "n64_exit" }, /* 5058 */ + { 0, 0, printargs, "n64_wait4" }, /* 5059 */ + { 0, 0, printargs, "n64_kill" }, /* 5060 */ + { 0, 0, printargs, "n64_uname" }, /* 5061 */ + { 0, 0, printargs, "n64_semget" }, /* 5062 */ + { 0, 0, printargs, "n64_semop" }, /* 5063 */ + { 0, 0, printargs, "n64_semctl" }, /* 5064 */ + { 0, 0, printargs, "n64_shmdt" }, /* 5065 */ + { 0, 0, printargs, "n64_msgget" }, /* 5066 */ + { 0, 0, printargs, "n64_msgsnd" }, /* 5067 */ + { 0, 0, printargs, "n64_msgrcv" }, /* 5068 */ + { 0, 0, printargs, "n64_msgctl" }, /* 5069 */ + { 0, 0, printargs, "n64_fcntl" }, /* 5070 */ + { 0, 0, printargs, "n64_flock" }, /* 5071 */ + { 0, 0, printargs, "n64_fsync" }, /* 5072 */ + { 0, 0, printargs, "n64_fdatasync" }, /* 5073 */ + { 0, 0, printargs, "n64_truncate" }, /* 5074 */ + { 0, 0, printargs, "n64_ftruncate" }, /* 5075 */ + { 0, 0, printargs, "n64_getdents" }, /* 5076 */ + { 0, 0, printargs, "n64_getcwd" }, /* 5077 */ + { 0, 0, printargs, "n64_chdir" }, /* 5078 */ + { 0, 0, printargs, "n64_fchdir" }, /* 5079 */ + { 0, 0, printargs, "n64_rename" }, /* 5080 */ + { 0, 0, printargs, "n64_mkdir" }, /* 5081 */ + { 0, 0, printargs, "n64_rmdir" }, /* 5082 */ + { 0, 0, printargs, "n64_creat" }, /* 5083 */ + { 0, 0, printargs, "n64_link" }, /* 5084 */ + { 0, 0, printargs, "n64_unlink" }, /* 5085 */ + { 0, 0, printargs, "n64_symlink" }, /* 5086 */ + { 0, 0, printargs, "n64_readlink" }, /* 5087 */ + { 0, 0, printargs, "n64_chmod" }, /* 5088 */ + { 0, 0, printargs, "n64_fchmod" }, /* 5089 */ + { 0, 0, printargs, "n64_chown" }, /* 5090 */ + { 0, 0, printargs, "n64_fchown" }, /* 5091 */ + { 0, 0, printargs, "n64_lchown" }, /* 5092 */ + { 0, 0, printargs, "n64_umask" }, /* 5093 */ + { 0, 0, printargs, "n64_gettimeofday" }, /* 5094 */ + { 0, 0, printargs, "n64_getrlimit" }, /* 5095 */ + { 0, 0, printargs, "n64_getrusage" }, /* 5096 */ + { 0, 0, printargs, "n64_sysinfo" }, /* 5097 */ + { 0, 0, printargs, "n64_times" }, /* 5098 */ + { 0, 0, printargs, "n64_ptrace" }, /* 5099 */ + { 0, 0, printargs, "n64_getuid" }, /* 5100 */ + { 0, 0, printargs, "n64_syslog" }, /* 5101 */ + { 0, 0, printargs, "n64_getgid" }, /* 5102 */ + { 0, 0, printargs, "n64_setuid" }, /* 5103 */ + { 0, 0, printargs, "n64_setgid" }, /* 5104 */ + { 0, 0, printargs, "n64_geteuid" }, /* 5105 */ + { 0, 0, printargs, "n64_getegid" }, /* 5106 */ + { 0, 0, printargs, "n64_setpgid" }, /* 5107 */ + { 0, 0, printargs, "n64_getppid" }, /* 5108 */ + { 0, 0, printargs, "n64_getpgrp" }, /* 5109 */ + { 0, 0, printargs, "n64_setsid" }, /* 5110 */ + { 0, 0, printargs, "n64_setreuid" }, /* 5111 */ + { 0, 0, printargs, "n64_setregid" }, /* 5112 */ + { 0, 0, printargs, "n64_getgroups" }, /* 5113 */ + { 0, 0, printargs, "n64_setgroups" }, /* 5114 */ + { 0, 0, printargs, "n64_setresuid" }, /* 5115 */ + { 0, 0, printargs, "n64_getresuid" }, /* 5116 */ + { 0, 0, printargs, "n64_setresgid" }, /* 5117 */ + { 0, 0, printargs, "n64_getresgid" }, /* 5118 */ + { 0, 0, printargs, "n64_getpgid" }, /* 5119 */ + { 0, 0, printargs, "n64_setfsuid" }, /* 5120 */ + { 0, 0, printargs, "n64_setfsgid" }, /* 5121 */ + { 0, 0, printargs, "n64_getsid" }, /* 5122 */ + { 0, 0, printargs, "n64_capget" }, /* 5123 */ + { 0, 0, printargs, "n64_capset" }, /* 5124 */ + { 0, 0, printargs, "n64_rt_sigpending" }, /* 5125 */ + { 0, 0, printargs, "n64_rt_sigtimedwait" }, /* 5126 */ + { 0, 0, printargs, "n64_rt_sigqueueinfo" }, /* 5127 */ + { 0, 0, printargs, "n64_rt_sigsuspend" }, /* 5128 */ + { 0, 0, printargs, "n64_sigaltstack" }, /* 5129 */ + { 0, 0, printargs, "n64_utime" }, /* 5130 */ + { 0, 0, printargs, "n64_mknod" }, /* 5131 */ + { 0, 0, printargs, "n64_personality" }, /* 5132 */ + { 0, 0, printargs, "n64_ustat" }, /* 5133 */ + { 0, 0, printargs, "n64_statfs" }, /* 5134 */ + { 0, 0, printargs, "n64_fstatfs" }, /* 5135 */ + { 0, 0, printargs, "n64_sysfs" }, /* 5136 */ + { 0, 0, printargs, "n64_getpriority" }, /* 5137 */ + { 0, 0, printargs, "n64_setpriority" }, /* 5138 */ + { 0, 0, printargs, "n64_sched_setparam" }, /* 5139 */ + { 0, 0, printargs, "n64_sched_getparam" }, /* 5140 */ + { 0, 0, printargs, "n64_sched_setscheduler"}, /* 5141 */ + { 0, 0, printargs, "n64_sched_getscheduler"}, /* 5142 */ + { 0, 0, printargs, "n64_sched_get_priority_max"}, /* 5143 */ + { 0, 0, printargs, "n64_sched_get_priority_min"}, /* 5144 */ + { 0, 0, printargs, "n64_sched_rr_get_interval"}, /* 5145 */ + { 0, TM, printargs, "n64_mlock" }, /* 5146 */ + { 0, TM, printargs, "n64_munlock" }, /* 5147 */ + { 0, TM, printargs, "n64_mlockall" }, /* 5148 */ + { 0, TM, printargs, "n64_munlockall" }, /* 5149 */ + { 0, 0, printargs, "n64_vhangup" }, /* 5150 */ + { 0, 0, printargs, "n64_pivot_root" }, /* 5151 */ + { 0, 0, printargs, "n64__sysctl" }, /* 5152 */ + { 0, 0, printargs, "n64_prctl" }, /* 5153 */ + { 0, 0, printargs, "n64_adjtimex" }, /* 5154 */ + { 0, 0, printargs, "n64_setrlimit" }, /* 5155 */ + { 0, 0, printargs, "n64_chroot" }, /* 5156 */ + { 0, 0, printargs, "n64_sync" }, /* 5157 */ + { 0, 0, printargs, "n64_acct" }, /* 5158 */ + { 0, 0, printargs, "n64_settimeofday" }, /* 5159 */ + { 0, 0, printargs, "n64_mount" }, /* 5160 */ + { 0, 0, printargs, "n64_umount" }, /* 5161 */ + { 0, 0, printargs, "n64_swapon" }, /* 5162 */ + { 0, 0, printargs, "n64_swapoff" }, /* 5163 */ + { 0, 0, printargs, "n64_reboot" }, /* 5164 */ + { 0, 0, printargs, "n64_sethostname" }, /* 5165 */ + { 0, 0, printargs, "n64_setdomainname" }, /* 5166 */ + { 0, 0, printargs, "n64_create_module" }, /* 5167 */ + { 0, 0, printargs, "n64_init_module" }, /* 5168 */ + { 0, 0, printargs, "n64_delete_module" }, /* 5169 */ + { 0, 0, printargs, "n64_get_kernel_syms" }, /* 5170 */ + { 0, 0, printargs, "n64_query_module" }, /* 5171 */ + { 0, TF, printargs, "n64_quotactl" }, /* 5172 */ + { 0, 0, printargs, "n64_nfsservctl" }, /* 5173 */ + { 0, 0, printargs, "n64_getpmsg" }, /* 5174 */ + { 0, 0, printargs, "n64_putpmsg" }, /* 5175 */ + { 0, 0, printargs, "n64_afs_syscall" }, /* 5176 */ + { 0, 0, printargs, "n64_reserved177" }, /* 5177 */ + { 0, 0, printargs, "n64_gettid" }, /* 5178 */ + { 0, 0, printargs, "n64_readahead" }, /* 5179 */ + { 0, 0, printargs, "n64_setxattr" }, /* 5180 */ + { 0, 0, printargs, "n64_lsetxattr" }, /* 5181 */ + { 0, 0, printargs, "n64_fsetxattr" }, /* 5182 */ + { 0, 0, printargs, "n64_getxattr" }, /* 5183 */ + { 0, 0, printargs, "n64_lgetxattr" }, /* 5184 */ + { 0, 0, printargs, "n64_fgetxattr" }, /* 5185 */ + { 0, 0, printargs, "n64_listxattr" }, /* 5186 */ + { 0, 0, printargs, "n64_llistxattr" }, /* 5187 */ + { 0, 0, printargs, "n64_flistxattr" }, /* 5188 */ + { 0, 0, printargs, "n64_removexattr" }, /* 5189 */ + { 0, 0, printargs, "n64_lremovexattr" }, /* 5190 */ + { 0, 0, printargs, "n64_fremovexattr" }, /* 5191 */ + { 0, 0, printargs, "n64_tkill" }, /* 5192 */ + { 0, 0, printargs, "n64_time" }, /* 5193 */ + { 0, 0, printargs, "n64_futex" }, /* 5194 */ + { 0, 0, printargs, "n64_sched_setaffinity" }, /* 5195 */ + { 0, 0, printargs, "n64_sched_getaffinity" }, /* 5196 */ + { 0, 0, printargs, "n64_cacheflush" }, /* 5197 */ + { 0, 0, printargs, "n64_cachectl" }, /* 5198 */ + { 0, 0, printargs, "n64_sysmips" }, /* 5199 */ + { 0, 0, printargs, "n64_io_setup" }, /* 5200 */ + { 0, 0, printargs, "n64_io_destroy" }, /* 5201 */ + { 0, 0, printargs, "n64_io_getevents" }, /* 5202 */ + { 0, 0, printargs, "n64_io_submit" }, /* 5203 */ + { 0, 0, printargs, "n64_io_cancel" }, /* 5204 */ + { 1, TP, printargs, "n64_exit_group" }, /* 5205 */ + { 0, 0, printargs, "n64_lookup_dcookie" }, /* 5206 */ + { 0, 0, printargs, "n64_epoll_create" }, /* 5207 */ + { 0, 0, printargs, "n64_epoll_ctl" }, /* 5208 */ + { 0, 0, printargs, "n64_epoll_wait" }, /* 5209 */ + { 0, TM, printargs, "n64_remap_file_pages" }, /* 5210 */ + { 0, 0, printargs, "n64_rt_sigreturn" }, /* 5211 */ + { 1, 0, printargs, "n64_set_tid_address" }, /* 5212 */ + { 0, 0, printargs, "n64_restart_syscall" }, /* 5213 */ + { 5, TI, printargs, "n64_semtimedop" }, /* 5214 */ + { 0, 0, printargs, "n64_fadvise64_64" }, /* 5215 */ + { 0, 0, printargs, "n64_timer_create" }, /* 5216 */ + { 0, 0, printargs, "n64_timer_settime" }, /* 5217 */ + { 0, 0, printargs, "n64_timer_gettime" }, /* 5218 */ + { 0, 0, printargs, "n64_timer_getoverrun" }, /* 5219 */ + { 0, 0, printargs, "n64_timer_delete" }, /* 5220 */ + { 0, 0, printargs, "n64_clock_settime" }, /* 5221 */ + { 0, 0, printargs, "n64_clock_gettime" }, /* 5222 */ + { 0, 0, printargs, "n64_clock_getres" }, /* 5223 */ + { 0, 0, printargs, "n64_clock_nanosleep" }, /* 5224 */ + { 0, 0, printargs, "n64_tgkill" }, /* 5225 */ + { 0, 0, printargs, "n64_utimes" }, /* 5226 */ + { 6, TM, printargs, "n64_mbind" }, /* 5227 */ + { 5, TM, printargs, "n64_get_mempolicy" }, /* 5228 */ + { 3, TM, printargs, "n64_set_mempolicy" }, /* 5229 */ + { 0, 0, printargs, "n64_mq_open" }, /* 5230 */ + { 0, 0, printargs, "n64_mq_unlink" }, /* 5231 */ + { 0, 0, printargs, "n64_mq_timedsend" }, /* 5232 */ + { 0, 0, printargs, "n64_mq_timedreceive" }, /* 5233 */ + { 0, 0, printargs, "n64_mq_notify" }, /* 5234 */ + { 0, 0, printargs, "n64_mq_getsetattr" }, /* 5235 */ + { 5, 0, printargs, "n64_vserver" }, /* 5236 */ + { 0, 0, printargs, "n64_waitid" }, /* 5237 */ + { 0, 0, printargs, "n64_SYS_5238" }, /* 5238 */ + { 0, 0, printargs, "n64_add_key" }, /* 5239 */ + { 0, 0, printargs, "n64_request_key" }, /* 5230 */ + { 0, 0, printargs, "n64_keyctl" }, /* 5241 */ + { 0, 0, printargs, "n64_set_thread_area" }, /* 5242 */ + { 0, 0, printargs, "n64_inotify_init" }, /* 5243 */ + { 0, 0, printargs, "n64_inotify_add_watch" }, /* 5244 */ + { 0, 0, printargs, "n64_inotify_rm_watch" }, /* 5245 */ + { 0, TM, printargs, "n64_migrate_pages" }, /* 5246 */ + { 0, 0, printargs, "n64_openat" }, /* 5247 */ + { 0, 0, printargs, "n64_mkdirat" }, /* 5248 */ + { 0, 0, printargs, "n64_mknodat" }, /* 5249 */ + { 0, 0, printargs, "n64_fchownat" }, /* 5250 */ + { 0, 0, printargs, "n64_futimesat" }, /* 5251 */ + { 0, 0, printargs, "n64_newfstatat" }, /* 5252 */ + { 0, 0, printargs, "n64_unlinkat" }, /* 5253 */ + { 0, 0, printargs, "n64_renameat" }, /* 5254 */ + { 0, 0, printargs, "n64_linkat" }, /* 5255 */ + { 0, 0, printargs, "n64_symlinkat" }, /* 5256 */ + { 0, 0, printargs, "n64_readlinkat" }, /* 5257 */ + { 0, 0, printargs, "n64_fchmodat" }, /* 5258 */ + { 0, 0, printargs, "n64_faccessat" }, /* 5259 */ + { 0, 0, printargs, "n64_pselect6" }, /* 5260 */ + { 0, 0, printargs, "n64_ppoll" }, /* 5261 */ + { 0, 0, printargs, "n64_unshare" }, /* 5262 */ + { 0, 0, printargs, "n64_splice" }, /* 5263 */ + { 0, 0, printargs, "n64_sync_file_range" }, /* 5264 */ + { 0, 0, printargs, "n64_tee" }, /* 5265 */ + { 0, 0, printargs, "n64_vmsplice" }, /* 5266 */ + { 0, TM, printargs, "n64_move_pages" }, /* 5267 */ + { 0, 0, printargs, "n64_set_robust_list" }, /* 5268 */ + { 0, 0, printargs, "n64_get_robust_list" }, /* 5269 */ + { 0, 0, printargs, "n64_kexec_load" }, /* 5270 */ + { 0, 0, printargs, "n64_getcpu" }, /* 5271 */ + { 0, 0, printargs, "n64_epoll_pwait" }, /* 5272 */ + { 0, 0, printargs, "n64_ioprio_set" }, /* 5273 */ + { 0, 0, printargs, "n64_ioprio_get" }, /* 5274 */ + { 0, 0, printargs, "n64_utimensat" }, /* 5275 */ + { 0, 0, printargs, "n64_signalfd" }, /* 5276 */ + { 4, TD, printargs, "n64_timerfd" }, /* 5277 */ + { 0, 0, printargs, "n64_eventfd" }, /* 5278 */ + { 0, 0, printargs, "n64_fallocate" }, /* 5279 */ + { 0, 0, printargs, "n64_timerfd_create" }, /* 5280 */ + { 0, 0, printargs, "n64_timerfd_gettime" }, /* 5281 */ + { 0, 0, printargs, "n64_timerfd_settime" }, /* 5282 */ + { 0, 0, printargs, "n64_signalfd4" }, /* 5283 */ + { 0, 0, printargs, "n64_eventfd2" }, /* 5284 */ + { 0, 0, printargs, "n64_epoll_create1" }, /* 5285 */ + { 0, 0, printargs, "n64_dup3" }, /* 5286 */ + { 0, 0, printargs, "n64_pipe2" }, /* 5287 */ + { 0, 0, printargs, "n64_inotify_init1" }, /* 5288 */ + { 0, 0, printargs, "n64_preadv" }, /* 5289 */ + { 0, 0, printargs, "n64_pwritev" }, /* 5290 */ + { 0, 0, printargs, "n64_rt_tgsigqueueinfo" }, /* 5291 */ + { 0, 0, printargs, "n64_perf_event_open" }, /* 5292 */ + { 0, 0, printargs, "n64_accept4" }, /* 5293 */ + { 0, 0, printargs, "n64_recvmmsg" }, /* 5294 */ + { 2, 0, printargs, "n64_fanotify_init" }, /* 5295 */ + { 5, 0, printargs, "n64_fanotify_mark" }, /* 5296 */ + { 4, 0, printargs, "n64_prlimit64" }, /* 5297 */ + { 5, TD|TF, printargs, "n64_name_to_handle_at" }, /* 5298 */ + { 3, TD, printargs, "n64_open_by_handle_at" }, /* 5299 */ + { 2, 0, printargs, "n64_clock_adjtime" }, /* 5300 */ + { 1, TD, printargs, "n64_syncfs" }, /* 5301 */ + { 4, TN, printargs, "n64_sendmmsg" }, /* 5302 */ + { 2, TD, printargs, "n64_setns" }, /* 5303 */ + { 6, 0, printargs, "n64_process_vm_readv" }, /* 5304 */ + { 6, 0, printargs, "n64_process_vm_writev" }, /* 5305 */ + { 5, 0, printargs, "kcmp" }, /* 5306 */ + { 3, TD, printargs, "finit_module" }, /* 5307 */ +#endif + [5308 ... 5999] = { }, /* 5999 */ /* end of Linux N64 */ diff --git a/alice-strace/linux/mips/syscallent-o32.h b/alice-strace/linux/mips/syscallent-o32.h new file mode 100644 index 0000000..c23ac14 --- /dev/null +++ b/alice-strace/linux/mips/syscallent-o32.h @@ -0,0 +1,703 @@ +#if defined LINUX_MIPSO32 + /* For an O32 strace, decode the o32 syscalls. */ + { MA, 0, printargs, "syscall" }, /* 4000 */ /* start of Linux o32 */ + { 1, TP, sys_exit, "exit" }, /* 4001 */ + { 0, TP, sys_fork, "fork" }, /* 4002 */ + { 3, TD, sys_read, "read" }, /* 4003 */ + { 3, TD, sys_write, "write" }, /* 4004 */ + { 3, TD|TF, sys_open, "open" }, /* 4005 */ + { 1, TD, sys_close, "close" }, /* 4006 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 4007 */ + { 2, TD|TF, sys_creat, "creat" }, /* 4008 */ + { 2, TF, sys_link, "link" }, /* 4009 */ + { 1, TF, sys_unlink, "unlink" }, /* 4010 */ + { 3, TF|TP, sys_execve, "execve" }, /* 4011 */ + { 1, TF, sys_chdir, "chdir" }, /* 4012 */ + { 1, 0, sys_time, "time" }, /* 4013 */ + { 3, TF, sys_mknod, "mknod" }, /* 4014 */ + { 2, TF, sys_chmod, "chmod" }, /* 4015 */ + { 3, TF, sys_chown, "lchown" }, /* 4016 */ + { 0, TM, sys_break, "break" }, /* 4017 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 4018 */ + { 3, TD, sys_lseek, "lseek" }, /* 4019 */ + { 0, 0, sys_getpid, "getpid" }, /* 4020 */ + { 5, TF, sys_mount, "mount" }, /* 4021 */ + { 1, TF, sys_umount, "umount" }, /* 4022 */ + { 1, 0, sys_setuid, "setuid" }, /* 4023 */ + { 0, NF, sys_getuid, "getuid" }, /* 4024 */ + { 1, 0, sys_stime, "stime" }, /* 4025 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 4026 */ + { 1, 0, sys_alarm, "alarm" }, /* 4027 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 4028 */ + { 0, TS, sys_pause, "pause" }, /* 4029 */ + { 2, TF, sys_utime, "utime" }, /* 4030 */ + { 0, 0, sys_stty, "stty" }, /* 4031 */ + { 0, 0, sys_gtty, "gtty" }, /* 4032 */ + { 2, TF, sys_access, "access" }, /* 4033 */ + { 1, 0, sys_nice, "nice" }, /* 4034 */ + { 1, 0, sys_ftime, "ftime" }, /* 4035 */ + { 0, 0, sys_sync, "sync" }, /* 4036 */ + { 2, TS, sys_kill, "kill" }, /* 4037 */ + { 2, TF, sys_rename, "rename" }, /* 4038 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 4039 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 4040 */ + { 1, TD, sys_dup, "dup" }, /* 4041 */ + { 1, TD, sys_pipe, "pipe" }, /* 4042 */ + { 1, 0, sys_times, "times" }, /* 4043 */ + { 0, 0, sys_prof, "prof" }, /* 4044 */ + { 1, TM, sys_brk, "brk" }, /* 4045 */ + { 1, 0, sys_setgid, "setgid" }, /* 4046 */ + { 0, NF, sys_getgid, "getgid" }, /* 4047 */ + { 1, TS, sys_signal, "signal" }, /* 4048 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 4049 */ + { 0, NF, sys_getegid, "getegid" }, /* 4050 */ + { 1, TF, sys_acct, "acct" }, /* 4051 */ + { 2, TF, sys_umount2, "umount2" }, /* 4052 */ + { 0, 0, sys_lock, "lock" }, /* 4053 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 4054 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 4055 */ + { 0, 0, sys_mpx, "mpx" }, /* 4056 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 4057 */ + { 0, 0, sys_ulimit, "ulimit" }, /* 4058 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 4059 */ + { 1, 0, sys_umask, "umask" }, /* 4060 */ + { 1, TF, sys_chroot, "chroot" }, /* 4061 */ + { 2, 0, sys_ustat, "ustat" }, /* 4062 */ + { 2, TD, sys_dup2, "dup2" }, /* 4063 */ + { 0, 0, sys_getppid, "getppid" }, /* 4064 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 4065 */ + { 0, 0, sys_setsid, "setsid" }, /* 4066 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 4067 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 4068 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 4069 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 4070 */ + { 2, 0, sys_setregid, "setregid" }, /* 4071 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 4072 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 4073 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 4074 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 4075 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 4076 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 4077 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 4078 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 4079 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 4080 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 4081 */ + { 0, 0, printargs, "reserved82" }, /* 4082 */ + { 2, TF, sys_symlink, "symlink" }, /* 4083 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 4084 */ + { 3, TF, sys_readlink, "readlink" }, /* 4085 */ + { 1, TF, sys_uselib, "uselib" }, /* 4086 */ + { 2, TF, sys_swapon, "swapon" }, /* 4087 */ + { 4, 0, sys_reboot, "reboot" }, /* 4088 */ + { 3, TD, sys_readdir, "readdir" }, /* 4089 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 4090 */ + { 2, TM, sys_munmap, "munmap" }, /* 4091 */ + { 2, TF, sys_truncate, "truncate" }, /* 4092 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 4093 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 4094 */ + { 3, TD, sys_fchown, "fchown" }, /* 4095 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 4096 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 4097 */ + { 0, 0, sys_profil, "profil" }, /* 4098 */ + { 3, TF, sys_statfs, "statfs" }, /* 4099 */ + { 3, TD, sys_fstatfs, "fstatfs" }, /* 4100 */ + { 0, 0, sys_ioperm, "ioperm" }, /* 4101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 4102 */ + { 3, 0, sys_syslog, "syslog" }, /* 4103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 4104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 4105 */ + { 2, TF, sys_stat, "stat" }, /* 4106 */ + { 2, TF, sys_lstat, "lstat" }, /* 4107 */ + { 2, TD, sys_fstat, "fstat" }, /* 4108 */ + { 1, 0, sys_olduname, "olduname" }, /* 4109 */ + { 0, 0, sys_iopl, "iopl" }, /* 4110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 4111 */ + { 0, 0, sys_idle, "idle" }, /* 4112 */ + { 5, 0, sys_vm86old, "vm86" }, /* 4113 */ + { 4, TP, sys_wait4, "wait4" }, /* 4114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 4115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 4116 */ + { 6, TI, sys_ipc, "ipc" }, /* 4117 */ + { 1, TD, sys_fsync, "fsync" }, /* 4118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 4119 */ + { 5, TP, sys_clone, "clone" }, /* 4120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 4121 */ + { 1, 0, sys_uname, "uname" }, /* 4122 */ + { 0, 0, sys_modify_ldt, "modify_ldt" }, /* 4123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 4124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 4125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 4126 */ + { 2, 0, sys_create_module, "create_module" }, /* 4127 */ + { 3, 0, sys_init_module, "init_module" }, /* 4128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 4129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 4130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 4131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 4132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 4133 */ + { 2, 0, sys_bdflush, "bdflush" }, /* 4134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 4135 */ + { 1, 0, sys_personality, "personality" }, /* 4136 */ + { 0, 0, sys_afs_syscall, "afs_syscall" }, /* 4137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 4138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 4139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 4140 */ + { 3, TD, sys_getdents, "getdents" }, /* 4141 */ + { 5, TD, sys_select, "_newselect" }, /* 4142 */ + { 2, TD, sys_flock, "flock" }, /* 4143 */ + { 3, TM, sys_msync, "msync" }, /* 4144 */ + { 3, TD, sys_readv, "readv" }, /* 4145 */ + { 3, TD, sys_writev, "writev" }, /* 4146 */ + { 3, 0, printargs, "cacheflush" }, /* 4147 */ + { 3, 0, printargs, "cachectl" }, /* 4148 */ + { 4, 0, sys_sysmips, "sysmips" }, /* 4149 */ + { 0, 0, sys_setup, "setup" }, /* 4150 */ + { 1, 0, sys_getsid, "getsid" }, /* 4151 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 4152 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 4153 */ + { 2, TM, sys_mlock, "mlock" }, /* 4154 */ + { 2, TM, sys_munlock, "munlock" }, /* 4155 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 4156 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 4157 */ + { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 4158 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 4159 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 4160 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 4161 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 4162 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 4163 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 4164 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 4165 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 4166 */ + { 5, TM, sys_mremap, "mremap" }, /* 4167 */ + { 3, TN, sys_accept, "accept" }, /* 4168 */ + { 3, TN, sys_bind, "bind" }, /* 4169 */ + { 3, TN, sys_connect, "connect" }, /* 4170 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 4171 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 4172 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 4173 */ + { 2, TN, sys_listen, "listen" }, /* 4174 */ + { 4, TN, sys_recv, "recv" }, /* 4175 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 4176 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 4177 */ + { 4, TN, sys_send, "send" }, /* 4178 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 4179 */ + { 6, TN, sys_sendto, "sendto" }, /* 4180 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 4181 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 4182 */ + { 3, TN, sys_socket, "socket" }, /* 4183 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 4184 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 4185 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 4186 */ + { 5, 0, sys_query_module, "query_module" }, /* 4187 */ + { 3, TD, sys_poll, "poll" }, /* 4188 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 4189 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 4190 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 4191 */ + { 5, 0, sys_prctl, "prctl" }, /* 4192 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 4193 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 4194 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 4195 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 4196 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 4197 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 4198 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 4199 */ + { 6, TD, sys_pread, "pread64" }, /* 4200 */ + { 6, TD, sys_pwrite, "pwrite64" }, /* 4201 */ + { 3, TF, sys_chown, "chown" }, /* 4202 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 4203 */ + { 2, 0, sys_capget, "capget" }, /* 4204 */ + { 2, 0, sys_capset, "capset" }, /* 4205 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 4206 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 4207 */ + { 5, TN, printargs, "getpmsg" }, /* 4208 */ + { 5, TN, printargs, "putpmsg" }, /* 4209 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 4210 */ + { 4, TF, sys_truncate64, "truncate64" }, /* 4211 */ + { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 4212 */ + { 2, TF, sys_stat64, "stat64" }, /* 4213 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 4214 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 4215 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 4216 */ + { 3, TM, sys_mincore, "mincore" }, /* 4217 */ + { 3, TM, sys_madvise, "madvise" }, /* 4218 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 4219 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 4220 */ + { 0, 0, NULL, NULL }, /* 4221 */ + { 0, 0, sys_gettid, "gettid" }, /* 4222 */ + { 5, TD, sys_readahead, "readahead" }, /* 4223 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 4224 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 4225 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 4226 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 4227 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 4228 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 4229 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 4230 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 4231 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 4232 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 4233 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 4234 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 4235 */ + { 2, TS, sys_kill, "tkill" }, /* 4236 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 4237 */ + { 6, 0, sys_futex, "futex" }, /* 4238 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 4239 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 4240 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 4241 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 4242 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4243 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 4244 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 4245 */ + { 1, TP, sys_exit, "exit_group" }, /* 4246 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 4247 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 4248 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 4249 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 4250 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 4251 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 4252 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 4253 */ + { 7, TD, sys_fadvise64_64, "fadvise64_64" }, /* 4254 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 4255 */ + { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 4256 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 4257 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 4258 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 4259 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 4260 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 4261 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 4262 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 4263 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 4264 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 4265 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 4266 */ + { 2, TF, sys_utimes, "utimes" }, /* 4267 */ + { 4, TM, sys_mbind, "mbind" }, /* 4268 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 4269 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 4270 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 4271 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 4272 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 4273 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 4274 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 4275 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 4276 */ + { 5, 0, sys_vserver, "vserver" }, /* 4277 */ + { 5, TP, sys_waitid, "waitid" }, /* 4278 */ + { 0, 0, NULL, NULL }, /* 4279 */ + { 5, 0, sys_add_key, "add_key" }, /* 4280 */ + { 4, 0, sys_request_key, "request_key" }, /* 4281 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 4282 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 4283 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 4284 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 4285 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 4286 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 4287 */ + { 4, TD|TF, sys_openat, "openat" }, /* 4288 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 4289 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 4290 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 4291 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 4292 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 4293 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 4294 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 4295 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 4296 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 4297 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 4298 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 4299 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 4300 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 4301 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 4302 */ + { 1, TP, sys_unshare, "unshare" }, /* 4303 */ + { 6, TD, sys_splice, "splice" }, /* 4304 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 4305 */ + { 4, TD, sys_tee, "tee" }, /* 4306 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 4307 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 4308 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 4309 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 4310 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 4311 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 4312 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 4313 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 4314 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 4315 */ + { 4, 0, printargs, "utimensat" }, /* 4316 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 4317 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 4318 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 4319 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 4320 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 4321 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 4322 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 4323 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 4324 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 4325 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 4326 */ + { 3, TD, sys_dup3, "dup3" }, /* 4327 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 4328 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 4329 */ + { 6, TD, sys_preadv, "preadv" }, /* 4330 */ + { 6, TD, sys_pwritev, "pwritev" }, /* 4331 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 4332 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 4333 */ + { 4, TN, sys_accept4, "accept4" }, /* 4334 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 4335 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 4336 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 4337 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 4338 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 4339 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 4340 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 4341 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 4342 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 4343 */ + { 2, TD, sys_setns, "setns" }, /* 4344 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 4345 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 4346 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 4347 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 4348 */ +#else + { 0, 0, printargs, "o32_syscall" }, /* 4000 */ + { 0, 0, printargs, "o32_exit" }, /* 4001 */ + { 0, 0, printargs, "o32_fork" }, /* 4002 */ + { 0, 0, printargs, "o32_read" }, /* 4003 */ + { 0, 0, printargs, "o32_write" }, /* 4004 */ + { 0, 0, printargs, "o32_open" }, /* 4005 */ + { 0, 0, printargs, "o32_close" }, /* 4006 */ + { 0, 0, printargs, "o32_waitpid" }, /* 4007 */ + { 0, 0, printargs, "o32_creat" }, /* 4008 */ + { 0, 0, printargs, "o32_link" }, /* 4009 */ + { 0, 0, printargs, "o32_unlink" }, /* 4010 */ + { 0, 0, printargs, "o32_execve" }, /* 4011 */ + { 0, 0, printargs, "o32_chdir" }, /* 4012 */ + { 0, 0, printargs, "o32_time" }, /* 4013 */ + { 0, 0, printargs, "o32_mknod" }, /* 4014 */ + { 0, 0, printargs, "o32_chmod" }, /* 4015 */ + { 0, 0, printargs, "o32_lchown" }, /* 4016 */ + { 0, TM, printargs, "o32_break" }, /* 4017 */ + { 0, 0, printargs, "o32_oldstat" }, /* 4018 */ + { 0, 0, printargs, "o32_lseek" }, /* 4019 */ + { 0, 0, printargs, "o32_getpid" }, /* 4020 */ + { 0, 0, printargs, "o32_mount" }, /* 4021 */ + { 0, 0, printargs, "o32_umount" }, /* 4022 */ + { 0, 0, printargs, "o32_setuid" }, /* 4023 */ + { 0, 0, printargs, "o32_getuid" }, /* 4024 */ + { 0, 0, printargs, "o32_stime" }, /* 4025 */ + { 0, 0, printargs, "o32_ptrace" }, /* 4026 */ + { 0, 0, printargs, "o32_alarm" }, /* 4027 */ + { 0, 0, printargs, "o32_oldfstat" }, /* 4028 */ + { 0, 0, printargs, "o32_pause" }, /* 4029 */ + { 0, 0, printargs, "o32_utime" }, /* 4030 */ + { 0, 0, printargs, "o32_stty" }, /* 4031 */ + { 0, 0, printargs, "o32_gtty" }, /* 4032 */ + { 0, 0, printargs, "o32_access" }, /* 4033 */ + { 0, 0, printargs, "o32_nice" }, /* 4034 */ + { 0, 0, printargs, "o32_ftime" }, /* 4035 */ + { 0, 0, printargs, "o32_sync" }, /* 4036 */ + { 0, 0, printargs, "o32_kill" }, /* 4037 */ + { 0, 0, printargs, "o32_rename" }, /* 4038 */ + { 0, 0, printargs, "o32_mkdir" }, /* 4039 */ + { 0, 0, printargs, "o32_rmdir" }, /* 4040 */ + { 0, 0, printargs, "o32_dup" }, /* 4041 */ + { 0, 0, printargs, "o32_pipe" }, /* 4042 */ + { 0, 0, printargs, "o32_times" }, /* 4043 */ + { 0, 0, printargs, "o32_prof" }, /* 4044 */ + { 0, TM, printargs, "o32_brk" }, /* 4045 */ + { 0, 0, printargs, "o32_setgid" }, /* 4046 */ + { 0, 0, printargs, "o32_getgid" }, /* 4047 */ + { 0, 0, printargs, "o32_signal" }, /* 4048 */ + { 0, 0, printargs, "o32_geteuid" }, /* 4049 */ + { 0, 0, printargs, "o32_getegid" }, /* 4050 */ + { 0, 0, printargs, "o32_acct" }, /* 4051 */ + { 0, 0, printargs, "o32_umount2" }, /* 4052 */ + { 0, 0, printargs, "o32_lock" }, /* 4053 */ + { 0, 0, printargs, "o32_ioctl" }, /* 4054 */ + { 0, 0, printargs, "o32_fcntl" }, /* 4055 */ + { 0, 0, printargs, "o32_mpx" }, /* 4056 */ + { 0, 0, printargs, "o32_setpgid" }, /* 4057 */ + { 0, 0, printargs, "o32_ulimit" }, /* 4058 */ + { 0, 0, printargs, "o32_oldolduname" }, /* 4059 */ + { 0, 0, printargs, "o32_umask" }, /* 4060 */ + { 0, 0, printargs, "o32_chroot" }, /* 4061 */ + { 0, 0, printargs, "o32_ustat" }, /* 4062 */ + { 0, 0, printargs, "o32_dup2" }, /* 4063 */ + { 0, 0, printargs, "o32_getppid" }, /* 4064 */ + { 0, 0, printargs, "o32_getpgrp" }, /* 4065 */ + { 0, 0, printargs, "o32_setsid" }, /* 4066 */ + { 0, 0, printargs, "o32_sigaction" }, /* 4067 */ + { 0, 0, printargs, "o32_siggetmask" }, /* 4068 */ + { 0, 0, printargs, "o32_sigsetmask" }, /* 4069 */ + { 0, 0, printargs, "o32_setreuid" }, /* 4070 */ + { 0, 0, printargs, "o32_setregid" }, /* 4071 */ + { 0, 0, printargs, "o32_sigsuspend" }, /* 4072 */ + { 0, 0, printargs, "o32_sigpending" }, /* 4073 */ + { 0, 0, printargs, "o32_sethostname" }, /* 4074 */ + { 0, 0, printargs, "o32_setrlimit" }, /* 4075 */ + { 0, 0, printargs, "o32_getrlimit" }, /* 4076 */ + { 0, 0, printargs, "o32_getrusage" }, /* 4077 */ + { 0, 0, printargs, "o32_gettimeofday" }, /* 4078 */ + { 0, 0, printargs, "o32_settimeofday" }, /* 4079 */ + { 0, 0, printargs, "o32_getgroups" }, /* 4080 */ + { 0, 0, printargs, "o32_setgroups" }, /* 4081 */ + { 0, 0, printargs, "o32_reserved82" }, /* 4082 */ + { 0, 0, printargs, "o32_symlink" }, /* 4083 */ + { 0, 0, printargs, "o32_oldlstat" }, /* 4084 */ + { 0, 0, printargs, "o32_readlink" }, /* 4085 */ + { 0, 0, printargs, "o32_uselib" }, /* 4086 */ + { 0, 0, printargs, "o32_swapon" }, /* 4087 */ + { 0, 0, printargs, "o32_reboot" }, /* 4088 */ + { 0, 0, printargs, "o32_readdir" }, /* 4089 */ + { 0, TD|TM, printargs, "o32_mmap" }, /* 4090 */ + { 0, TM, printargs, "o32_munmap" }, /* 4091 */ + { 0, 0, printargs, "o32_truncate" }, /* 4092 */ + { 0, 0, printargs, "o32_ftruncate" }, /* 4093 */ + { 0, 0, printargs, "o32_fchmod" }, /* 4094 */ + { 0, 0, printargs, "o32_fchown" }, /* 4095 */ + { 0, 0, printargs, "o32_getpriority" }, /* 4096 */ + { 0, 0, printargs, "o32_setpriority" }, /* 4097 */ + { 0, 0, printargs, "o32_profil" }, /* 4098 */ + { 0, 0, printargs, "o32_statfs" }, /* 4099 */ + { 0, 0, printargs, "o32_fstatfs" }, /* 4100 */ + { 0, 0, printargs, "o32_ioperm" }, /* 4101 */ + { 0, 0, printargs, "o32_socketcall" }, /* 4102 */ + { 0, 0, printargs, "o32_syslog" }, /* 4103 */ + { 0, 0, printargs, "o32_setitimer" }, /* 4104 */ + { 0, 0, printargs, "o32_getitimer" }, /* 4105 */ + { 0, 0, printargs, "o32_stat" }, /* 4106 */ + { 0, 0, printargs, "o32_lstat" }, /* 4107 */ + { 0, 0, printargs, "o32_fstat" }, /* 4108 */ + { 0, 0, printargs, "o32_olduname" }, /* 4109 */ + { 0, 0, printargs, "o32_iopl" }, /* 4110 */ + { 0, 0, printargs, "o32_vhangup" }, /* 4111 */ + { 0, 0, printargs, "o32_idle" }, /* 4112 */ + { 0, 0, printargs, "o32_vm86" }, /* 4113 */ + { 0, 0, printargs, "o32_wait4" }, /* 4114 */ + { 0, 0, printargs, "o32_swapoff" }, /* 4115 */ + { 0, 0, printargs, "o32_sysinfo" }, /* 4116 */ + { 0, 0, printargs, "o32_ipc" }, /* 4117 */ + { 0, 0, printargs, "o32_fsync" }, /* 4118 */ + { 0, 0, printargs, "o32_sigreturn" }, /* 4119 */ + { 0, 0, printargs, "o32_clone" }, /* 4120 */ + { 0, 0, printargs, "o32_setdomainname" }, /* 4121 */ + { 0, 0, printargs, "o32_uname" }, /* 4122 */ + { 0, 0, printargs, "o32_modify_ldt" }, /* 4123 */ + { 0, 0, printargs, "o32_adjtimex" }, /* 4124 */ + { 0, TM, printargs, "o32_mprotect" }, /* 4125 */ + { 0, 0, printargs, "o32_sigprocmask" }, /* 4126 */ + { 0, 0, printargs, "o32_create_module" }, /* 4127 */ + { 0, 0, printargs, "o32_init_module" }, /* 4128 */ + { 0, 0, printargs, "o32_delete_module" }, /* 4129 */ + { 0, 0, printargs, "o32_get_kernel_syms"}, /* 4130 */ + { 0, TF, printargs, "o32_quotactl" }, /* 4131 */ + { 0, 0, printargs, "o32_getpgid" }, /* 4132 */ + { 0, 0, printargs, "o32_fchdir" }, /* 4133 */ + { 0, 0, printargs, "o32_bdflush" }, /* 4134 */ + { 0, 0, printargs, "o32_sysfs" }, /* 4135 */ + { 0, 0, printargs, "o32_personality" }, /* 4136 */ + { 0, 0, printargs, "o32_afs_syscall" }, /* 4137 */ + { 0, 0, printargs, "o32_setfsuid" }, /* 4138 */ + { 0, 0, printargs, "o32_setfsgid" }, /* 4139 */ + { 0, 0, printargs, "o32__llseek" }, /* 4140 */ + { 0, 0, printargs, "o32_getdents" }, /* 4141 */ + { 0, 0, printargs, "o32__newselect" }, /* 4142 */ + { 0, 0, printargs, "o32_flock" }, /* 4143 */ + { 0, TM, printargs, "o32_msync" }, /* 4144 */ + { 0, 0, printargs, "o32_readv" }, /* 4145 */ + { 0, 0, printargs, "o32_writev" }, /* 4146 */ + { 0, 0, printargs, "o32_cacheflush" }, /* 4147 */ + { 0, 0, printargs, "o32_cachectl" }, /* 4148 */ + { 0, 0, printargs, "o32_sysmips" }, /* 4149 */ + { 0, 0, printargs, "o32_setup" }, /* 4150 */ + { 0, 0, printargs, "o32_getsid" }, /* 4151 */ + { 0, 0, printargs, "o32_fdatasync" }, /* 4152 */ + { 0, 0, printargs, "o32__sysctl" }, /* 4153 */ + { 0, TM, printargs, "o32_mlock" }, /* 4154 */ + { 0, TM, printargs, "o32_munlock" }, /* 4155 */ + { 0, TM, printargs, "o32_mlockall" }, /* 4156 */ + { 0, TM, printargs, "o32_munlockall" }, /* 4157 */ + { 0, 0, printargs, "o32_sched_setparam"}, /* 4158 */ + { 0, 0, printargs, "o32_sched_getparam"}, /* 4159 */ + { 0, 0, printargs, "o32_sched_setscheduler"}, /* 4160 */ + { 0, 0, printargs, "o32_sched_getscheduler"}, /* 4161 */ + { 0, 0, printargs, "o32_sched_yield" }, /* 4162 */ + { 0, 0, printargs, "o32_sched_get_priority_max"}, /* 4163 */ + { 0, 0, printargs, "o32_sched_get_priority_min"},/* 4164 */ + { 0, 0, printargs, "o32_sched_rr_get_interval"}, /* 4165 */ + { 0, 0, printargs, "o32_nanosleep" }, /* 4166 */ + { 0, TM, printargs, "o32_mremap" }, /* 4167 */ + { 0, 0, printargs, "o32_accept" }, /* 4168 */ + { 0, 0, printargs, "o32_bind" }, /* 4169 */ + { 0, 0, printargs, "o32_connect" }, /* 4170 */ + { 0, 0, printargs, "o32_getpeername" }, /* 4171 */ + { 0, 0, printargs, "o32_getsockname" }, /* 4172 */ + { 0, 0, printargs, "o32_getsockopt" }, /* 4173 */ + { 0, 0, printargs, "o32_listen" }, /* 4174 */ + { 0, 0, printargs, "o32_recv" }, /* 4175 */ + { 0, 0, printargs, "o32_recvfrom" }, /* 4176 */ + { 0, 0, printargs, "o32_recvmsg" }, /* 4177 */ + { 0, 0, printargs, "o32_send" }, /* 4178 */ + { 0, 0, printargs, "o32_sendmsg" }, /* 4179 */ + { 0, 0, printargs, "o32_sendto" }, /* 4180 */ + { 0, 0, printargs, "o32_setsockopt" }, /* 4181 */ + { 0, 0, printargs, "o32_shutdown" }, /* 4182 */ + { 0, 0, printargs, "o32_socket" }, /* 4183 */ + { 0, 0, printargs, "o32_socketpair" }, /* 4184 */ + { 0, 0, printargs, "o32_setresuid" }, /* 4185 */ + { 0, 0, printargs, "o32_getresuid" }, /* 4186 */ + { 0, 0, printargs, "o32_query_module" }, /* 4187 */ + { 0, 0, printargs, "o32_poll" }, /* 4188 */ + { 0, 0, printargs, "o32_nfsservctl" }, /* 4189 */ + { 0, 0, printargs, "o32_setresgid" }, /* 4190 */ + { 0, 0, printargs, "o32_getresgid" }, /* 4191 */ + { 0, 0, printargs, "o32_prctl" }, /* 4192 */ + { 0, 0, printargs, "o32_rt_sigreturn" }, /* 4193 */ + { 0, 0, printargs, "o32_rt_sigaction" }, /* 4194 */ + { 0, 0, printargs, "o32_rt_sigprocmask"}, /* 4195 */ + { 0, 0, printargs, "o32_rt_sigpending" }, /* 4196 */ + { 0, 0, printargs, "o32_rt_sigtimedwait"},/* 4197 */ + { 0, 0, printargs, "o32_rt_sigqueueinfo"},/* 4198 */ + { 0, 0, printargs, "o32_rt_siguspend" }, /* 4199 */ + { 0, 0, printargs, "o32_pread64" }, /* 4200 */ + { 0, 0, printargs, "o32_pwrite64" }, /* 4201 */ + { 0, 0, printargs, "o32_chown" }, /* 4202 */ + { 0, 0, printargs, "o32_getcwd" }, /* 4203 */ + { 0, 0, printargs, "o32_capget" }, /* 4204 */ + { 0, 0, printargs, "o32_capset" }, /* 4205 */ + { 0, 0, printargs, "o32_sigaltstack" }, /* 4206 */ + { 0, 0, printargs, "o32_sendfile" }, /* 4207 */ + { 5, TN, printargs, "o32_getpmsg" }, /* 4208 */ + { 5, TN, printargs, "o32_putpmsg" }, /* 4209 */ + { 6, TD|TM, printargs, "o32_mmap2" }, /* 4210 */ + { 0, 0, printargs, "o32_truncate64" }, /* 4211 */ + { 0, 0, printargs, "o32_ftruncate64" }, /* 4212 */ + { 0, 0, printargs, "o32_stat64" }, /* 4213 */ + { 0, 0, printargs, "o32_lstat64" }, /* 4214 */ + { 0, 0, printargs, "o32_fstat64" }, /* 4215 */ + { 0, 0, printargs, "o32_pivot_root" }, /* 4216 */ + { 0, TM, printargs, "o32_mincore" }, /* 4217 */ + { 0, TM, printargs, "o32_madvise" }, /* 4218 */ + { 0, 0, printargs, "o32_getdents64" }, /* 4219 */ + { 0, 0, printargs, "o32_fcntl64" }, /* 4220 */ + { 0, 0, NULL, NULL }, /* 4221 */ + { 0, 0, printargs, "o32_gettid" }, /* 4222 */ + { 5, TD, printargs, "o32_readahead" }, /* 4223 */ + { 5, TF, printargs, "o32_setxattr" }, /* 4224 */ + { 5, TF, printargs, "o32_lsetxattr" }, /* 4225 */ + { 5, TD, printargs, "o32_fsetxattr" }, /* 4226 */ + { 4, TF, printargs, "o32_getxattr" }, /* 4227 */ + { 4, TF, printargs, "o32_lgetxattr" }, /* 4228 */ + { 4, TD, printargs, "o32_fgetxattr" }, /* 4229 */ + { 3, TF, printargs, "o32_listxattr" }, /* 4230 */ + { 3, TF, printargs, "o32_llistxattr" }, /* 4231 */ + { 3, TD, printargs, "o32_flistxattr" }, /* 4232 */ + { 2, TF, printargs, "o32_removexattr" }, /* 4233 */ + { 2, TF, printargs, "o32_lremovexattr" }, /* 4234 */ + { 2, TD, printargs, "o32_fremovexattr" }, /* 4235 */ + { 2, TS, printargs, "o32_tkill" }, /* 4236 */ + { 5, TD|TN, printargs, "o32_sendfile64" }, /* 4237 */ + { 6, 0, printargs, "o32_futex" }, /* 4238 */ + { 3, 0, printargs, "o32_sched_setaffinity"}, /* 4239 */ + { 3, 0, printargs, "o32_sched_getaffinity"}, /* 4240 */ + { 2, 0, printargs, "o32_io_setup" }, /* 4241 */ + { 1, 0, printargs, "o32_io_destroy" }, /* 4242 */ + { 5, 0, printargs, "o32_io_getevents" }, /* 4243 */ + { 3, 0, printargs, "o32_io_submit" }, /* 4244 */ + { 3, 0, printargs, "o32_io_cancel" }, /* 4245 */ + { 1, TP, printargs, "o32_exit_group" }, /* 4246 */ + { 3, 0, printargs, "o32_lookup_dcookie"}, /* 4247 */ + { 1, TD, printargs, "o32_epoll_create" }, /* 4248 */ + { 4, TD, printargs, "o32_epoll_ctl" }, /* 4249 */ + { 4, TD, printargs, "o32_epoll_wait" }, /* 4250 */ + { 5, TM, printargs, "o32_remap_file_pages"}, /* 4251 */ + { 1, 0, printargs, "o32_set_tid_address"}, /* 4252 */ + { 0, 0, printargs, "o32_restart_syscall"}, /* 4253 */ + { MA, 0, printargs, "o32_fadvise64_64" }, /* 4254 */ + { 3, TF, printargs, "o32_statfs64" }, /* 4255 */ + { 2, TD, printargs, "o32_fstatfs64" }, /* 4256 */ + { 3, 0, printargs, "o32_timer_create" }, /* 4257 */ + { 4, 0, printargs, "o32_timer_settime" }, /* 4258 */ + { 2, 0, printargs, "o32_timer_gettime" }, /* 4259 */ + { 1, 0, printargs, "o32_timer_getoverrun"}, /* 4260 */ + { 1, 0, printargs, "o32_timer_delete" }, /* 4261 */ + { 2, 0, printargs, "o32_clock_settime" }, /* 4262 */ + { 2, 0, printargs, "o32_clock_gettime" }, /* 4263 */ + { 2, 0, printargs, "o32_clock_getres" }, /* 4264 */ + { 4, 0, printargs, "o32_clock_nanosleep"}, /* 4265 */ + { 3, TS, printargs, "o32_tgkill" }, /* 4266 */ + { 2, TF, printargs, "o32_utimes" }, /* 4267 */ + { 4, TM, printargs, "o32_mbind" }, /* 4268 */ + { 5, TM, printargs, "o32_get_mempolicy" }, /* 4269 */ + { 3, TM, printargs, "o32_set_mempolicy" }, /* 4270 */ + { 4, 0, printargs, "o32_mq_open" }, /* 4271 */ + { 1, 0, printargs, "o32_mq_unlink" }, /* 4272 */ + { 5, 0, printargs, "o32_mq_timedsend" }, /* 4273 */ + { 5, 0, printargs, "o32_mq_timedreceive"}, /* 4274 */ + { 2, 0, printargs, "o32_mq_notify" }, /* 4275 */ + { 3, 0, printargs, "o32_mq_getsetattr" }, /* 4276 */ + { 5, 0, printargs, "o32_vserver" }, /* 4277 */ + { 5, TP, printargs, "o32_waitid" }, /* 4278 */ + { 0, 0, printargs, "o32_SYS_4279" }, /* 4279 */ + { 5, 0, printargs, "o32_add_key" }, /* 4280 */ + { 4, 0, printargs, "o32_request_key" }, /* 4281 */ + { 5, 0, printargs, "o32_keyctl" }, /* 4282 */ + { 1, 0, printargs, "o32_set_thread_area" }, /* 4283 */ + { 0, TD, printargs, "o32_inotify_init" }, /* 4284 */ + { 3, TD, printargs, "o32_inotify_add_watch" }, /* 4285 */ + { 2, TD, printargs, "o32_inotify_rm_watch" }, /* 4286 */ + { 4, TM, printargs, "o32_migrate_pages" }, /* 4287 */ + { 4, TD|TF, printargs, "o32_openat" }, /* 4288 */ + { 3, TD|TF, printargs, "o32_mkdirat" }, /* 4289 */ + { 4, TD|TF, printargs, "o32_mknodat" }, /* 4290 */ + { 5, TD|TF, printargs, "o32_fchownat" }, /* 4291 */ + { 3, TD|TF, printargs, "o32_futimesat" }, /* 4292 */ + { 4, TD|TF, printargs, "o32_fstatat64" }, /* 4293 */ + { 3, TD|TF, printargs, "o32_unlinkat" }, /* 4294 */ + { 4, TD|TF, printargs, "o32_renameat" }, /* 4295 */ + { 5, TD|TF, printargs, "o32_linkat" }, /* 4296 */ + { 3, TD|TF, printargs, "o32_symlinkat" }, /* 4297 */ + { 4, TD|TF, printargs, "o32_readlinkat" }, /* 4298 */ + { 3, TD|TF, printargs, "o32_fchmodat" }, /* 4299 */ + { 3, TD|TF, printargs, "o32_faccessat" }, /* 4300 */ + { 6, TD, printargs, "o32_pselect6" }, /* 4301 */ + { 5, TD, printargs, "o32_ppoll" }, /* 4302 */ + { 1, TP, printargs, "o32_unshare" }, /* 4303 */ + { 6, TD, printargs, "o32_splice" }, /* 4304 */ + { 4, TD, printargs, "o32_sync_file_range" }, /* 4305 */ + { 4, TD, printargs, "o32_tee" }, /* 4306 */ + { 4, TD, printargs, "o32_vmsplice" }, /* 4307 */ + { 6, TM, printargs, "o32_move_pages" }, /* 4308 */ + { 2, 0, printargs, "o32_set_robust_list" }, /* 4309 */ + { 3, 0, printargs, "o32_get_robust_list" }, /* 4310 */ + { 4, 0, printargs, "o32_kexec_load" }, /* 4311 */ + { 3, 0, printargs, "o32_getcpu" }, /* 4312 */ + { 5, TD, printargs, "o32_epoll_pwait" }, /* 4313 */ + { 3, 0, printargs, "o32_ioprio_set" }, /* 4314 */ + { 2, 0, printargs, "o32_ioprio_get" }, /* 4315 */ + { 4, 0, printargs, "o32_utimensat" }, /* 4316 */ + { 3, TD|TS, printargs, "o32_signalfd" }, /* 4317 */ + { 4, TD, printargs, "o32_timerfd" }, /* 4318 */ + { 1, TD, printargs, "o32_eventfd" }, /* 4319 */ + { 6, TD, printargs, "o32_fallocate" }, /* 4320 */ + { 2, TD, printargs, "o32_timerfd_create" }, /* 4321 */ + { 2, TD, printargs, "o32_timerfd_gettime" }, /* 4322 */ + { 4, TD, printargs, "o32_timerfd_settime" }, /* 4323 */ + { 4, TD|TS, printargs, "o32_signalfd4" }, /* 4324 */ + { 2, TD, printargs, "o32_eventfd2" }, /* 4325 */ + { 1, TD, printargs, "o32_epoll_create1" }, /* 4326 */ + { 3, TD, printargs, "o32_dup3" }, /* 4327 */ + { 2, TD, printargs, "o32_pipe2" }, /* 4328 */ + { 1, TD, printargs, "o32_inotify_init1" }, /* 4329 */ + { 6, TD, printargs, "o32_preadv" }, /* 4330 */ + { 6, TD, printargs, "o32_pwritev" }, /* 4331 */ + { 4, TP|TS, printargs, "o32_rt_tgsigqueueinfo" }, /* 4332 */ + { 5, TD, printargs, "o32_perf_event_open" }, /* 4333 */ + { 4, TN, printargs, "o32_accept4" }, /* 4334 */ + { 5, TN, printargs, "o32_recvmmsg" }, /* 4335 */ + { 2, TD, printargs, "o32_fanotify_init" }, /* 4336 */ + { 5, TD|TF, printargs, "o32_fanotify_mark" }, /* 4337 */ + { 4, 0, printargs, "o32_prlimit64" }, /* 4338 */ + { 5, TD|TF, printargs, "o32_name_to_handle_at"}, /* 4339 */ + { 3, TD, printargs, "o32_open_by_handle_at"}, /* 4340 */ + { 2, 0, printargs, "o32_clock_adjtime" }, /* 4341 */ + { 1, TD, printargs, "o32_syncfs" }, /* 4342 */ + { 4, TN, printargs, "o32_sendmmsg" }, /* 4343 */ + { 2, TD, printargs, "o32_setns" }, /* 4344 */ + { 6, 0, printargs, "o32_process_vm_readv" }, /* 4345 */ + { 6, 0, printargs, "o32_process_vm_writev" }, /* 4346 */ + { 5, 0, printargs, "o32_kcmp" }, /* 4347 */ + { 3, TD, printargs, "o32_finit_module" }, /* 4348 */ +#endif + [4349 ... 4999] = { }, /* 4999 */ /* end of Linux o32 */ diff --git a/alice-strace/linux/mips/syscallent.h b/alice-strace/linux/mips/syscallent.h new file mode 100644 index 0000000..61430d2 --- /dev/null +++ b/alice-strace/linux/mips/syscallent.h @@ -0,0 +1,5 @@ +#include "../dummy.h" +#include "syscallent-compat.h" +#include "syscallent-o32.h" +#include "syscallent-n64.h" +#include "syscallent-n32.h" diff --git a/alice-strace/linux/mtd-abi.h b/alice-strace/linux/mtd-abi.h new file mode 100644 index 0000000..b197861 --- /dev/null +++ b/alice-strace/linux/mtd-abi.h @@ -0,0 +1,278 @@ +/* + * Copyright © 1999-2010 David Woodhouse et al. + * + * 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 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __MTD_ABI_H__ +#define __MTD_ABI_H__ + +#include + +struct erase_info_user { + __u32 start; + __u32 length; +}; + +struct erase_info_user64 { + __u64 start; + __u64 length; +}; + +struct mtd_oob_buf { + __u32 start; + __u32 length; + unsigned char *ptr; +}; + +struct mtd_oob_buf64 { + __u64 start; + __u32 pad; + __u32 length; + __u64 usr_ptr; +}; + +/** + * MTD operation modes + * + * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default) + * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas + * which are defined by the internal ecclayout + * @MTD_OPS_RAW: data are transferred as-is, with no error correction; + * this mode implies %MTD_OPS_PLACE_OOB + * + * These modes can be passed to ioctl(MEMWRITE) and are also used internally. + * See notes on "MTD file modes" for discussion on %MTD_OPS_RAW vs. + * %MTD_FILE_MODE_RAW. + */ +enum { + MTD_OPS_PLACE_OOB = 0, + MTD_OPS_AUTO_OOB = 1, + MTD_OPS_RAW = 2, +}; + +/** + * struct mtd_write_req - data structure for requesting a write operation + * + * @start: start address + * @len: length of data buffer + * @ooblen: length of OOB buffer + * @usr_data: user-provided data buffer + * @usr_oob: user-provided OOB buffer + * @mode: MTD mode (see "MTD operation modes") + * @padding: reserved, must be set to 0 + * + * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB + * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to + * write data-only, set @usr_oob == NULL. However, setting both @usr_data and + * @usr_oob to NULL is not allowed. + */ +struct mtd_write_req { + __u64 start; + __u64 len; + __u64 ooblen; + __u64 usr_data; + __u64 usr_oob; + __u8 mode; + __u8 padding[7]; +}; + +#define MTD_ABSENT 0 +#define MTD_RAM 1 +#define MTD_ROM 2 +#define MTD_NORFLASH 3 +#define MTD_NANDFLASH 4 +#define MTD_DATAFLASH 6 +#define MTD_UBIVOLUME 7 +#define MTD_MLCNANDFLASH 8 + +#define MTD_WRITEABLE 0x400 /* Device is writeable */ +#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ +#define MTD_NO_ERASE 0x1000 /* No erase necessary */ +#define MTD_POWERUP_LOCK 0x2000 /* Always locked after reset */ + +/* Some common devices / combinations of capabilities */ +#define MTD_CAP_ROM 0 +#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) +#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) +#define MTD_CAP_NANDFLASH (MTD_WRITEABLE) + +/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */ +#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) +#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) +#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme +#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read) +#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default + +/* OTP mode selection */ +#define MTD_OTP_OFF 0 +#define MTD_OTP_FACTORY 1 +#define MTD_OTP_USER 2 + +struct mtd_info_user { + __u8 type; + __u32 flags; + __u32 size; /* Total size of the MTD */ + __u32 erasesize; + __u32 writesize; + __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ + __u64 padding; /* Old obsolete field; do not use */ +}; + +struct region_info_user { + __u32 offset; /* At which this region starts, + * from the beginning of the MTD */ + __u32 erasesize; /* For this region */ + __u32 numblocks; /* Number of blocks in this region */ + __u32 regionindex; +}; + +struct otp_info { + __u32 start; + __u32 length; + __u32 locked; +}; + +/* + * Note, the following ioctl existed in the past and was removed: + * #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo) + * Try to avoid adding a new ioctl with the same ioctl number. + */ + +/* Get basic MTD characteristics info (better to use sysfs) */ +#define MEMGETINFO _IOR('M', 1, struct mtd_info_user) +/* Erase segment of MTD */ +#define MEMERASE _IOW('M', 2, struct erase_info_user) +/* Write out-of-band data from MTD */ +#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf) +/* Read out-of-band data from MTD */ +#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) +/* Lock a chip (for MTD that supports it) */ +#define MEMLOCK _IOW('M', 5, struct erase_info_user) +/* Unlock a chip (for MTD that supports it) */ +#define MEMUNLOCK _IOW('M', 6, struct erase_info_user) +/* Get the number of different erase regions */ +#define MEMGETREGIONCOUNT _IOR('M', 7, int) +/* Get information about the erase region for a specific index */ +#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user) +/* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */ +#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) +/* Check if an eraseblock is bad */ +#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t) +/* Mark an eraseblock as bad */ +#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t) +/* Set OTP (One-Time Programmable) mode (factory vs. user) */ +#define OTPSELECT _IOR('M', 13, int) +/* Get number of OTP (One-Time Programmable) regions */ +#define OTPGETREGIONCOUNT _IOW('M', 14, int) +/* Get all OTP (One-Time Programmable) info about MTD */ +#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) +/* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */ +#define OTPLOCK _IOR('M', 16, struct otp_info) +/* Get ECC layout (deprecated) */ +#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user) +/* Get statistics about corrected/uncorrected errors */ +#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) +/* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */ +#define MTDFILEMODE _IO('M', 19) +/* Erase segment of MTD (supports 64-bit address) */ +#define MEMERASE64 _IOW('M', 20, struct erase_info_user64) +/* Write data to OOB (64-bit version) */ +#define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64) +/* Read data from OOB (64-bit version) */ +#define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64) +/* Check if chip is locked (for MTD that supports it) */ +#define MEMISLOCKED _IOR('M', 23, struct erase_info_user) +/* + * Most generic write interface; can write in-band and/or out-of-band in various + * modes (see "struct mtd_write_req"). This ioctl is not supported for flashes + * without OOB, e.g., NOR flash. + */ +#define MEMWRITE _IOWR('M', 24, struct mtd_write_req) + +/* + * Obsolete legacy interface. Keep it in order not to break userspace + * interfaces + */ +struct nand_oobinfo { + __u32 useecc; + __u32 eccbytes; + __u32 oobfree[8][2]; + __u32 eccpos[32]; +}; + +struct nand_oobfree { + __u32 offset; + __u32 length; +}; + +#define MTD_MAX_OOBFREE_ENTRIES 8 +#define MTD_MAX_ECCPOS_ENTRIES 64 +/* + * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl + * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a + * complete set of ECC information. The ioctl truncates the larger internal + * structure to retain binary compatibility with the static declaration of the + * ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of + * the user struct, not the MAX size of the internal struct nand_ecclayout. + */ +struct nand_ecclayout_user { + __u32 eccbytes; + __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES]; + __u32 oobavail; + struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; +}; + +/** + * struct mtd_ecc_stats - error correction stats + * + * @corrected: number of corrected bits + * @failed: number of uncorrectable errors + * @badblocks: number of bad blocks in this partition + * @bbtblocks: number of blocks reserved for bad block tables + */ +struct mtd_ecc_stats { + __u32 corrected; + __u32 failed; + __u32 badblocks; + __u32 bbtblocks; +}; + +/* + * MTD file modes - for read/write access to MTD + * + * @MTD_FILE_MODE_NORMAL: OTP disabled, ECC enabled + * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode + * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode + * @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled + * + * These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained + * separately for each open file descriptor. + * + * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW - + * raw access to the flash, without error correction or autoplacement schemes. + * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode + * (e.g., when using ioctl(MEMWRITE)), but in some cases, the MTD_FILE_MODE is + * used out of necessity (e.g., `write()', ioctl(MEMWRITEOOB64)). + */ +enum mtd_file_modes { + MTD_FILE_MODE_NORMAL = MTD_OTP_OFF, + MTD_FILE_MODE_OTP_FACTORY = MTD_OTP_FACTORY, + MTD_FILE_MODE_OTP_USER = MTD_OTP_USER, + MTD_FILE_MODE_RAW, +}; + +#endif /* __MTD_ABI_H__ */ diff --git a/alice-strace/linux/or1k/ioctlent.h.in b/alice-strace/linux/or1k/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/or1k/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/or1k/syscallent.h b/alice-strace/linux/or1k/syscallent.h new file mode 100644 index 0000000..d112212 --- /dev/null +++ b/alice-strace/linux/or1k/syscallent.h @@ -0,0 +1,262 @@ + { 2, 0, sys_io_setup, "io_setup" }, /* 0 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 2 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 8 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 11 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 14 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 17 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */ + { 1, TD, sys_dup, "dup" }, /* 23 */ + { 3, TD, sys_dup3, "dup3" }, /* 24 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 25 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 29 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */ + { 2, TD, sys_flock, "flock" }, /* 32 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */ + { 2, TF, sys_umount2, "umount" }, /* 39 */ + { 5, TF, sys_mount, "mount" }, /* 40 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 43 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 45 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 47 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */ + { 1, TF, sys_chdir, "chdir" }, /* 49 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 50 */ + { 1, TF, sys_chroot, "chroot" }, /* 51 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */ + { 3, TD, sys_fchown, "fchown" }, /* 55 */ + { 4, TD|TF, sys_openat, "openat" }, /* 56 */ + { 1, TD, sys_close, "close" }, /* 57 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 58 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 59 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 60 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 61 */ + { 5, TD, sys_llseek, "_llseek" }, /* 62 */ + { 3, TD, sys_read, "read" }, /* 63 */ + { 3, TD, sys_write, "write" }, /* 64 */ + { 3, TD, sys_readv, "readv" }, /* 65 */ + { 3, TD, sys_writev, "writev" }, /* 66 */ + { 5, TD, sys_pread, "pread64" }, /* 67 */ + { 5, TD, sys_pwrite, "pwrite64" }, /* 68 */ + { 5, TD, sys_preadv, "preadv" }, /* 69 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 70 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 72 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 73 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */ + { 6, TD, sys_splice, "splice" }, /* 76 */ + { 4, TD, sys_tee, "tee" }, /* 77 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 80 */ + { 0, 0, sys_sync, "sync" }, /* 81 */ + { 1, TD, sys_fsync, "fsync" }, /* 82 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */ + { 1, TF, sys_acct, "acct" }, /* 89 */ + { 2, 0, sys_capget, "capget" }, /* 90 */ + { 2, 0, sys_capset, "capset" }, /* 91 */ + { 1, 0, sys_personality, "personality" }, /* 92 */ + { 1, TP, sys_exit, "exit" }, /* 93 */ + { 1, TP, sys_exit, "exit_group" }, /* 94 */ + { 5, TP, sys_waitid, "waitid" }, /* 95 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */ + { 1, TP, sys_unshare, "unshare" }, /* 97 */ + { 6, 0, sys_futex, "futex" }, /* 98 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 102 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 103 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */ + { 3, 0, sys_init_module, "init_module" }, /* 105 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 106 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 107 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */ + { 3, 0, sys_syslog, "syslog" }, /* 116 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 117 */ + { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 125 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 126 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */ + { 2, TS, sys_kill, "kill" }, /* 129 */ + { 2, TS, sys_kill, "tkill" }, /* 130 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 131 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 140 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 141 */ + { 4, 0, sys_reboot, "reboot" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 1, 0, sys_setgid, "setgid" }, /* 144 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 145 */ + { 1, 0, sys_setuid, "setuid" }, /* 146 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 147 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 148 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 149 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 150 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */ + { 1, 0, sys_times, "times" }, /* 153 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 154 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 155 */ + { 1, 0, sys_getsid, "getsid" }, /* 156 */ + { 0, 0, sys_setsid, "setsid" }, /* 157 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 158 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 159 */ + { 1, 0, sys_uname, "uname" }, /* 160 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 161 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */ + { 2, 0, sys_getrlimit, "oldgetrlimit" }, /* 163 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 165 */ + { 1, 0, sys_umask, "umask" }, /* 166 */ + { 5, 0, sys_prctl, "prctl" }, /* 167 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 168 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */ + { 0, 0, sys_getpid, "getpid" }, /* 172 */ + { 0, 0, sys_getppid, "getppid" }, /* 173 */ + { 0, NF, sys_getuid, "getuid" }, /* 174 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 175 */ + { 0, NF, sys_getgid, "getgid" }, /* 176 */ + { 0, NF, sys_getegid, "getegid" }, /* 177 */ + { 0, 0, sys_gettid, "gettid" }, /* 178 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 180 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */ + { 4, TI, sys_msgget, "msgget" }, /* 186 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 187 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 188 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */ + { 4, TI, sys_semget, "semget" }, /* 190 */ + { 4, TI, sys_semctl, "semctl" }, /* 191 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */ + { 4, TI, sys_semop, "semop" }, /* 193 */ + { 4, TI, sys_shmget, "shmget" }, /* 194 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 4, TI, sys_shmat, "shmat" }, /* 196 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 197 */ + { 3, TN, sys_socket, "socket" }, /* 198 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 199 */ + { 3, TN, sys_bind, "bind" }, /* 200 */ + { 2, TN, sys_listen, "listen" }, /* 201 */ + { 3, TN, sys_accept, "accept" }, /* 202 */ + { 3, TN, sys_connect, "connect" }, /* 203 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 204 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 205 */ + { 6, TN, sys_sendto, "sendto" }, /* 206 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 210 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */ + { 4, TD, sys_readahead, "readahead" }, /* 213 */ + { 1, TM, sys_brk, "brk" }, /* 214 */ + { 2, TM, sys_munmap, "munmap" }, /* 215 */ + { 5, TM, sys_mremap, "mremap" }, /* 216 */ + { 5, 0, sys_add_key, "add_key" }, /* 217 */ + { 4, 0, sys_request_key, "request_key" }, /* 218 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 219 */ + { 5, TP, sys_clone, "clone" }, /* 220 */ + { 3, TF|TP, sys_execve, "execve" }, /* 221 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 222 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 223 */ + { 2, TF, sys_swapon, "swapon" }, /* 224 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ + { 3, TM, sys_msync, "msync" }, /* 227 */ + { 2, TM, sys_mlock, "mlock" }, /* 228 */ + { 2, TM, sys_munlock, "munlock" }, /* 229 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 230 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 231 */ + { 3, TM, sys_mincore, "mincore" }, /* 232 */ + { 3, TM, sys_madvise, "madvise" }, /* 233 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */ + { 6, TM, sys_mbind, "mbind" }, /* 235 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */ + { 5, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 239 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */ + { 4, TN, sys_accept4, "accept4" }, /* 242 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */ + { 6, NF, sys_or1k_atomic, "or1k_atomic" }, /* 244 */ + + [245 ... 259] = { }, + + { 4, TP, sys_wait4, "wait4" }, /* 260 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 267 */ + { 2, TD, sys_setns, "setns" }, /* 268 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 272 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 273 */ diff --git a/alice-strace/linux/powerpc/errnoent1.h b/alice-strace/linux/powerpc/errnoent1.h new file mode 100644 index 0000000..441c66b --- /dev/null +++ b/alice-strace/linux/powerpc/errnoent1.h @@ -0,0 +1 @@ +#include "../errnoent.h" diff --git a/alice-strace/linux/powerpc/ioctlent.h.in b/alice-strace/linux/powerpc/ioctlent.h.in new file mode 100644 index 0000000..510f5aa --- /dev/null +++ b/alice-strace/linux/powerpc/ioctlent.h.in @@ -0,0 +1,84 @@ + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGRS485", 0x542e}, + {"asm/ioctls.h", "TIOCSRS485", 0x542f}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "TIOCSIG", 0x5436}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "FIOCLEX", 0x6601}, + {"asm/ioctls.h", "FIONCLEX", 0x6602}, + {"asm/ioctls.h", "FIOASYNC", 0x667d}, + {"asm/ioctls.h", "FIONBIO", 0x667e}, + {"asm/ioctls.h", "FIONREAD", 0x667f}, + {"asm/ioctls.h", "FIOQSIZE", 0x6680}, + {"asm/nvram.h", "IOC_NVRAM_GET_OFFSET", 0x7042}, + {"asm/nvram.h", "IOC_NVRAM_SYNC", 0x7043}, + {"asm/ps3fb.h", "PS3FB_IOCTL_SETMODE", 0x7201}, + {"asm/ps3fb.h", "PS3FB_IOCTL_GETMODE", 0x7202}, + {"asm/ps3fb.h", "PS3FB_IOCTL_SCREENINFO", 0x7203}, + {"asm/ps3fb.h", "PS3FB_IOCTL_ON", 0x7204}, + {"asm/ps3fb.h", "PS3FB_IOCTL_OFF", 0x7205}, + {"asm/ps3fb.h", "PS3FB_IOCTL_FSEL", 0x7206}, + {"asm/ioctls.h", "TIOCGETP", 0x7408}, + {"asm/ioctls.h", "TIOCSETP", 0x7409}, + {"asm/ioctls.h", "TIOCSETN", 0x740a}, + {"asm/ioctls.h", "TIOCSETC", 0x7411}, + {"asm/ioctls.h", "TIOCGETC", 0x7412}, + {"asm/ioctls.h", "TCGETS", 0x7413}, + {"asm/ioctls.h", "TCSETS", 0x7414}, + {"asm/ioctls.h", "TCSETSW", 0x7415}, + {"asm/ioctls.h", "TCSETSF", 0x7416}, + {"asm/ioctls.h", "TCGETA", 0x7417}, + {"asm/ioctls.h", "TCSETA", 0x7418}, + {"asm/ioctls.h", "TCSETAW", 0x7419}, + {"asm/ioctls.h", "TCSETAF", 0x741c}, + {"asm/ioctls.h", "TCSBRK", 0x741d}, + {"asm/ioctls.h", "TCXONC", 0x741e}, + {"asm/ioctls.h", "TCFLSH", 0x741f}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x7467}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x7468}, + {"asm/ioctls.h", "TIOCSTART", 0x746e}, + {"asm/ioctls.h", "TIOCSTOP", 0x746f}, + {"asm/ioctls.h", "TIOCOUTQ", 0x7473}, + {"asm/ioctls.h", "TIOCGLTC", 0x7474}, + {"asm/ioctls.h", "TIOCSLTC", 0x7475}, + {"asm/ioctls.h", "TIOCSPGRP", 0x7476}, + {"asm/ioctls.h", "TIOCGPGRP", 0x7477}, + {"asm/sockios.h", "FIOSETOWN", 0x8901}, + {"asm/sockios.h", "SIOCSPGRP", 0x8902}, + {"asm/sockios.h", "FIOGETOWN", 0x8903}, + {"asm/sockios.h", "SIOCGPGRP", 0x8904}, + {"asm/sockios.h", "SIOCATMARK", 0x8905}, + {"asm/sockios.h", "SIOCGSTAMP", 0x8906}, + {"asm/sockios.h", "SIOCGSTAMPNS", 0x8907}, diff --git a/alice-strace/linux/powerpc/ioctlent1.h b/alice-strace/linux/powerpc/ioctlent1.h new file mode 100644 index 0000000..72eeaf1 --- /dev/null +++ b/alice-strace/linux/powerpc/ioctlent1.h @@ -0,0 +1 @@ +#include "ioctlent.h" diff --git a/alice-strace/linux/powerpc/signalent1.h b/alice-strace/linux/powerpc/signalent1.h new file mode 100644 index 0000000..d31e6a4 --- /dev/null +++ b/alice-strace/linux/powerpc/signalent1.h @@ -0,0 +1 @@ +#include "../signalent.h" diff --git a/alice-strace/linux/powerpc/syscallent.h b/alice-strace/linux/powerpc/syscallent.h new file mode 100644 index 0000000..d84a8f4 --- /dev/null +++ b/alice-strace/linux/powerpc/syscallent.h @@ -0,0 +1,484 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ + { 1, TP, sys_exit, "exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "oldgetrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 5, 0, printargs, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 5, 0, sys_vm86, "vm86" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 6, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 5, 0, printargs, "modify_ldt" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_query_module, "query_module" }, /* 166 */ + { 3, TD, sys_poll, "poll" }, /* 167 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 168 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 169 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 170 */ + { 5, 0, sys_prctl, "prctl" }, /* 171 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 172 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 173 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 174 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 175 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 176 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 177 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 178 */ + { 6, TD, sys_pread, "pread64" }, /* 179 */ + { 6, TD, sys_pwrite, "pwrite64" }, /* 180 */ + { 3, TF, sys_chown, "chown" }, /* 181 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 182 */ + { 2, 0, sys_capget, "capget" }, /* 183 */ + { 2, 0, sys_capset, "capset" }, /* 184 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 185 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 186 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 187 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 188 */ + { 0, TP, sys_vfork, "vfork" }, /* 189 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 190 */ + { 5, TD, sys_readahead, "readahead" }, /* 190 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */ + { 4, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 5, 0, printargs, "pciconfig_read" }, /* 198 */ + { 5, 0, printargs, "pciconfig_write" }, /* 199 */ + { 3, 0, printargs, "pciconfig_iobase" }, /* 200 */ + { 6, 0, printargs, "MOL" }, /* 201 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 202 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 203 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 204 */ + { 3, TM, sys_madvise, "madvise" }, /* 205 */ + { 3, TM, sys_mincore, "mincore" }, /* 206 */ + { 0, 0, sys_gettid, "gettid" }, /* 207 */ + { 2, TS, sys_kill, "tkill" }, /* 208 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 209 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 210 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 211 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 212 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 213 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 214 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 215 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 216 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 217 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 218 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 219 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 220 */ + { 6, 0, sys_futex, "futex" }, /* 221 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 222 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 223 */ + { 5, 0, NULL, NULL }, /* 224 */ + { 5, 0, printargs, "tux" }, /* 225 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 226 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 227 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 228 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 229 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 230 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 231 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 232 */ + { 6, TD, sys_fadvise64, "fadvise64" }, /* 233 */ + { 1, TP, sys_exit, "exit_group" }, /* 234 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 235 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 236 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 237 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 238 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 239 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 240 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 241 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 242 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 243 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 244 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 245 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 246 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 247 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 248 */ + { 2, 0, printargs, "swapcontext" }, /* 249 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 250 */ + { 2, TF, sys_utimes, "utimes" }, /* 251 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 252 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 253 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 254 */ + { 1, 0, printargs, "rtas" }, /* 255 */ + { 5, 0, printargs, "debug_setcontext" }, /* 256 */ + { 5, 0, sys_vserver, "vserver" }, /* 257 */ + { 5, TM, sys_migrate_pages, "migrate_pages" }, /* 258 */ + { 6, TM, sys_mbind, "mbind" }, /* 259 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 260 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 261 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 262 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 263 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 264 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 265 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 266 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 267 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 268 */ + { 5, 0, sys_add_key, "add_key" }, /* 269 */ + { 4, 0, sys_request_key, "request_key" }, /* 270 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 271 */ + { 5, TP, sys_waitid, "waitid" }, /* 272 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 273 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 274 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 275 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 276 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 277 */ + { 5, 0, printargs, "spu_run" }, /* 278 */ + { 5, 0, printargs, "spu_create" }, /* 279 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 280 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 281 */ + { 1, TP, sys_unshare, "unshare" }, /* 282 */ + { 6, TD, sys_splice, "splice" }, /* 283 */ + { 4, TD, sys_tee, "tee" }, /* 284 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 285 */ + { 4, TD|TF, sys_openat, "openat" }, /* 286 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 287 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 288 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 289 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 290 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 291 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 292 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 293 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 294 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 295 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 296 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 297 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 298 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 299 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 300 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 301 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 302 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 303 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 304 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 305 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 307 */ + { 6, TD, sys_sync_file_range2, "sync_file_range2" }, /* 308 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 309 */ + { 3, 0, sys_subpage_prot, "subpage_prot" }, /* 310 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 311 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 312 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 313 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 314 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 315 */ + { 3, TD, sys_dup3, "dup3" }, /* 316 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 317 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 318 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 319 */ + { 6, TD, sys_preadv, "preadv" }, /* 320 */ + { 6, TD, sys_pwritev, "pwritev" }, /* 321 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 322 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 323 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 324 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 325 */ + { 3, TN, sys_socket, "socket" }, /* 326 */ + { 3, TN, sys_bind, "bind" }, /* 327 */ + { 3, TN, sys_connect, "connect" }, /* 328 */ + { 2, TN, sys_listen, "listen" }, /* 329 */ + { 3, TN, sys_accept, "accept" }, /* 330 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 331 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 332 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 333 */ + { 4, TN, sys_send, "send" }, /* 334 */ + { 6, TN, sys_sendto, "sendto" }, /* 335 */ + { 4, TN, sys_recv, "recv" }, /* 336 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 337 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 338 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 339 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 340 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 341 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 342 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 343 */ + { 4, TN, sys_accept4, "accept4" }, /* 344 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 345 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 346 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 347 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 348 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 349 */ + { 2, TD, sys_setns, "setns" }, /* 350 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 351 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 352 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 353 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 354 */ + { 5, 0, NULL, NULL }, /* 355 */ + { 5, 0, NULL, NULL }, /* 356 */ + { 5, 0, NULL, NULL }, /* 357 */ + { 5, 0, NULL, NULL }, /* 358 */ + { 5, 0, NULL, NULL }, /* 359 */ + { 5, 0, NULL, NULL }, /* 360 */ + { 5, 0, NULL, NULL }, /* 361 */ + { 5, 0, NULL, NULL }, /* 362 */ + { 5, 0, NULL, NULL }, /* 363 */ + { 5, 0, NULL, NULL }, /* 364 */ + { 5, 0, NULL, NULL }, /* 365 */ + { 5, 0, NULL, NULL }, /* 366 */ + { 5, 0, NULL, NULL }, /* 367 */ + { 5, 0, NULL, NULL }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ + { 5, 0, NULL, NULL }, /* 445 */ + { 5, 0, NULL, NULL }, /* 446 */ + { 5, 0, NULL, NULL }, /* 447 */ + { 5, 0, NULL, NULL }, /* 448 */ + { 5, 0, NULL, NULL }, /* 449 */ diff --git a/alice-strace/linux/powerpc/syscallent1.h b/alice-strace/linux/powerpc/syscallent1.h new file mode 100644 index 0000000..49ccb8a --- /dev/null +++ b/alice-strace/linux/powerpc/syscallent1.h @@ -0,0 +1 @@ +#include "syscallent.h" diff --git a/alice-strace/linux/s390/ioctlent.h.in b/alice-strace/linux/s390/ioctlent.h.in new file mode 100644 index 0000000..1e93a0b --- /dev/null +++ b/alice-strace/linux/s390/ioctlent.h.in @@ -0,0 +1,49 @@ + {"asm/dasd.h", "BIODASDDISABLE", 0x4400}, + {"asm/dasd.h", "DASDAPIVER", 0x4400}, + {"asm/dasd.h", "BIODASDENABLE", 0x4401}, + {"asm/dasd.h", "BIODASDFMT", 0x4401}, + {"asm/dasd.h", "BIODASDINFO", 0x4401}, + {"asm/dasd.h", "BIODASDSNID", 0x4401}, + {"asm/dasd.h", "BIODASDPRRD", 0x4402}, + {"asm/dasd.h", "BIODASDRSRV", 0x4402}, + {"asm/dasd.h", "BIODASDSATTR", 0x4402}, + {"asm/dasd.h", "BIODASDINFO2", 0x4403}, + {"asm/dasd.h", "BIODASDRLSE", 0x4403}, + {"asm/dasd.h", "BIODASDPSRD", 0x4404}, + {"asm/dasd.h", "BIODASDSLCK", 0x4404}, + {"asm/dasd.h", "BIODASDGATTR", 0x4405}, + {"asm/dasd.h", "BIODASDPRRST", 0x4405}, + {"asm/dasd.h", "BIODASDQUIESCE", 0x4406}, + {"asm/dasd.h", "BIODASDRESUME", 0x4407}, + {"asm/cmb.h", "BIODASDCMFENABLE", 0x4420}, + {"asm/cmb.h", "BIODASDCMFDISABLE", 0x4421}, + {"asm/cmb.h", "BIODASDREADALLCMB", 0x4421}, + {"asm/dasd.h", "BIODASDSYMMIO", 0x44f0}, + {"asm/ioctls.h", "FIOQSIZE", 0x545e}, + {"asm/chsc.h", "CHSC_START", 0x6381}, + {"asm/chsc.h", "CHSC_INFO_CHANNEL_PATH", 0x6382}, + {"asm/chsc.h", "CHSC_INFO_CU", 0x6383}, + {"asm/chsc.h", "CHSC_INFO_SCH_CU", 0x6384}, + {"asm/chsc.h", "CHSC_INFO_CI", 0x6385}, + {"asm/chsc.h", "CHSC_INFO_CCL", 0x6386}, + {"asm/chsc.h", "CHSC_INFO_CPD", 0x6387}, + {"asm/chsc.h", "CHSC_INFO_DCAL", 0x6388}, + {"asm/tape390.h", "TAPE390_DISPLAY", 0x6401}, + {"asm/tape390.h", "TAPE390_CRYPT_SET", 0x6402}, + {"asm/tape390.h", "TAPE390_CRYPT_QUERY", 0x6403}, + {"asm/tape390.h", "TAPE390_KEKL_SET", 0x6404}, + {"asm/tape390.h", "TAPE390_KEKL_QUERY", 0x6405}, + {"asm/zcrypt.h", "Z90STAT_TOTALCOUNT", 0x7a40}, + {"asm/zcrypt.h", "Z90STAT_PCICACOUNT", 0x7a41}, + {"asm/zcrypt.h", "Z90STAT_PCICCCOUNT", 0x7a42}, + {"asm/zcrypt.h", "Z90STAT_REQUESTQ_COUNT", 0x7a44}, + {"asm/zcrypt.h", "Z90STAT_PENDINGQ_COUNT", 0x7a45}, + {"asm/zcrypt.h", "Z90STAT_TOTALOPEN_COUNT", 0x7a46}, + {"asm/zcrypt.h", "Z90STAT_DOMAIN_INDEX", 0x7a47}, + {"asm/zcrypt.h", "Z90STAT_STATUS_MASK", 0x7a48}, + {"asm/zcrypt.h", "Z90STAT_QDEPTH_MASK", 0x7a49}, + {"asm/zcrypt.h", "Z90STAT_PERDEV_REQCNT", 0x7a4a}, + {"asm/zcrypt.h", "Z90STAT_PCIXCCMCL2COUNT", 0x7a4b}, + {"asm/zcrypt.h", "Z90STAT_PCIXCCMCL3COUNT", 0x7a4c}, + {"asm/zcrypt.h", "Z90STAT_CEX2CCOUNT", 0x7a4d}, + {"asm/zcrypt.h", "Z90STAT_CEX2ACOUNT", 0x7a4e}, diff --git a/alice-strace/linux/s390/syscallent.h b/alice-strace/linux/s390/syscallent.h new file mode 100644 index 0000000..719029f --- /dev/null +++ b/alice-strace/linux/s390/syscallent.h @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2000 IBM Deutschland Entwicklung GmbH, IBM Coporation + * Authors: Ulrich Weigand + * D.J. Barrow + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + { 0, 0, sys_setup, "setup" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { MA, 0, NULL, NULL }, /* 17 */ + { MA, 0, NULL, NULL }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { MA, 0, NULL, NULL }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { MA, 0, NULL, NULL }, /* 31 */ + { MA, 0, NULL, NULL }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { MA, 0, NULL, NULL }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { MA, 0, NULL, NULL }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { MA, 0, NULL, NULL }, /* 46 */ + { MA, 0, NULL, NULL }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { MA, 0, NULL, NULL }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { MA, 0, NULL, NULL }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { MA, 0, NULL, NULL }, /* 58 */ + { MA, 0, NULL, NULL }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { MA, 0, NULL, NULL }, /* 68 */ + { MA, 0, NULL, NULL }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { MA, 0, NULL, NULL }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { MA, 0, NULL, NULL }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_old_mmap, "mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { MA, 0, NULL, NULL }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { MA, 0, NULL, NULL }, /* 109 */ + { MA, 0, NULL, NULL }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { MA, 0, NULL, NULL }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 5, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { MA, 0, NULL, NULL }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { MA, 0, NULL, NULL }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 5, TD, sys_pread, "pread" }, /* 180 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 181 */ + { 3, TF, sys_chown, "lchown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { 1, TD|TM, sys_old_mmap_pgoff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "lchown" }, /* 198 */ + { 0, NF, sys_getuid, "getuid" }, /* 199 */ + { 0, NF, sys_getgid, "getgid" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 201 */ + { 0, NF, sys_getegid, "getegid" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 203 */ + { 2, 0, sys_setregid, "setregid" }, /* 204 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 205 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 206 */ + { 3, TD, sys_fchown, "fchown" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 211 */ + { 3, TF, sys_chown, "chown" }, /* 212 */ + { 1, 0, sys_setuid, "setuid" }, /* 213 */ + { 1, 0, sys_setgid, "setgid" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 4, TD, sys_readahead, "readahead" }, /* 222 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 223 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 224 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 225 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 226 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 227 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 228 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 229 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 230 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 231 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 232 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 233 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 234 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 235 */ + { 0, 0, sys_gettid, "gettid" }, /* 236 */ + { 2, TS, sys_kill, "tkill" }, /* 237 */ + { 6, 0, sys_futex, "futex" }, /* 238 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 239 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 240 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 241 */ + { MA, 0, NULL, NULL }, /* 242 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 243 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 244 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 245 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 246 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 247 */ + { 1, TP, sys_exit, "exit_group" }, /* 248 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 253 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 254 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */ + { 5, 0, sys_vserver, "vserver" }, /* 263 */ + { 5, TD, printargs, "fadvise64_64" }, /* 264 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 265 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 266 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 267 */ + { 6, TM, sys_mbind, "mbind" }, /* 268 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 269 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 270 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 271 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 272 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 273 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 277 */ + { 5, 0, sys_add_key, "add_key" }, /* 278 */ + { 4, 0, sys_request_key, "request_key" }, /* 279 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 280 */ + { 5, TP, sys_waitid, "waitid" }, /* 281 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 284 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 285 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 286 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 287 */ + { 4, TD|TF, sys_openat, "openat" }, /* 288 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 293 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 301 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 302 */ + { 1, TP, sys_unshare, "unshare" }, /* 303 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 304 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 305 */ + { 6, TD, sys_splice, "splice" }, /* 306 */ + { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 307 */ + { 4, TD, sys_tee, "tee" }, /* 308 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 309 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 310 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 311 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */ + { 2, TF, sys_utimes, "utimes" }, /* 313 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 314 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 317 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 318 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 325 */ + { 3, TD, sys_dup3, "dup3" }, /* 326 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 327 */ + { 5, TD, sys_preadv, "preadv" }, /* 328 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 329 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 330 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 331 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 332 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 333 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 334 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 335 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 336 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 337 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 338 */ + { 2, TD, sys_setns, "setns" }, /* 339 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 340 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 341 */ + { 2, 0, printargs, "s390_runtime_instr" }, /* 342 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 343 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 344 */ + { 5, 0, NULL, NULL }, /* 345 */ + { 5, 0, NULL, NULL }, /* 346 */ + { 5, 0, NULL, NULL }, /* 347 */ + { 5, 0, NULL, NULL }, /* 348 */ + { 5, 0, NULL, NULL }, /* 349 */ + { 5, 0, NULL, NULL }, /* 350 */ + { 5, 0, NULL, NULL }, /* 351 */ + { 5, 0, NULL, NULL }, /* 352 */ + { 5, 0, NULL, NULL }, /* 353 */ + { 5, 0, NULL, NULL }, /* 354 */ + { 5, 0, NULL, NULL }, /* 355 */ + { 5, 0, NULL, NULL }, /* 356 */ + { 5, 0, NULL, NULL }, /* 357 */ + { 5, 0, NULL, NULL }, /* 358 */ + { 5, 0, NULL, NULL }, /* 359 */ + { 5, 0, NULL, NULL }, /* 360 */ + { 5, 0, NULL, NULL }, /* 361 */ + { 5, 0, NULL, NULL }, /* 362 */ + { 5, 0, NULL, NULL }, /* 363 */ + { 5, 0, NULL, NULL }, /* 364 */ + { 5, 0, NULL, NULL }, /* 365 */ + { 5, 0, NULL, NULL }, /* 366 */ + { 5, 0, NULL, NULL }, /* 367 */ + { 5, 0, NULL, NULL }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ diff --git a/alice-strace/linux/s390x/ioctlent.h.in b/alice-strace/linux/s390x/ioctlent.h.in new file mode 100644 index 0000000..214b67f --- /dev/null +++ b/alice-strace/linux/s390x/ioctlent.h.in @@ -0,0 +1 @@ +#include "../s390/ioctlent.h.in" diff --git a/alice-strace/linux/s390x/syscallent.h b/alice-strace/linux/s390x/syscallent.h new file mode 100644 index 0000000..66face5 --- /dev/null +++ b/alice-strace/linux/s390x/syscallent.h @@ -0,0 +1,480 @@ +/* + * Copyright (c) 2000 IBM Deutschland Entwicklung GmbH, IBM Coporation + * Author: Ulrich Weigand + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + { 0, 0, sys_setup, "setup" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { MA, 0, NULL, NULL }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { MA, 0, NULL, NULL }, /* 16 */ + { MA, 0, NULL, NULL }, /* 17 */ + { MA, 0, NULL, NULL }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { MA, 0, NULL, NULL }, /* 23 */ + { MA, 0, NULL, NULL }, /* 24 */ + { MA, 0, NULL, NULL }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { MA, 0, NULL, NULL }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { MA, 0, NULL, NULL }, /* 31 */ + { MA, 0, NULL, NULL }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { MA, 0, NULL, NULL }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { MA, 0, NULL, NULL }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { MA, 0, NULL, NULL }, /* 46 */ + { MA, 0, NULL, NULL }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { MA, 0, NULL, NULL }, /* 49 */ + { MA, 0, NULL, NULL }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { MA, 0, NULL, NULL }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { MA, 0, NULL, NULL }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { MA, 0, NULL, NULL }, /* 58 */ + { MA, 0, NULL, NULL }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { MA, 0, NULL, NULL }, /* 68 */ + { MA, 0, NULL, NULL }, /* 69 */ + { MA, 0, NULL, NULL }, /* 70 */ + { MA, 0, NULL, NULL }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { MA, 0, NULL, NULL }, /* 80 */ + { MA, 0, NULL, NULL }, /* 81 */ + { MA, 0, NULL, NULL }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { MA, 0, NULL, NULL }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { MA, 0, NULL, NULL }, /* 89 */ + { 1, TD|TM, sys_old_mmap, "mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { MA, 0, NULL, NULL }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { MA, 0, NULL, NULL }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { MA, 0, NULL, NULL }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { MA, 0, NULL, NULL }, /* 109 */ + { MA, 0, NULL, NULL }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { MA, 0, NULL, NULL }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 5, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { MA, 0, NULL, NULL }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { MA, 0, NULL, NULL }, /* 138 */ + { MA, 0, NULL, NULL }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 2, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { MA, 0, NULL, NULL }, /* 164 */ + { MA, 0, NULL, NULL }, /* 165 */ + { MA, 0, NULL, NULL }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { MA, 0, NULL, NULL }, /* 170 */ + { MA, 0, NULL, NULL }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 4, TD, sys_pread, "pread" }, /* 180 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 181 */ + { MA, 0, NULL, NULL }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */ + { MA, 0, NULL, NULL }, /* 192 */ + { MA, 0, NULL, NULL }, /* 193 */ + { MA, 0, NULL, NULL }, /* 194 */ + { MA, 0, NULL, NULL }, /* 195 */ + { MA, 0, NULL, NULL }, /* 196 */ + { MA, 0, NULL, NULL }, /* 197 */ + { 3, TF, sys_chown, "lchown" }, /* 198 */ + { 0, NF, sys_getuid, "getuid" }, /* 199 */ + { 0, NF, sys_getgid, "getgid" }, /* 200 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 201 */ + { 0, NF, sys_getegid, "getegid" }, /* 202 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 203 */ + { 2, 0, sys_setregid, "setregid" }, /* 204 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 205 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 206 */ + { 3, TD, sys_fchown, "fchown" }, /* 207 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 208 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 209 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 210 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 211 */ + { 3, TF, sys_chown, "chown" }, /* 212 */ + { 1, 0, sys_setuid, "setuid" }, /* 213 */ + { 1, 0, sys_setgid, "setgid" }, /* 214 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 215 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { MA, 0, NULL, NULL }, /* 221 */ + { 3, TD, sys_readahead, "readahead" }, /* 222 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 223 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 224 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 225 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 226 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 227 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 228 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 229 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 230 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 231 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 232 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 233 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 234 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 235 */ + { 0, 0, sys_gettid, "gettid" }, /* 236 */ + { 2, TS, sys_kill, "tkill" }, /* 237 */ + { 6, 0, sys_futex, "futex" }, /* 238 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 239 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 240 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 241 */ + { MA, 0, NULL, NULL }, /* 242 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 243 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 244 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 245 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 246 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 247 */ + { 1, TP, sys_exit, "exit_group" }, /* 248 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 253 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 254 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */ + { 5, 0, sys_vserver, "vserver" }, /* 263 */ + { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 264 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 265 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 266 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 267 */ + { 6, TM, sys_mbind, "mbind" }, /* 268 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 269 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 270 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 271 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 272 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 273 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 277 */ + { 5, 0, sys_add_key, "add_key" }, /* 278 */ + { 4, 0, sys_request_key, "request_key" }, /* 279 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 280 */ + { 5, TP, sys_waitid, "waitid" }, /* 281 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 284 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 285 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 286 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 287 */ + { 4, TD|TF, sys_openat, "openat" }, /* 288 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 293 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 301 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 302 */ + { 1, TP, sys_unshare, "unshare" }, /* 303 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 304 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 305 */ + { 6, TD, sys_splice, "splice" }, /* 306 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 307 */ + { 4, TD, sys_tee, "tee" }, /* 308 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 309 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 310 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 311 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */ + { 2, TF, sys_utimes, "utimes" }, /* 313 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 314 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 317 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 318 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 325 */ + { 3, TD, sys_dup3, "dup3" }, /* 326 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 327 */ + { 4, TD, sys_preadv, "preadv" }, /* 328 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 329 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 330 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 331 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 332 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 333 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 334 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 335 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 336 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 337 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 338 */ + { 2, TD, sys_setns, "setns" }, /* 339 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 340 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 341 */ + { 2, 0, printargs, "s390_runtime_instr" }, /* 342 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 343 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 344 */ + { 5, 0, NULL, NULL }, /* 345 */ + { 5, 0, NULL, NULL }, /* 346 */ + { 5, 0, NULL, NULL }, /* 347 */ + { 5, 0, NULL, NULL }, /* 348 */ + { 5, 0, NULL, NULL }, /* 349 */ + { 5, 0, NULL, NULL }, /* 350 */ + { 5, 0, NULL, NULL }, /* 351 */ + { 5, 0, NULL, NULL }, /* 352 */ + { 5, 0, NULL, NULL }, /* 353 */ + { 5, 0, NULL, NULL }, /* 354 */ + { 5, 0, NULL, NULL }, /* 355 */ + { 5, 0, NULL, NULL }, /* 356 */ + { 5, 0, NULL, NULL }, /* 357 */ + { 5, 0, NULL, NULL }, /* 358 */ + { 5, 0, NULL, NULL }, /* 359 */ + { 5, 0, NULL, NULL }, /* 360 */ + { 5, 0, NULL, NULL }, /* 361 */ + { 5, 0, NULL, NULL }, /* 362 */ + { 5, 0, NULL, NULL }, /* 363 */ + { 5, 0, NULL, NULL }, /* 364 */ + { 5, 0, NULL, NULL }, /* 365 */ + { 5, 0, NULL, NULL }, /* 366 */ + { 5, 0, NULL, NULL }, /* 367 */ + { 5, 0, NULL, NULL }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ diff --git a/alice-strace/linux/sh/ioctlent.h.in b/alice-strace/linux/sh/ioctlent.h.in new file mode 100644 index 0000000..0627316 --- /dev/null +++ b/alice-strace/linux/sh/ioctlent.h.in @@ -0,0 +1,65 @@ + {"asm/ioctls.h", "TCGETS", 0x5401}, + {"asm/ioctls.h", "TCSETS", 0x5402}, + {"asm/ioctls.h", "TCSETSW", 0x5403}, + {"asm/ioctls.h", "TCSETSF", 0x5404}, + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "FIOCLEX", 0x6601}, + {"asm/ioctls.h", "FIONCLEX", 0x6602}, + {"asm/sockios.h", "FIOGETOWN", 0x667b}, + {"asm/sockios.h", "FIOSETOWN", 0x667c}, + {"asm/ioctls.h", "FIOASYNC", 0x667d}, + {"asm/ioctls.h", "FIONBIO", 0x667e}, + {"asm/ioctls.h", "FIONREAD", 0x667f}, + {"asm/sockios.h", "SIOCATMARK", 0x7307}, + {"asm/sockios.h", "SIOCSPGRP", 0x7308}, + {"asm/sockios.h", "SIOCGPGRP", 0x7309}, + {"asm/sockios.h", "SIOCGSTAMP", 0x7364}, + {"asm/ioctls.h", "TCGETA", 0x7417}, + {"asm/ioctls.h", "TCSETA", 0x7418}, + {"asm/ioctls.h", "TCSETAW", 0x7419}, + {"asm/ioctls.h", "TCSETAF", 0x741c}, + {"asm/ioctls.h", "TCSBRK", 0x741d}, + {"asm/ioctls.h", "TCXONC", 0x741e}, + {"asm/ioctls.h", "TCFLSH", 0x741f}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x7467}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x7468}, + {"asm/ioctls.h", "TIOCSTART", 0x746e}, + {"asm/ioctls.h", "TIOCSTOP", 0x746f}, + {"asm/ioctls.h", "TIOCOUTQ", 0x7473}, + {"asm/ioctls.h", "TIOCSPGRP", 0x7476}, + {"asm/ioctls.h", "TIOCGPGRP", 0x7477}, diff --git a/alice-strace/linux/sh/syscallent.h b/alice-strace/linux/sh/syscallent.h new file mode 100644 index 0000000..b51fc6f --- /dev/null +++ b/alice-strace/linux/sh/syscallent.h @@ -0,0 +1,484 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 Rick Sladkey + * Copyright (c) 2000 PocketPenguins Inc. Linux for Hitachi SuperH + * port by Greg Banks + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, sys_vm86old, "vm86old" }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 5, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, sys_cacheflush, "cacheflush" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 1, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 1, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, sys_vm86, "vm86" }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + + { 6, TD, sys_pread, "pread" }, /* 180 */ + { 6, TD, sys_pwrite, "pwrite" }, /* 181 */ + { 3, TF, sys_chown, "chown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, NULL, NULL }, /* 188 */ + { 5, 0, NULL, NULL }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 5, 0, printargs, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 193 */ + { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ +/*TODO*/{ 3, TF, printargs, "lchown32" }, /* 198 */ +/*TODO*/{ 0, 0, printargs, "getuid32" }, /* 199 */ + + { 0, 0, printargs, "getgid32" }, /* 200 */ + { 0, 0, printargs, "geteuid32" }, /* 201 */ + { 0, 0, printargs, "getegid32" }, /* 202 */ + { 2, 0, printargs, "setreuid32" }, /* 203 */ + { 2, 0, printargs, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, 0, printargs, "fchown32" }, /* 207 */ + { 3, 0, printargs, "setresuid32" }, /* 208 */ + { 3, 0, printargs, "getresuid32" }, /* 209 */ + { 3, 0, printargs, "setresgid32" }, /* 210 */ + { 3, 0, printargs, "getsetgid32" }, /* 211 */ + { 3, TF, printargs, "chown32" }, /* 212 */ + { 1, 0, printargs, "setuid32" }, /* 213 */ + { 1, 0, printargs, "setgid32" }, /* 214 */ + { 1, 0, printargs, "setfsuid32" }, /* 215 */ + { 1, 0, printargs, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 220 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 221 */ + { 4, 0, NULL, NULL }, /* 222 */ + { 4, 0, NULL, NULL }, /* 223 */ + { 4, 0, sys_gettid, "gettid" }, /* 224 */ + { 4, TD, sys_readahead, "readahead" }, /* 225 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 226 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 229 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 232 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 235 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */ + { 2, TS, sys_kill, "tkill" }, /* 238 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */ + { 6, 0, sys_futex, "futex" }, /* 240 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 241 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 242 */ + { 0, 0, NULL, NULL }, /* 243 */ + { 0, 0, NULL, NULL }, /* 244 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 245 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 248 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */ + { 0, 0, NULL, NULL }, /* 251 */ + { 1, TP, sys_exit, "exit_group" }, /* 252 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 253 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 254 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 257 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 258 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 259 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 268 */ + { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 269 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 270 */ + { 2, TF, sys_utimes, "utimes" }, /* 271 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */ + { 0, 0, NULL, NULL }, /* 273 */ + { 4, TM, sys_mbind, "mbind" }, /* 274 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 275 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 276 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 277 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 280 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */ + { 5, TP, sys_waitid, "waitid" }, /* 284 */ + { 5, 0, sys_add_key, "add_key" }, /* 285 */ + { 4, 0, sys_request_key, "request_key" }, /* 286 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 287 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 288 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 289 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 290 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch"}, /* 291 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch"}, /* 292 */ + { 5, 0, NULL, NULL }, /* 293 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */ + { 4, TD|TF, sys_openat, "openat" }, /* 295 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 300 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 303 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 308 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 309 */ + { 1, TP, sys_unshare, "unshare" }, /* 310 */ + { 2, 0, sys_set_robust_list, "set_robust_list"}, /* 311 */ + { 3, 0, sys_get_robust_list, "get_robust_list"}, /* 312 */ + { 6, TD, sys_splice, "splice" }, /* 313 */ + { 6, TD, sys_sync_file_range, "sync_file_range"}, /* 314 */ + { 4, TD, sys_tee, "tee" }, /* 315 */ + { 5, TD, sys_vmsplice, "vmsplice" }, /* 316 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 317 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 318 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 322 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 323 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 324 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 329 */ + { 3, TD, sys_dup3, "dup3" }, /* 330 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 331 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 332 */ + { 6, TD, sys_preadv, "preadv" }, /* 333 */ + { 6, TD, sys_pwritev, "pwritev" }, /* 334 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 335 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 336 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 337 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 338 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 339 */ + { 3, TN, sys_socket, "socket" }, /* 340 */ + { 3, TN, sys_bind, "bind" }, /* 341 */ + { 3, TN, sys_connect, "connect" }, /* 342 */ + { 2, TN, sys_listen, "listen" }, /* 343 */ + { 3, TN, sys_accept, "accept" }, /* 344 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 345 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 346 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 347 */ + { 4, TN, sys_send, "send" }, /* 348 */ + { 4, TN, sys_recv, "recv" }, /* 349 */ + { 6, TN, sys_sendto, "sendto" }, /* 350 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 351 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 352 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 353 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 354 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 355 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 356 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 357 */ + { 4, TN, sys_accept4, "accept4" }, /* 358 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 359 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 360 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 361 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 362 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 363 */ + { 2, TD, sys_setns, "setns" }, /* 364 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 365 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 366 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 367 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 368 */ + { 5, 0, NULL, NULL }, /* 369 */ + { 5, 0, NULL, NULL }, /* 370 */ + { 5, 0, NULL, NULL }, /* 371 */ + { 5, 0, NULL, NULL }, /* 372 */ + { 5, 0, NULL, NULL }, /* 373 */ + { 5, 0, NULL, NULL }, /* 374 */ + { 5, 0, NULL, NULL }, /* 375 */ + { 5, 0, NULL, NULL }, /* 376 */ + { 5, 0, NULL, NULL }, /* 377 */ + { 5, 0, NULL, NULL }, /* 378 */ + { 5, 0, NULL, NULL }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ + { 4, TI, sys_semop, "semop" }, /* 421 */ + { 4, TI, sys_semget, "semget" }, /* 422 */ + { 4, TI, sys_semctl, "semctl" }, /* 423 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */ + { 4, 0, printargs, "ipc_subcall" }, /* 425 */ + { 4, 0, printargs, "ipc_subcall" }, /* 426 */ + { 4, 0, printargs, "ipc_subcall" }, /* 427 */ + { 4, 0, printargs, "ipc_subcall" }, /* 428 */ + { 4, 0, printargs, "ipc_subcall" }, /* 429 */ + { 4, 0, printargs, "ipc_subcall" }, /* 430 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */ + { 4, TI, sys_msgget, "msgget" }, /* 433 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 434 */ + { 4, 0, printargs, "ipc_subcall" }, /* 435 */ + { 4, 0, printargs, "ipc_subcall" }, /* 436 */ + { 4, 0, printargs, "ipc_subcall" }, /* 437 */ + { 4, 0, printargs, "ipc_subcall" }, /* 438 */ + { 4, 0, printargs, "ipc_subcall" }, /* 439 */ + { 4, 0, printargs, "ipc_subcall" }, /* 440 */ + { 4, TI, sys_shmat, "shmat" }, /* 441 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 442 */ + { 4, TI, sys_shmget, "shmget" }, /* 443 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 444 */ diff --git a/alice-strace/linux/sh64/ioctlent.h.in b/alice-strace/linux/sh64/ioctlent.h.in new file mode 100644 index 0000000..0d5f9bd --- /dev/null +++ b/alice-strace/linux/sh64/ioctlent.h.in @@ -0,0 +1 @@ +#include "../sh/ioctlent.h.in" diff --git a/alice-strace/linux/sh64/syscallent.h b/alice-strace/linux/sh64/syscallent.h new file mode 100644 index 0000000..e970147 --- /dev/null +++ b/alice-strace/linux/sh64/syscallent.h @@ -0,0 +1,455 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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. + */ + + { 0, 0, sys_setup, "setup" }, /* 0 */ + { 1, TP, sys_exit, "_exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 3, TF|TP, sys_execve, "execve" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 1, 0, sys_time, "time" }, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 0, TM, sys_break, "break" }, /* 17 */ + { 2, TF, sys_oldstat, "oldstat" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 5, TF, sys_mount, "mount" }, /* 21 */ + { 1, TF, sys_umount, "oldumount" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_stime, "stime" }, /* 25 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 2, 0, sys_stty, "stty" }, /* 31 */ + { 2, 0, sys_gtty, "gtty" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 0, 0, sys_ftime, "ftime" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_rename, "rename" }, /* 38 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 39 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 40 */ + { 1, TD, sys_dup, "dup" }, /* 41 */ + { 1, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, 0, sys_prof, "prof" }, /* 44 */ + { 1, TM, sys_brk, "brk" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, TF, sys_umount2, "umount" }, /* 52 */ + { 0, 0, sys_lock, "lock" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 55 */ + { 0, 0, sys_mpx, "mpx" }, /* 56 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 57 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 58 */ + { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, 0, sys_ustat, "ustat" }, /* 62 */ + { 2, TD, sys_dup2, "dup2" }, /* 63 */ + { 0, 0, sys_getppid, "getppid" }, /* 64 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */ + { 0, 0, sys_setsid, "setsid" }, /* 66 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 67 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 70 */ + { 2, 0, sys_setregid, "setregid" }, /* 71 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 73 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 74 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 77 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 80 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 81 */ + { 1, TD, sys_oldselect, "oldselect" }, /* 82 */ + { 2, TF, sys_symlink, "symlink" }, /* 83 */ + { 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */ + { 3, TF, sys_readlink, "readlink" }, /* 85 */ + { 1, TF, sys_uselib, "uselib" }, /* 86 */ + { 2, TF, sys_swapon, "swapon" }, /* 87 */ + { 4, 0, sys_reboot, "reboot" }, /* 88 */ + { 3, TD, sys_readdir, "readdir" }, /* 89 */ + { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */ + { 2, TM, sys_munmap, "munmap" }, /* 91 */ + { 2, TF, sys_truncate, "truncate" }, /* 92 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 94 */ + { 3, TD, sys_fchown, "fchown" }, /* 95 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 96 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 97 */ + { 4, 0, sys_profil, "profil" }, /* 98 */ + { 2, TF, sys_statfs, "statfs" }, /* 99 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ + { 2, TF, sys_stat, "stat" }, /* 106 */ + { 2, TF, sys_lstat, "lstat" }, /* 107 */ + { 2, TD, sys_fstat, "fstat" }, /* 108 */ + { 1, 0, sys_olduname, "olduname" }, /* 109 */ + { 1, 0, sys_iopl, "iopl" }, /* 110 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 111 */ + { 0, 0, sys_idle, "idle" }, /* 112 */ + { 1, 0, NULL, NULL }, /* 113 */ + { 4, TP, sys_wait4, "wait4" }, /* 114 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 115 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ + { 5, TI, sys_ipc, "ipc" }, /* 117 */ + { 1, TD, sys_fsync, "fsync" }, /* 118 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */ + { 5, TP, sys_clone, "clone" }, /* 120 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */ + { 1, 0, sys_uname, "uname" }, /* 122 */ + { 3, 0, printargs, "cacheflush" }, /* 123 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 125 */ + { 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */ + { 2, 0, sys_create_module, "create_module" }, /* 127 */ + { 3, 0, sys_init_module, "init_module" }, /* 128 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 129 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 131 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 132 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 133 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 134 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 135 */ + { 1, 0, sys_personality, "personality" }, /* 136 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */ + { 5, TD, sys_llseek, "_llseek" }, /* 140 */ + { 3, TD, sys_getdents, "getdents" }, /* 141 */ + { 5, TD, sys_select, "select" }, /* 142 */ + { 2, TD, sys_flock, "flock" }, /* 143 */ + { 3, TM, sys_msync, "msync" }, /* 144 */ + { 3, TD, sys_readv, "readv" }, /* 145 */ + { 3, TD, sys_writev, "writev" }, /* 146 */ + { 1, 0, sys_getsid, "getsid" }, /* 147 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */ + { 1, TM, sys_mlock, "mlock" }, /* 150 */ + { 2, TM, sys_munlock, "munlock" }, /* 151 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 152 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 153 */ + { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */ + { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */ + { 5, TM, sys_mremap, "mremap" }, /* 163 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 164 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 165 */ + { 5, 0, NULL, NULL }, /* 166 */ + { 5, 0, sys_query_module, "query_module" }, /* 167 */ + { 3, TD, sys_poll, "poll" }, /* 168 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 170 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 171 */ + { 5, 0, sys_prctl, "prctl" }, /* 172 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */ + { 4, TD, sys_pread, "pread" }, /* 180 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 181 */ + { 3, TF, sys_chown, "chown" }, /* 182 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 183 */ + { 2, 0, sys_capget, "capget" }, /* 184 */ + { 2, 0, sys_capset, "capset" }, /* 185 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */ + { 5, 0, NULL, NULL }, /* 188 */ + { 5, 0, NULL, NULL }, /* 189 */ + { 0, TP, sys_vfork, "vfork" }, /* 190 */ + { 2, 0, printargs, "getrlimit" }, /* 191 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */ + { 2, TF, sys_truncate, "truncate64" }, /* 193 */ + { 2, TD, sys_ftruncate, "ftruncate64" }, /* 194 */ + { 2, TF, sys_stat64, "stat64" }, /* 195 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 196 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 197 */ + { 3, TF, sys_chown, "lchown32" }, /* 198 */ + { 0, NF, sys_getuid, "getuid32" }, /* 199 */ + { 0, 0, printargs, "getgid32" }, /* 200 */ + { 0, 0, printargs, "geteuid32" }, /* 201 */ + { 0, 0, printargs, "getegid32" }, /* 202 */ + { 2, 0, printargs, "setreuid32" }, /* 203 */ + { 2, 0, printargs, "setregid32" }, /* 204 */ + { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */ + { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */ + { 3, 0, printargs, "fchown32" }, /* 207 */ + { 3, 0, printargs, "setresuid32" }, /* 208 */ + { 3, 0, printargs, "getresuid32" }, /* 209 */ + { 3, 0, printargs, "setresgid32" }, /* 210 */ + { 3, 0, printargs, "getresgid32" }, /* 211 */ + { 3, TF, printargs, "chown32" }, /* 212 */ + { 1, 0, printargs, "setuid32" }, /* 213 */ + { 1, 0, printargs, "setgid32" }, /* 214 */ + { 1, 0, printargs, "setfsuid32" }, /* 215 */ + { 1, 0, printargs, "setfsgid32" }, /* 216 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */ + { 3, TM, sys_mincore, "mincore" }, /* 218 */ + { 3, TM, sys_madvise, "madvise" }, /* 219 */ + { 3, TN, sys_socket, "socket" }, /* 220 */ + { 3, TN, sys_bind, "bind" }, /* 221 */ + { 3, TN, sys_connect, "connect" }, /* 222 */ + { 2, TN, sys_listen, "listen" }, /* 223 */ + { 3, TN, sys_accept, "accept" }, /* 224 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 225 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 226 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 227 */ + { 4, TN, sys_send, "send" }, /* 228 */ + { 6, TN, sys_sendto, "sendto" }, /* 229 */ + { 4, TN, sys_recv, "recv" }, /* 230 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 231 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 232 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 233 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 234 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 235 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 236 */ + { 4, TI, sys_semop, "semop" }, /* 237 */ + { 4, TI, sys_semget, "semget" }, /* 238 */ + { 4, TI, sys_semctl, "semctl" }, /* 239 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 240 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 241 */ + { 4, TI, sys_msgget, "msgget" }, /* 242 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 243 */ + { 4, TI, sys_shmat, "shmat" }, /* 244 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 245 */ + { 4, TI, sys_shmget, "shmget" }, /* 246 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 247 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 248 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 249 */ + { 4, 0, NULL, NULL }, /* 250 */ + { 4, 0, NULL, NULL }, /* 251 */ + { 4, 0, sys_gettid, "gettid" }, /* 252 */ + { 3, TD, sys_readahead, "readahead" }, /* 253 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 254 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 255 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 256 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 257 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 258 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 259 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 260 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 261 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 262 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 263 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 264 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 265 */ + { 2, TS, sys_kill, "tkill" }, /* 266 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 267 */ + { 6, 0, sys_futex, "futex" }, /* 268 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 269 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 270 */ + { 5, 0, NULL, NULL }, /* 271 */ + { 5, 0, NULL, NULL }, /* 272 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 273 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 274 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 275 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 276 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 277 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 278 */ + { 5, 0, NULL, NULL }, /* 279 */ + { 1, TP, sys_exit, "exit_group" }, /* 280 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 281 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 282 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 283 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 284 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 285 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 286 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 287 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 288 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 289 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 290 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 291 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 292 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 293 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 294 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 295 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 296 */ + { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 297 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 298 */ + { 2, TF, sys_utimes, "utimes" }, /* 299 */ + { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 300 */ + { 0, 0, NULL, NULL }, /* 301 */ + { 4, TM, sys_mbind, "mbind" }, /* 302 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 303 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 304 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 305 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 306 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 307 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 308 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 309 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 310 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 311 */ + { 5, TP, sys_waitid, "waitid" }, /* 312 */ + { 5, 0, sys_add_key, "add_key" }, /* 313 */ + { 4, 0, sys_request_key, "request_key" }, /* 314 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 315 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 316 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 317 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 318 */ + { 3, TD, printargs, "inotify_add_watch"}, /* 319 */ + { 2, TD, printargs, "inotify_rm_watch"}, /* 320 */ + { 5, 0, NULL, NULL }, /* 321 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 322 */ + { 4, TD|TF, sys_openat, "openat" }, /* 323 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 324 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 325 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 326 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 327 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 328 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 329 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 330 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 331 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 332 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 333 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 334 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 335 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 336 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 337 */ + { 1, TP, sys_unshare, "unshare" }, /* 338 */ + { 2, 0, sys_set_robust_list, "set_robust_list"}, /* 339 */ + { 3, 0, sys_get_robust_list, "get_robust_list"}, /* 340 */ + { 6, TD, sys_splice, "splice" }, /* 341 */ + { 4, TD, sys_sync_file_range, "sync_file_range"}, /* 342 */ + { 4, TD, sys_tee, "tee" }, /* 343 */ + { 5, TD, sys_vmsplice, "vmsplice" }, /* 344 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 345 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 346 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 347 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 348 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */ + { 4, TD, sys_timerfd, "timerfd" }, /* 350 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 351 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 352 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 353 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 354 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 355 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 356 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 357 */ + { 3, TD, sys_dup3, "dup3" }, /* 358 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 359 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 360 */ + { 4, TD, sys_preadv, "preadv" }, /* 361 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 362 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 363 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 364 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */ + { 4, TN, sys_accept4, "accept4" }, /* 366 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 367 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 368 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 369 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 370 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 371 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 372 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 373 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 374 */ + { 2, TD, sys_setns, "setns" }, /* 375 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 376 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 377 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 378 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 379 */ + { 5, 0, NULL, NULL }, /* 380 */ + { 5, 0, NULL, NULL }, /* 381 */ + { 5, 0, NULL, NULL }, /* 382 */ + { 5, 0, NULL, NULL }, /* 383 */ + { 5, 0, NULL, NULL }, /* 384 */ + { 5, 0, NULL, NULL }, /* 385 */ + { 5, 0, NULL, NULL }, /* 386 */ + { 5, 0, NULL, NULL }, /* 387 */ + { 5, 0, NULL, NULL }, /* 388 */ + { 5, 0, NULL, NULL }, /* 389 */ + { 5, 0, NULL, NULL }, /* 390 */ + { 5, 0, NULL, NULL }, /* 391 */ + { 5, 0, NULL, NULL }, /* 392 */ + { 5, 0, NULL, NULL }, /* 393 */ + { 5, 0, NULL, NULL }, /* 394 */ + { 5, 0, NULL, NULL }, /* 395 */ + { 5, 0, NULL, NULL }, /* 396 */ + { 5, 0, NULL, NULL }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ +#define SYS_socket_subcall 400 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 400 */ + { 3, TN, sys_socket, "socket" }, /* 401 */ + { 3, TN, sys_bind, "bind" }, /* 402 */ + { 3, TN, sys_connect, "connect" }, /* 403 */ + { 2, TN, sys_listen, "listen" }, /* 404 */ + { 3, TN, sys_accept, "accept" }, /* 405 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 406 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 407 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 408 */ + { 4, TN, sys_send, "send" }, /* 409 */ + { 4, TN, sys_recv, "recv" }, /* 410 */ + { 6, TN, sys_sendto, "sendto" }, /* 411 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 413 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */ + { 4, TN, sys_accept4, "accept4" }, /* 418 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */ + +#if SYS_ipc_subcall != 420 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 420 */ diff --git a/alice-strace/linux/signalent.h b/alice-strace/linux/signalent.h new file mode 100644 index 0000000..112f746 --- /dev/null +++ b/alice-strace/linux/signalent.h @@ -0,0 +1,33 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGBUS", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGUSR1", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGUSR2", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGSTKFLT", /* 16 */ + "SIGCHLD", /* 17 */ + "SIGCONT", /* 18 */ + "SIGSTOP", /* 19 */ + "SIGTSTP", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGURG", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGIO", /* 29 */ + "SIGPWR", /* 30 */ + "SIGSYS", /* 31 */ + "SIGRTMIN", /* 32 */ diff --git a/alice-strace/linux/sparc/dummy2.h b/alice-strace/linux/sparc/dummy2.h new file mode 100644 index 0000000..39552a2 --- /dev/null +++ b/alice-strace/linux/sparc/dummy2.h @@ -0,0 +1,276 @@ +/* + * Copyright (c) 1993, 1994, 1995 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. + */ + +/* still unfinished */ + +#define solaris_sysmp printargs +#define solaris_sginap printargs +#define solaris_sgikopt printargs +#define solaris_sysmips printargs +#define solaris_sigreturn printargs +#define solaris_recvmsg printargs +#define solaris_sendmsg printargs +#define solaris_nfssvc printargs +#define solaris_getfh printargs +#define solaris_async_daemon printargs +#define solaris_exportfs printargs +#define solaris_BSD_getime printargs +#define solaris_sproc printargs +#define solaris_procblk printargs +#define solaris_sprocsp printargs +#define solaris_msync printargs +#define solaris_madvise printargs +#define solaris_pagelock printargs +#define solaris_quotactl printargs +#define solaris_cacheflush printargs +#define solaris_cachectl printargs +#define solaris_nuname printargs +#define solaris_sigpoll printargs +#define solaris_swapctl printargs +#define solaris_sigstack printargs +#define solaris_sigsendset printargs +#define solaris_priocntl printargs +#define solaris_ksigqueue printargs +#define solaris_lwp_sema_wait printargs +#define solaris_memcntl printargs +#define solaris_syscall printargs +#define solaris_clocal printargs +#define solaris_syssun printargs +#define solaris_sysi86 printargs +#define solaris_sysmachine printargs +#define solaris_plock printargs +#define solaris_pathconf printargs +#define solaris_sigtimedwait printargs +#define solaris_ulimit printargs +#define solaris_ptrace printargs +#define solaris_stty printargs +#define solaris_lwp_info printargs +#define solaris_priocntlsys printargs +#define solaris_hrtsys printargs +#define solaris_xenix printargs +#define solaris_statfs printargs +#define solaris_fstatfs printargs +#define solaris_statvfs printargs +#define solaris_fstatvfs printargs +#define solaris_fork1 printargs +#define solaris_sigsendsys printargs +#define solaris_gtty printargs +#define solaris_vtrace printargs +#define solaris_fpathconf printargs +#define solaris_evsys printargs +#define solaris_acct printargs +#define solaris_exec printargs +#define solaris_lwp_sema_post printargs +#define solaris_nfssys printargs +#define solaris_sigaltstack printargs +#define solaris_uadmin printargs +#define solaris_umount printargs +#define solaris_modctl printargs +#define solaris_acancel printargs +#define solaris_async printargs +#define solaris_evtrapret printargs +#define solaris_lwp_create printargs +#define solaris_lwp_exit printargs +#define solaris_lwp_suspend printargs +#define solaris_lwp_continue printargs +#define solaris_lwp_kill printargs +#define solaris_lwp_self printargs +#define solaris_lwp_setprivate printargs +#define solaris_lwp_getprivate printargs +#define solaris_lwp_wait printargs +#define solaris_lwp_mutex_unlock printargs +#define solaris_lwp_mutex_lock printargs +#define solaris_lwp_cond_wait printargs +#define solaris_lwp_cond_signal printargs +#define solaris_lwp_cond_broadcast printargs +#define solaris_llseek printargs +#define solaris_inst_sync printargs +#define solaris_auditsys printargs +#define solaris_processor_bind printargs +#define solaris_processor_info printargs +#define solaris_p_online printargs +#define solaris_sigqueue printargs +#define solaris_clock_gettime printargs +#define solaris_clock_settime printargs +#define solaris_clock_getres printargs +#define solaris_nanosleep printargs +#define solaris_timer_create printargs +#define solaris_timer_delete printargs +#define solaris_timer_settime printargs +#define solaris_timer_gettime printargs +#define solaris_timer_getoverrun printargs +#define solaris_signal printargs +#define solaris_sigset printargs +#define solaris_sighold printargs +#define solaris_sigrelse printargs +#define solaris_sigignore printargs +#define solaris_sigpause printargs +#define solaris_msgctl printargs +#define solaris_msgget printargs +#define solaris_msgrcv printargs +#define solaris_msgsnd printargs +#define solaris_shmat printargs +#define solaris_shmctl printargs +#define solaris_shmdt printargs +#define solaris_shmget printargs +#define solaris_semctl printargs +#define solaris_semget printargs +#define solaris_semop printargs +#define solaris_olduname printargs +#define solaris_ustat printargs +#define solaris_fusers printargs +#define solaris_sysfs1 printargs +#define solaris_sysfs2 printargs +#define solaris_sysfs3 printargs + +/* like another call */ +#define solaris_lchown solaris_chown +#define solaris_setuid solaris_close +#define solaris_seteuid solaris_close +#define solaris_setgid solaris_close +#define solaris_setegid solaris_close +#define solaris_vhangup solaris_close +#define solaris_fdsync solaris_close +#define solaris_sigfillset solaris_sigpending +#define solaris_vfork solaris_fork +#define solaris_ksigaction solaris_sigaction +#define solaris_BSDgetpgrp solaris_getpgrp +#define solaris_BSDsetpgrp solaris_setpgrp +#define solaris_waitsys solaris_waitid + +/* printargs does the right thing */ +#define solaris_sync printargs +#define solaris_profil printargs +#define solaris_yield printargs +#define solaris_pause printargs +#define solaris_sethostid printargs + +/* subfunction entry points */ +#define solaris_pgrpsys printargs +#define solaris_sigcall printargs +#define solaris_msgsys printargs +#define solaris_shmsys printargs +#define solaris_semsys printargs +#define solaris_utssys printargs +#define solaris_sysfs printargs +#define solaris_spcall printargs +#define solaris_context printargs + +/* same as linux */ +#define solaris_exit sys_exit +#define solaris_fork sys_fork +#define solaris_read sys_read +#define solaris_write sys_write +#define solaris_close sys_close +#define solaris_creat sys_creat +#define solaris_link sys_link +#define solaris_unlink sys_unlink +#define solaris_chdir sys_chdir +#define solaris_time sys_time +#define solaris_chmod sys_chmod +#define solaris_lseek sys_lseek +#define solaris_stime sys_stime +#define solaris_alarm sys_alarm +#define solaris_utime sys_utime +#define solaris_access sys_access +#define solaris_nice sys_nice +#define solaris_dup sys_dup +#define solaris_pipe sys_pipe +#define solaris_times sys_times +#define solaris_execve sys_execve +#define solaris_umask sys_umask +#define solaris_chroot sys_chroot +#define solaris_rmdir sys_rmdir +#define solaris_mkdir sys_mkdir +#define solaris_getdents sys_getdents +#define solaris_poll sys_poll +#define solaris_symlink sys_symlink +#define solaris_readlink sys_readlink +#define solaris_setgroups sys_setgroups +#define solaris_getgroups sys_getgroups +#define solaris_fchmod sys_fchmod +#define solaris_fchown sys_fchown +#define solaris_mprotect sys_mprotect +#define solaris_munmap sys_munmap +#define solaris_readv sys_readv +#define solaris_writev sys_writev +#define solaris_chown sys_chown +#define solaris_rename sys_rename +#define solaris_gettimeofday sys_gettimeofday +#define solaris_getitimer sys_getitimer +#define solaris_setitimer sys_setitimer +#define solaris_brk sys_brk +#define solaris_mmap sys_mmap +#define solaris_getsid sys_getsid +#define solaris_setsid sys_setsid +#define solaris_getpgid sys_getpgid +#define solaris_setpgid sys_setpgid +#define solaris_getpgrp sys_getpgrp + +/* These are handled according to current_personality */ +#define solaris_xstat sys_xstat +#define solaris_fxstat sys_fxstat +#define solaris_lxstat sys_lxstat +#define solaris_xmknod sys_xmknod +#define solaris_stat sys_stat +#define solaris_fstat sys_fstat +#define solaris_lstat sys_lstat +#define solaris_pread sys_pread +#define solaris_pwrite sys_pwrite +#define solaris_ioctl sys_ioctl +#define solaris_mknod sys_mknod + +/* To be done */ +#define solaris_mount printargs +#define solaris_sysinfo printargs +#define solaris_sysconfig printargs +#define solaris_getpmsg printargs +#define solaris_putpmsg printargs +#define solaris_wait printargs +#define solaris_waitid printargs +#define solaris_sigsuspend printargs +#define solaris_setpgrp printargs +#define solaris_getcontext printargs +#define solaris_setcontext printargs +#define solaris_getpid printargs +#define solaris_getuid printargs +#define solaris_kill printargs +#define solaris_getgid printargs +#define solaris_fcntl printargs +#define solaris_getmsg printargs +#define solaris_putmsg printargs +#define solaris_sigprocmask printargs +#define solaris_sigaction printargs +#define solaris_sigpending printargs +#define solaris_mincore printargs +#define solaris_fchdir printargs +#define solaris_setrlimit printargs +#define solaris_getrlimit printargs +#define solaris_uname printargs +#define solaris_adjtime printargs +#define solaris_fchroot printargs +#define solaris_utimes printargs diff --git a/alice-strace/linux/sparc/errnoent.h b/alice-strace/linux/sparc/errnoent.h new file mode 100644 index 0000000..d243699 --- /dev/null +++ b/alice-strace/linux/sparc/errnoent.h @@ -0,0 +1,127 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "EWOULDBLOCK", /* 35 */ + "EINPROGRESS", /* 36 */ + "EALREADY", /* 37 */ + "ENOTSOCK", /* 38 */ + "EDESTADDRREQ", /* 39 */ + "EMSGSIZE", /* 40 */ + "EPROTOTYPE", /* 41 */ + "ENOPROTOOPT", /* 42 */ + "EPROTONOSUPPORT", /* 43 */ + "ESOCKTNOSUPPORT", /* 44 */ + "EOPNOTSUPP", /* 45 */ + "EPFNOSUPPORT", /* 46 */ + "EAFNOSUPPORT", /* 47 */ + "EADDRINUSE", /* 48 */ + "EADDRNOTAVAIL", /* 49 */ + "ENETDOWN", /* 50 */ + "ENETUNREACH", /* 51 */ + "ENETRESET", /* 52 */ + "ECONNABORTED", /* 53 */ + "ECONNRESET", /* 54 */ + "ENOBUFS", /* 55 */ + "EISCONN", /* 56 */ + "ENOTCONN", /* 57 */ + "ESHUTDOWN", /* 58 */ + "ETOOMANYREFS", /* 59 */ + "ETIMEDOUT", /* 60 */ + "ECONNREFUSED", /* 61 */ + "ELOOP", /* 62 */ + "ENAMETOOLONG", /* 63 */ + "EHOSTDOWN", /* 64 */ + "EHOSTUNREACH", /* 65 */ + "ENOTEMPTY", /* 66 */ + "EPROCLIM", /* 67 */ + "EUSERS", /* 68 */ + "EDQUOT", /* 69 */ + "ESTALE", /* 70 */ + "EREMOTE", /* 71 */ + "ENOSTR", /* 72 */ + "ETIME", /* 73 */ + "ENOSR", /* 74 */ + "ENOMSG", /* 75 */ + "EBADMSG", /* 76 */ + "EIDRM", /* 77 */ + "EDEADLK", /* 78 */ + "ENOLCK", /* 79 */ + "ENONET", /* 80 */ + "ERREMOTE", /* 81 */ + "ENOLINK", /* 82 */ + "EADV", /* 83 */ + "ESRMNT", /* 84 */ + "ECOMM", /* 85 */ + "EPROTO", /* 86 */ + "EMULTIHOP", /* 87 */ + "EDOTDOT", /* 88 */ + "EREMCHG", /* 89 */ + "ENOSYS", /* 90 */ + "ESTRPIPE", /* 91 */ + "EOVERFLOW", /* 92 */ + "EBADFD", /* 93 */ + "ECHRNG", /* 94 */ + "EL2NSYNC", /* 95 */ + "EL3HLT", /* 96 */ + "EL3RST", /* 97 */ + "ELNRNG", /* 98 */ + "EUNATCH", /* 99 */ + "ENOCSI", /* 100 */ + "EL2HLT", /* 101 */ + "EBADE", /* 102 */ + "EBADR", /* 103 */ + "EXFULL", /* 104 */ + "ENOANO", /* 105 */ + "EBADRQC", /* 106 */ + "EBADSLT", /* 107 */ + "EDEADLOCK", /* 108 */ + "EBFONT", /* 109 */ + "ELIBEXEC", /* 110 */ + "ENODATA", /* 111 */ + "ELIBBAD", /* 112 */ + "ENOPKG", /* 113 */ + "ELIBACC", /* 114 */ + "ENOTUNIQ", /* 115 */ + "ERESTART", /* 116 */ + "EUCLEAN", /* 117 */ + "ENOTNAM", /* 118 */ + "ENAVAIL", /* 119 */ + "EISNAM", /* 120 */ + "EREMOTEIO", /* 121 */ + "EILSEQ", /* 122 */ + "ELIBMAX", /* 123 */ + "ELIBSCN", /* 124 */ + "ENOMEDIUM", /* 125 */ + "EMEDIUMTYPE", /* 126 */ diff --git a/alice-strace/linux/sparc/errnoent1.h b/alice-strace/linux/sparc/errnoent1.h new file mode 100644 index 0000000..418e2db --- /dev/null +++ b/alice-strace/linux/sparc/errnoent1.h @@ -0,0 +1,152 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "ENOMSG", /* 35 */ + "EIDRM", /* 36 */ + "ECHRNG", /* 37 */ + "EL2NSYNC", /* 38 */ + "EL3HLT", /* 39 */ + "EL3RST", /* 40 */ + "ELNRNG", /* 41 */ + "EUNATCH", /* 42 */ + "ENOCSI", /* 43 */ + "EL2HLT", /* 44 */ + "EDEADLK", /* 45 */ + "ENOLCK", /* 46 */ + "ECANCELED", /* 47 */ + "ENOTSUP", /* 48 */ + "ERRNO_49", /* 49 */ + "EBADE", /* 50 */ + "EBADR", /* 51 */ + "EXFULL", /* 52 */ + "ENOANO", /* 53 */ + "EBADRQC", /* 54 */ + "EBADSLT", /* 55 */ + "EDEADLOCK", /* 56 */ + "EBFONT", /* 57 */ + "ERRNO_58", /* 58 */ + "ERRNO_59", /* 59 */ + "ENOSTR", /* 60 */ + "ENODATA", /* 61 */ + "ETIME", /* 62 */ + "ENOSR", /* 63 */ + "ENONET", /* 64 */ + "ENOPKG", /* 65 */ + "EREMOTE", /* 66 */ + "ENOLINK", /* 67 */ + "EADV", /* 68 */ + "ESRMNT", /* 69 */ + "ECOMM", /* 70 */ + "EPROTO", /* 71 */ + "ERRNO_72", /* 72 */ + "ERRNO_73", /* 73 */ + "EMULTIHOP", /* 74 */ + "ERRNO_75", /* 75 */ + "ERRNO_76", /* 76 */ + "EBADMSG", /* 77 */ + "ENAMETOOLONG", /* 78 */ + "EOVERFLOW", /* 79 */ + "ENOTUNIQ", /* 80 */ + "EBADFD", /* 81 */ + "EREMCHG", /* 82 */ + "ELIBACC", /* 83 */ + "ELIBBAD", /* 84 */ + "ELIBSCN", /* 85 */ + "ELIBMAX", /* 86 */ + "ELIBEXEC", /* 87 */ + "EILSEQ", /* 88 */ + "ENOSYS", /* 89 */ + "ELOOP", /* 90 */ + "ERESTART", /* 91 */ + "ESTRPIPE", /* 92 */ + "ENOTEMPTY", /* 93 */ + "EUSERS", /* 94 */ + "ENOTSOCK", /* 95 */ + "EDESTADDRREQ", /* 96 */ + "EMSGSIZE", /* 97 */ + "EPROTOTYPE", /* 98 */ + "ENOPROTOOPT", /* 99 */ + "ERRNO_100", /* 100 */ + "ERRNO_101", /* 101 */ + "ERRNO_102", /* 102 */ + "ERRNO_103", /* 103 */ + "ERRNO_104", /* 104 */ + "ERRNO_105", /* 105 */ + "ERRNO_106", /* 106 */ + "ERRNO_107", /* 107 */ + "ERRNO_108", /* 108 */ + "ERRNO_109", /* 109 */ + "ERRNO_110", /* 110 */ + "ERRNO_111", /* 111 */ + "ERRNO_112", /* 112 */ + "ERRNO_113", /* 113 */ + "ERRNO_114", /* 114 */ + "ERRNO_115", /* 115 */ + "ERRNO_116", /* 116 */ + "ERRNO_117", /* 117 */ + "ERRNO_118", /* 118 */ + "ERRNO_119", /* 119 */ + "EPROTONOSUPPORT", /* 120 */ + "ESOCKTNOSUPPORT", /* 121 */ + "EOPNOTSUPP", /* 122 */ + "EPFNOSUPPORT", /* 123 */ + "EAFNOSUPPORT", /* 124 */ + "EADDRINUSE", /* 125 */ + "EADDRNOTAVAIL", /* 126 */ + "ENETDOWN", /* 127 */ + "ENETUNREACH", /* 128 */ + "ENETRESET", /* 129 */ + "ECONNABORTED", /* 130 */ + "ECONNRESET", /* 131 */ + "ENOBUFS", /* 132 */ + "EISCONN", /* 133 */ + "ENOTCONN", /* 134 */ + "ERRNO_135", /* 135 */ + "ERRNO_136", /* 136 */ + "ERRNO_137", /* 137 */ + "ERRNO_138", /* 138 */ + "ERRNO_139", /* 139 */ + "ERRNO_140", /* 140 */ + "ERRNO_141", /* 141 */ + "ERRNO_142", /* 142 */ + "ESHUTDOWN", /* 143 */ + "ETOOMANYREFS", /* 144 */ + "ETIMEDOUT", /* 145 */ + "ECONNREFUSED", /* 146 */ + "EHOSTDOWN", /* 147 */ + "EHOSTUNREACH", /* 148 */ + "EALREADY", /* 149 */ + "EINPROGRESS", /* 150 */ + "ESTALE", /* 151 */ diff --git a/alice-strace/linux/sparc/gen.pl b/alice-strace/linux/sparc/gen.pl new file mode 100644 index 0000000..8c2f75b --- /dev/null +++ b/alice-strace/linux/sparc/gen.pl @@ -0,0 +1,37 @@ +open SPARC, "syscallent.h" || die "no puedo abrir el de la sparc"; +open ALPHA, "../alpha/syscallent.h" || die "no puedo abrir el de la alpha"; +open PC, "../i386/syscallent.h" || die "no puedo abrir PC\n"; + +while () { + chop; + ($i1, $i2, $i3, $syscall, $syscall_name) = split; + $strn[$index] = $syscall_name; + $name[$index++] = $syscall; +} + +while (){ + if (/\{/) { + ($i1, $n, $pr, $syscall) = split; + $par{$syscall} = $n; + $prr{$syscall} = $pr; + } +} + +while (){ + if (/\{/) { + ($i1, $n, $pr, $syscall) = split; + $par{$syscall} = $n; + $prr{$syscall} = $pr; + } +} + +print "missing \n"; + +for ($i = 0; $i < $index; $i++){ + $x = $name[$i]; + $y = $strn[$i]; + $n = $par{$x}; + $p = $prr{$x}; + $j++; + print "\t{ $n\t$p\t$x\t$y },\t /* $j */\n"; +} diff --git a/alice-strace/linux/sparc/ioctlent.h.in b/alice-strace/linux/sparc/ioctlent.h.in new file mode 100644 index 0000000..008aae0 --- /dev/null +++ b/alice-strace/linux/sparc/ioctlent.h.in @@ -0,0 +1,120 @@ + {"asm/apc.h", "APCIOCGFANCTL", 0x4100}, + {"asm/apc.h", "APCIOCSFANCTL", 0x4101}, + {"asm/apc.h", "APCIOCGCPWR", 0x4102}, + {"asm/apc.h", "APCIOCSCPWR", 0x4103}, + {"asm/apc.h", "APCIOCGBPORT", 0x4104}, + {"asm/apc.h", "APCIOCSBPORT", 0x4105}, + {"asm/fbio.h", "FBIOGTYPE", 0x4600}, + {"asm/fbio.h", "FBIOPUTCMAP", 0x4603}, + {"asm/fbio.h", "FBIOSATTR", 0x4605}, + {"asm/fbio.h", "FBIOGATTR", 0x4606}, + {"asm/fbio.h", "FBIOSVIDEO", 0x4607}, + {"asm/fbio.h", "FBIOGVIDEO", 0x4608}, + {"asm/fbio.h", "FBIOSCURSOR", 0x4618}, + {"asm/fbio.h", "FBIOGCURSOR", 0x4619}, + {"asm/fbio.h", "FBIOSCURPOS", 0x461a}, + {"asm/fbio.h", "FBIOGCURPOS", 0x461b}, + {"asm/fbio.h", "FBIOGCURMAX", 0x461c}, + {"asm/fbio.h", "FBIO_WID_ALLOC", 0x461e}, + {"asm/fbio.h", "FBIO_WID_FREE", 0x461f}, + {"asm/fbio.h", "FBIO_WID_PUT", 0x4620}, + {"asm/fbio.h", "FBIO_WID_GET", 0x4621}, + {"asm/fbio.h", "LEO_CLUTALLOC", 0x4c35}, + {"asm/fbio.h", "LEO_CLUTFREE", 0x4c36}, + {"asm/fbio.h", "LEO_CLUTREAD", 0x4c37}, + {"asm/fbio.h", "LEO_CLUTPOST", 0x4c38}, + {"asm/fbio.h", "LEO_SETGAMMA", 0x4c44}, + {"asm/fbio.h", "LEO_GETGAMMA", 0x4c45}, + {"asm/openpromio.h", "OPIOCGET", 0x4f01}, + {"asm/openpromio.h", "OPIOCSET", 0x4f02}, + {"asm/openpromio.h", "OPIOCNEXTPROP", 0x4f03}, + {"asm/openpromio.h", "OPIOCGETOPTNODE", 0x4f04}, + {"asm/openpromio.h", "OPIOCGETNEXT", 0x4f05}, + {"asm/openpromio.h", "OPIOCGETCHILD", 0x4f06}, + {"asm/ioctls.h", "TCGETA", 0x5401}, + {"asm/ioctls.h", "TCSETA", 0x5402}, + {"asm/ioctls.h", "TCSETAW", 0x5403}, + {"asm/ioctls.h", "TCSETAF", 0x5404}, + {"asm/ioctls.h", "TCSBRK", 0x5405}, + {"asm/ioctls.h", "TCXONC", 0x5406}, + {"asm/ioctls.h", "TCFLSH", 0x5407}, + {"asm/ioctls.h", "TCGETS", 0x5408}, + {"asm/ioctls.h", "TCSETS", 0x5409}, + {"asm/ioctls.h", "TCSETSW", 0x540a}, + {"asm/ioctls.h", "TCSETSF", 0x540b}, + {"asm/ioctls.h", "TCGETS2", 0x540c}, + {"asm/ioctls.h", "TCSETS2", 0x540d}, + {"asm/ioctls.h", "TCSETSW2", 0x540e}, + {"asm/ioctls.h", "TCSETSF2", 0x540f}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/watchdog.h", "WIOCSTART", 0x570a}, + {"asm/watchdog.h", "WIOCSTOP", 0x570b}, + {"asm/watchdog.h", "WIOCGSTAT", 0x570c}, + {"asm/ioctls.h", "FIOCLEX", 0x6601}, + {"asm/ioctls.h", "FIONCLEX", 0x6602}, + {"asm/ioctls.h", "FIOASYNC", 0x667d}, + {"asm/ioctls.h", "FIONBIO", 0x667e}, + {"asm/ioctls.h", "FIONREAD", 0x667f}, + {"asm/ioctls.h", "FIOQSIZE", 0x6680}, + {"asm/envctrl.h", "ENVCTRL_RD_CPU_TEMPERATURE", 0x7040}, + {"asm/envctrl.h", "ENVCTRL_RD_CPU_VOLTAGE", 0x7041}, + {"asm/envctrl.h", "ENVCTRL_RD_FAN_STATUS", 0x7042}, + {"asm/envctrl.h", "ENVCTRL_RD_WARNING_TEMPERATURE", 0x7043}, + {"asm/envctrl.h", "ENVCTRL_RD_SHUTDOWN_TEMPERATURE", 0x7044}, + {"asm/display7seg.h", "D7SIOCRD", 0x7045}, + {"asm/envctrl.h", "ENVCTRL_RD_VOLTAGE_STATUS", 0x7045}, + {"asm/display7seg.h", "D7SIOCWR", 0x7046}, + {"asm/envctrl.h", "ENVCTRL_RD_SCSI_TEMPERATURE", 0x7046}, + {"asm/display7seg.h", "D7SIOCTM", 0x7047}, + {"asm/envctrl.h", "ENVCTRL_RD_ETHERNET_TEMPERATURE", 0x7047}, + {"asm/envctrl.h", "ENVCTRL_RD_MTHRBD_TEMPERATURE", 0x7048}, + {"asm/envctrl.h", "ENVCTRL_RD_GLOBALADDRESS", 0x7049}, + {"asm/ioctls.h", "TIOCGETD", 0x7400}, + {"asm/ioctls.h", "TIOCSETD", 0x7401}, + {"asm/ioctls.h", "TIOCEXCL", 0x740d}, + {"asm/ioctls.h", "TIOCNXCL", 0x740e}, + {"asm/ioctls.h", "TIOCCONS", 0x7424}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x7464}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x7465}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x7467}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x7468}, + {"asm/ioctls.h", "TIOCMGET", 0x746a}, + {"asm/ioctls.h", "TIOCMBIC", 0x746b}, + {"asm/ioctls.h", "TIOCMBIS", 0x746c}, + {"asm/ioctls.h", "TIOCMSET", 0x746d}, + {"asm/ioctls.h", "TIOCSTART", 0x746e}, + {"asm/ioctls.h", "TIOCSTOP", 0x746f}, + {"asm/ioctls.h", "TIOCPKT", 0x7470}, + {"asm/ioctls.h", "TIOCNOTTY", 0x7471}, + {"asm/ioctls.h", "TIOCSTI", 0x7472}, + {"asm/ioctls.h", "TIOCOUTQ", 0x7473}, + {"asm/ioctls.h", "TIOCCBRK", 0x747a}, + {"asm/ioctls.h", "TIOCSBRK", 0x747b}, + {"asm/ioctls.h", "TIOCSPGRP", 0x7482}, + {"asm/ioctls.h", "TIOCGPGRP", 0x7483}, + {"asm/ioctls.h", "TIOCSCTTY", 0x7484}, + {"asm/ioctls.h", "TIOCGSID", 0x7485}, + {"asm/ioctls.h", "TIOCGPTN", 0x7486}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x7487}, + {"asm/ioctls.h", "TIOCSIG", 0x7488}, + {"asm/sockios.h", "FIOSETOWN", 0x8901}, + {"asm/sockios.h", "SIOCSPGRP", 0x8902}, + {"asm/sockios.h", "FIOGETOWN", 0x8903}, + {"asm/sockios.h", "SIOCGPGRP", 0x8904}, + {"asm/sockios.h", "SIOCATMARK", 0x8905}, + {"asm/sockios.h", "SIOCGSTAMP", 0x8906}, + {"asm/sockios.h", "SIOCGSTAMPNS", 0x8907}, diff --git a/alice-strace/linux/sparc/ioctlent1.h b/alice-strace/linux/sparc/ioctlent1.h new file mode 100644 index 0000000..7119c87 --- /dev/null +++ b/alice-strace/linux/sparc/ioctlent1.h @@ -0,0 +1,429 @@ +{"sys/dkio.h", "DKIOCGGEOM", 0x401}, +{"sys/dkio.h", "DKIOCSGEOM", 0x402}, +{"sys/dkio.h", "DKIOCINFO", 0x403}, +{"sys/dkio.h", "DKIOCSAPART", 0x404}, +{"sys/dkio.h", "DKIOCGAPART", 0x405}, +{"sys/dkio.h", "DKIOCEJECT", 0x406}, +{"sys/dkio.h", "DKIOCLOCK", 0x407}, +{"sys/dkio.h", "DKIOCUNLOCK", 0x408}, +{"sys/dkio.h", "DKIOCGVTOC", 0x40b}, +{"sys/dkio.h", "DKIOCSVTOC", 0x40c}, +{"sys/dkio.h", "DKIOCSTATE", 0x40d}, +{"sys/fdio.h", "FDIOGCHAR", 0x433}, +{"sys/fdio.h", "FDIOSCHAR", 0x434}, +{"sys/fdio.h", "FDEJECT", 0x435}, +{"sys/fdio.h", "FDGETCHANGE", 0x436}, +{"sys/fdio.h", "FDGETDRIVECHAR", 0x437}, +{"sys/fdio.h", "FDSETDRIVECHAR", 0x438}, +{"sys/fdio.h", "FDGETSEARCH", 0x439}, +{"sys/fdio.h", "FDSETSEARCH", 0x43a}, +{"sys/fdio.h", "FDIOCMD", 0x43b}, +{"sys/fdio.h", "FDRAW", 0x446}, +{"sys/fdio.h", "FDDEFGEOCHAR", 0x456}, +{"sys/hdio.h", "HDKIOCSTYPE", 0x465}, +{"sys/hdio.h", "HDKIOCGTYPE", 0x466}, +{"sys/hdio.h", "HDKIOCSBAD", 0x467}, +{"sys/hdio.h", "HDKIOCGBAD", 0x468}, +{"sys/hdio.h", "HDKIOCSCMD", 0x469}, +{"sys/hdio.h", "HDKIOCGDIAG", 0x46a}, +{"sys/cdio.h", "CDROMPAUSE", 0x497}, +{"sys/cdio.h", "CDROMRESUME", 0x498}, +{"sys/cdio.h", "CDROMPLAYMSF", 0x499}, +{"sys/cdio.h", "CDROMPLAYTRKIND", 0x49a}, +{"sys/cdio.h", "CDROMREADTOCHDR", 0x49b}, +{"sys/cdio.h", "CDROMREADTOCENTRY", 0x49c}, +{"sys/cdio.h", "CDROMSTOP", 0x49d}, +{"sys/cdio.h", "CDROMSTART", 0x49e}, +{"sys/cdio.h", "CDROMEJECT", 0x49f}, +{"sys/cdio.h", "CDROMVOLCTRL", 0x4a0}, +{"sys/cdio.h", "CDROMSUBCHNL", 0x4a1}, +{"sys/cdio.h", "CDROMREADMODE2", 0x4a2}, +{"sys/cdio.h", "CDROMREADMODE1", 0x4a3}, +{"sys/cdio.h", "CDROMREADOFFSET", 0x4a4}, +{"sys/cdio.h", "CDROMGBLKMODE", 0x4a5}, +{"sys/cdio.h", "CDROMSBLKMODE", 0x4a6}, +{"sys/cdio.h", "CDROMCDDA", 0x4a7}, +{"sys/cdio.h", "CDROMCDXA", 0x4a8}, +{"sys/cdio.h", "CDROMSUBCODE", 0x4a9}, +{"sys/cdio.h", "CDROMGDRVSPEED", 0x4aa}, +{"sys/cdio.h", "CDROMSDRVSPEED", 0x4ab}, +{"sys/scsi/impl/uscsi.h", "USCSICMD", 0x4c9}, +{"sys/bufmod.h", "SBIOCSTIME", 0x4201}, +{"sys/bufmod.h", "SBIOCGTIME", 0x4202}, +{"sys/bufmod.h", "SBIOCCTIME", 0x4203}, +{"sys/bufmod.h", "SBIOCSCHUNK", 0x4204}, +{"sys/bufmod.h", "SBIOCGCHUNK", 0x4205}, +{"sys/bufmod.h", "SBIOCSSNAP", 0x4206}, +{"sys/bufmod.h", "SBIOCGSNAP", 0x4207}, +{"sys/bufmod.h", "SBIOCSFLAGS", 0x4208}, +{"sys/bufmod.h", "SBIOCGFLAGS", 0x4209}, +{"sys/termios.h", "LDOPEN", 0x4400}, +{"sys/termios.h", "LDCLOSE", 0x4401}, +{"sys/dlpi.h", "DLIOCRAW", 0x4401}, +{"sys/sad.h", "SAD_SAP", 0x4401}, +{"sys/termios.h", "LDCHG", 0x4402}, +{"sys/sad.h", "SAD_GAP", 0x4402}, +{"sys/sad.h", "SAD_VML", 0x4403}, +{"sys/termios.h", "LDGETT", 0x4408}, +{"sys/termios.h", "LDSETT", 0x4409}, +{"sys/dlpi.h", "DL_IOC_HDR_INFO", 0x440a}, +{"sys/termios.h", "LDSMAP", 0x446e}, +{"sys/termios.h", "LDGMAP", 0x446f}, +{"sys/termios.h", "LDNMAP", 0x4470}, +{"sys/termios.h", "LDEMAP", 0x4471}, +{"sys/termios.h", "LDDMAP", 0x4472}, +{"sys/fbio.h", "FBIOGTYPE", 0x4600}, +{"sys/fbio.h", "FBIOGINFO", 0x4602}, +{"sys/fbio.h", "FBIOPUTCMAP", 0x4603}, +{"sys/fbio.h", "FBIOGETCMAP", 0x4604}, +{"sys/fbio.h", "FBIOSATTR", 0x4605}, +{"sys/fbio.h", "FBIOGATTR", 0x4606}, +{"sys/fbio.h", "FBIOSVIDEO", 0x4607}, +{"sys/fbio.h", "FBIOGVIDEO", 0x4608}, +{"sys/fbio.h", "FBIOVERTICAL", 0x4609}, +{"sys/fbio.h", "GRABPAGEALLOC", 0x460a}, +{"sys/fbio.h", "GRABPAGEFREE", 0x460b}, +{"sys/fbio.h", "GRABATTACH", 0x460c}, +{"sys/fbio.h", "FBIOGPLNGRP", 0x460d}, +{"sys/fbio.h", "FBIOGCMSIZE", 0x460e}, +{"sys/fbio.h", "FBIOSCMSIZE", 0x460f}, +{"sys/fbio.h", "FBIOSCMS", 0x4610}, +{"sys/fbio.h", "FBIOAVAILPLNGRP", 0x4611}, +{"sys/fbio.h", "FBIODBLGINFO", 0x4612}, +{"sys/fbio.h", "FBIODBLSINFO", 0x4613}, +{"sys/fbio.h", "FBIOSWINFD", 0x4614}, +{"sys/fbio.h", "FBIOSAVWINFD", 0x4615}, +{"sys/fbio.h", "FBIORESWINFD", 0x4616}, +{"sys/fbio.h", "FBIOSRWINFD", 0x4617}, +{"sys/visual_io.h", "VIS_SETCURSOR", 0x4618}, +{"sys/fbio.h", "FBIOSCURSOR", 0x4618}, +{"sys/fbio.h", "FBIOGCURSOR", 0x4619}, +{"sys/visual_io.h", "VIS_GETCURSOR", 0x4619}, +{"sys/fbio.h", "FBIOSCURPOS", 0x461a}, +{"sys/visual_io.h", "VIS_MOVECURSOR", 0x461a}, +{"sys/fbio.h", "FBIOGCURPOS", 0x461b}, +{"sys/visual_io.h", "VIS_GETCURSORPOS", 0x461b}, +{"sys/fbio.h", "FBIOGCURMAX", 0x461c}, +{"sys/fbio.h", "GRABLOCKINFO", 0x461d}, +{"sys/fbio.h", "FBIO_WID_ALLOC", 0x461e}, +{"sys/fbio.h", "FBIO_WID_FREE", 0x461f}, +{"sys/fbio.h", "FBIO_WID_PUT", 0x4620}, +{"sys/fbio.h", "FBIO_WID_GET", 0x4621}, +{"sys/fbio.h", "FBIO_DEVID", 0x4622}, +{"sys/fbio.h", "FBIO_U_RST", 0x4623}, +{"sys/fbio.h", "FBIO_FULLSCREEN_ELIMINATION_GROUPS", 0x4624}, +{"sys/fbio.h", "FBIO_WID_DBL_SET", 0x4625}, +{"sys/fbio.h", "FBIOVRTOFFSET", 0x4626}, +{"sys/fbio.h", "FBIOGXINFO", 0x4627}, +{"sys/fbio.h", "FBIOMONINFO", 0x4628}, +{"sys/fbio.h", "FBIOPUTCMAPI", 0x4629}, +{"sys/fbio.h", "FBIOGETCMAPI", 0x462a}, +{"sys/fbio.h", "FBIO_ASSIGNWID", 0x462b}, +{"sys/fbio.h", "FBIO_STEREO", 0x462c}, +{"sys/gpio.h", "GP1IO_PUT_INFO", 0x4700}, +{"sys/gpio.h", "GP1IO_GET_STATIC_BLOCK", 0x4701}, +{"sys/gpio.h", "GP1IO_FREE_STATIC_BLOCK", 0x4702}, +{"sys/gpio.h", "GP1IO_GET_GBUFFER_STATE", 0x4703}, +{"sys/gpio.h", "GP1IO_CHK_GP", 0x4704}, +{"sys/gpio.h", "GP1IO_GET_RESTART_COUNT", 0x4705}, +{"sys/gpio.h", "GP1IO_REDIRECT_DEVFB", 0x4706}, +{"sys/gpio.h", "GP1IO_GET_REQDEV", 0x4707}, +{"sys/gpio.h", "GP1IO_GET_TRUMINORDEV", 0x4708}, +{"sys/gpio.h", "GP1IO_CHK_FOR_GBUFFER", 0x4709}, +{"sys/gpio.h", "GP1IO_SET_USING_GBUFFER", 0x470a}, +{"sys/gpio.h", "GP1IO_INFO_STATIC_BLOCK", 0x470b}, +{"sys/sockmod.h", "O_SI_GETUDATA", 0x4965}, +{"sys/sockmod.h", "SI_SHUTDOWN", 0x4966}, +{"sys/sockmod.h", "SI_LISTEN", 0x4967}, +{"sys/sockmod.h", "SI_SETMYNAME", 0x4968}, +{"sys/sockmod.h", "SI_SETPEERNAME", 0x4969}, +{"sys/sockmod.h", "SI_GETINTRANSIT", 0x496a}, +{"sys/sockmod.h", "SI_SOCKPARAMS", 0x496d}, +{"sys/sockmod.h", "SI_GETUDATA", 0x496e}, +{"sys/strlog.h", "I_TRCLOG", 0x4c01}, +{"sys/strlog.h", "I_ERRLOG", 0x4c02}, +{"sys/strlog.h", "I_CONSLOG", 0x4c03}, +{"sys/cg14io.h", "MDI_RESET", 0x4d01}, +{"sys/cg14io.h", "MDI_GET_CFGINFO", 0x4d02}, +{"sys/cg14io.h", "MDI_SET_PIXELMODE", 0x4d03}, +{"sys/cg14io.h", "MDI_SET_COUNTERS", 0x4d04}, +{"sys/cg14io.h", "MDI_SET_PPR", 0x4d05}, +{"sys/cg14io.h", "MDI_VRT_CNTL", 0x4d06}, +{"sys/cg14io.h", "MDI_SET_CLUT", 0x4d07}, +{"sys/cg14io.h", "MDI_GET_CLUT", 0x4d08}, +{"sys/cg14io.h", "MDI_SET_XLUT", 0x4d09}, +{"sys/cg14io.h", "MDI_GET_XLUT", 0x4d0a}, +{"sys/cg14io.h", "MDI_GAMMA_CORRECT", 0x4d0b}, +{"sys/cg14io.h", "MDI_SET_GAMMALUT", 0x4d0c}, +{"sys/cg14io.h", "MDI_GET_GAMMALUT", 0x4d0d}, +{"sys/cg14io.h", "MDI_SET_DEGAMMALUT", 0x4d0e}, +{"sys/cg14io.h", "MDI_GET_DEGAMMALUT", 0x4d0f}, +{"sys/cg14io.h", "MDI_GET_BUFFER_INFO", 0x4d10}, +{"sys/cg14io.h", "MDI_SET_CURSOR", 0x4d11}, +{"sys/cg14io.h", "MDI_GET_DIAGINFO", 0x4d12}, +{"sys/cg14io.h", "MDI_SET_RESOLUTION", 0x4d13}, +{"sys/cg14io.h", "SET_MONITOR_POWER", 0x4d14}, +{"sys/openpromio.h", "OPROMGETBOOTARGS", 0x4f0c}, +{"sys/pfmod.h", "PFIOCSETF", 0x5001}, +{"sys/stropts.h", "I_NREAD", 0x5301}, +{"sys/stropts.h", "I_PUSH", 0x5302}, +{"sys/stropts.h", "I_POP", 0x5303}, +{"sys/stropts.h", "I_LOOK", 0x5304}, +{"sys/stropts.h", "I_FLUSH", 0x5305}, +{"sys/stropts.h", "I_SRDOPT", 0x5306}, +{"sys/stropts.h", "I_GRDOPT", 0x5307}, +{"sys/stropts.h", "I_STR", 0x5308}, +{"sys/stropts.h", "I_SETSIG", 0x5309}, +{"sys/stropts.h", "I_GETSIG", 0x530a}, +{"sys/stropts.h", "I_FIND", 0x530b}, +{"sys/stropts.h", "I_LINK", 0x530c}, +{"sys/stropts.h", "I_UNLINK", 0x530d}, +{"sys/stropts.h", "I_RECVFD", 0x530e}, +{"sys/stropts.h", "I_PEEK", 0x530f}, +{"sys/stropts.h", "I_FDINSERT", 0x5310}, +{"sys/stropts.h", "I_SENDFD", 0x5311}, +{"sys/stropts.h", "I_SWROPT", 0x5313}, +{"sys/stropts.h", "I_GWROPT", 0x5314}, +{"sys/stropts.h", "I_LIST", 0x5315}, +{"sys/stropts.h", "I_PLINK", 0x5316}, +{"sys/stropts.h", "I_PUNLINK", 0x5317}, +{"sys/stropts.h", "I_SETEV", 0x5318}, +{"sys/stropts.h", "I_GETEV", 0x5319}, +{"sys/stropts.h", "I_STREV", 0x531a}, +{"sys/stropts.h", "I_UNSTREV", 0x531b}, +{"sys/stropts.h", "I_FLUSHBAND", 0x531c}, +{"sys/stropts.h", "I_CKBAND", 0x531d}, +{"sys/stropts.h", "I_GETBAND", 0x531e}, +{"sys/stropts.h", "I_ATMARK", 0x531f}, +{"sys/stropts.h", "I_SETCLTIME", 0x5320}, +{"sys/stropts.h", "I_GETCLTIME", 0x5321}, +{"sys/stropts.h", "I_CANPUT", 0x5322}, +{"sys/termios.h", "TCGETA", 0x5401}, +{"sys/termios.h", "TCSETA", 0x5402}, +{"sys/termios.h", "TCSETAW", 0x5403}, +{"sys/termios.h", "TCSETAF", 0x5404}, +{"sys/termios.h", "TCSBRK", 0x5405}, +{"sys/termios.h", "TCXONC", 0x5406}, +{"sys/termios.h", "TCFLSH", 0x5407}, +{"sys/termios.h", "TIOCKBON", 0x5408}, +{"sys/termios.h", "TIOCKBOF", 0x5409}, +{"sys/termios.h", "KBENABLED", 0x540a}, +{"sys/termios.h", "TCGETS", 0x540d}, +{"sys/termios.h", "TCSETS", 0x540e}, +{"sys/termios.h", "TCSANOW", 0x540e}, +{"sys/termios.h", "TCSADRAIN", 0x540f}, +{"sys/termios.h", "TCSETSW", 0x540f}, +{"sys/termios.h", "TCSAFLUSH", 0x5410}, +{"sys/termios.h", "TCSETSF", 0x5410}, +{"sys/termio.h", "TCDSET", 0x5420}, +{"sys/termios.h", "TCDSET", 0x5420}, +{"sys/termios.h", "RTS_TOG", 0x5421}, +{"sys/ttold.h", "TIOCSWINSZ", 0x5467}, +{"sys/termios.h", "TIOCSWINSZ", 0x5467}, +{"sys/ttold.h", "TIOCGWINSZ", 0x5468}, +{"sys/termios.h", "TIOCGWINSZ", 0x5468}, +{"sys/termios.h", "TIOCGSOFTCAR", 0x5469}, +{"sys/termios.h", "TIOCSSOFTCAR", 0x546a}, +{"sys/timod.h", "TI_GETINFO", 0x548c}, +{"sys/timod.h", "TI_OPTMGMT", 0x548d}, +{"sys/timod.h", "TI_BIND", 0x548e}, +{"sys/timod.h", "TI_UNBIND", 0x548f}, +{"sys/timod.h", "TI_GETMYNAME", 0x5490}, +{"sys/timod.h", "TI_GETPEERNAME", 0x5491}, +{"sys/timod.h", "TI_SETMYNAME", 0x5492}, +{"sys/timod.h", "TI_SETPEERNAME", 0x5493}, +{"sys/termiox.h", "TCGETX", 0x5801}, +{"sys/termiox.h", "TCSETX", 0x5802}, +{"sys/termiox.h", "TCSETXW", 0x5803}, +{"sys/termiox.h", "TCSETXF", 0x5804}, +{"sys/ioctl.h", "DIOCGETC", 0x6401}, +{"sys/ioctl.h", "DIOCGETB", 0x6402}, +{"sys/ioctl.h", "DIOCSETE", 0x6403}, +{"sys/termios.h", "DIOCGETP", 0x6408}, +{"sys/termios.h", "DIOCSETP", 0x6409}, +{"sys/jioctl.h", "JBOOT", 0x6a01}, +{"sys/jioctl.h", "JTERM", 0x6a02}, +{"sys/jioctl.h", "JMPX", 0x6a03}, +{"sys/jioctl.h", "JWINSIZE", 0x6a05}, +{"sys/jioctl.h", "JZOMBOOT", 0x6a07}, +{"sys/jioctl.h", "JAGENT", 0x6a09}, +{"sys/jioctl.h", "JTRUN", 0x6a0a}, +{"sys/jioctl.h", "JXTPROTO", 0x6a0b}, +{"sys/kbio.h", "KIOCTRANS", 0x6b00}, +{"sys/kbio.h", "KIOCSETKEY", 0x6b01}, +{"sys/kbio.h", "KIOCGETKEY", 0x6b02}, +{"sys/kbio.h", "KIOCGTRANS", 0x6b05}, +{"sys/kbio.h", "KIOCTRANSABLE", 0x6b06}, +{"sys/kbio.h", "KIOCGTRANSABLE", 0x6b07}, +{"sys/kbio.h", "KIOCCMD", 0x6b08}, +{"sys/kbio.h", "KIOCTYPE", 0x6b09}, +{"sys/kbio.h", "KIOCSDIRECT", 0x6b0a}, +{"sys/kbio.h", "KIOCGDIRECT", 0x6b0b}, +{"sys/kbio.h", "KIOCSKEY", 0x6b0c}, +{"sys/kbio.h", "KIOCGKEY", 0x6b0d}, +{"sys/kbio.h", "KIOCSLED", 0x6b0e}, +{"sys/kbio.h", "KIOCGLED", 0x6b0f}, +{"sys/kbio.h", "KIOCSCOMPAT", 0x6b10}, +{"sys/kbio.h", "KIOCGCOMPAT", 0x6b11}, +{"sys/kbio.h", "KIOCLAYOUT", 0x6b14}, +{"sys/ioctl.h", "LIOCGETP", 0x6c01}, +{"sys/ioctl.h", "LIOCSETP", 0x6c02}, +{"sys/ioctl.h", "LIOCGETS", 0x6c05}, +{"sys/ioctl.h", "LIOCSETS", 0x6c06}, +{"sys/mtio.h", "MTIOCTOP", 0x6d01}, +{"sys/msio.h", "MSIOGETPARMS", 0x6d01}, +{"sys/msio.h", "MSIOSETPARMS", 0x6d02}, +{"sys/mtio.h", "MTIOCGET", 0x6d02}, +{"sys/mtio.h", "MTIOCGETDRIVETYPE", 0x6d03}, +{"sys/procfs.h", "PIOCSTATUS", 0x7101}, +{"sys/procfs.h", "PIOCSTOP", 0x7102}, +{"sys/procfs.h", "PIOCWSTOP", 0x7103}, +{"sys/procfs.h", "PIOCRUN", 0x7104}, +{"sys/procfs.h", "PIOCGTRACE", 0x7105}, +{"sys/procfs.h", "PIOCSTRACE", 0x7106}, +{"sys/procfs.h", "PIOCSSIG", 0x7107}, +{"sys/procfs.h", "PIOCKILL", 0x7108}, +{"sys/procfs.h", "PIOCUNKILL", 0x7109}, +{"sys/procfs.h", "PIOCGHOLD", 0x710a}, +{"sys/procfs.h", "PIOCSHOLD", 0x710b}, +{"sys/procfs.h", "PIOCMAXSIG", 0x710c}, +{"sys/procfs.h", "PIOCACTION", 0x710d}, +{"sys/procfs.h", "PIOCGFAULT", 0x710e}, +{"sys/procfs.h", "PIOCSFAULT", 0x710f}, +{"sys/procfs.h", "PIOCCFAULT", 0x7110}, +{"sys/procfs.h", "PIOCGENTRY", 0x7111}, +{"sys/procfs.h", "PIOCSENTRY", 0x7112}, +{"sys/procfs.h", "PIOCGEXIT", 0x7113}, +{"sys/procfs.h", "PIOCSEXIT", 0x7114}, +{"sys/procfs.h", "PIOCSFORK", 0x7115}, +{"sys/procfs.h", "PIOCRFORK", 0x7116}, +{"sys/procfs.h", "PIOCSRLC", 0x7117}, +{"sys/procfs.h", "PIOCRRLC", 0x7118}, +{"sys/procfs.h", "PIOCGREG", 0x7119}, +{"sys/procfs.h", "PIOCSREG", 0x711a}, +{"sys/procfs.h", "PIOCGFPREG", 0x711b}, +{"sys/procfs.h", "PIOCSFPREG", 0x711c}, +{"sys/procfs.h", "PIOCNICE", 0x711d}, +{"sys/procfs.h", "PIOCPSINFO", 0x711e}, +{"sys/procfs.h", "PIOCNMAP", 0x711f}, +{"sys/procfs.h", "PIOCMAP", 0x7120}, +{"sys/procfs.h", "PIOCOPENM", 0x7121}, +{"sys/procfs.h", "PIOCCRED", 0x7122}, +{"sys/procfs.h", "PIOCGROUPS", 0x7123}, +{"sys/procfs.h", "PIOCGETPR", 0x7124}, +{"sys/procfs.h", "PIOCGETU", 0x7125}, +{"sys/procfs.h", "PIOCSET", 0x7126}, +{"sys/procfs.h", "PIOCRESET", 0x7127}, +{"sys/procfs.h", "PIOCNWATCH", 0x7128}, +{"sys/procfs.h", "PIOCGWATCH", 0x7129}, +{"sys/procfs.h", "PIOCSWATCH", 0x712a}, +{"sys/procfs.h", "PIOCUSAGE", 0x712b}, +{"sys/procfs.h", "PIOCOPENPD", 0x712c}, +{"sys/procfs.h", "PIOCLWPIDS", 0x712d}, +{"sys/procfs.h", "PIOCOPENLWP", 0x712e}, +{"sys/procfs.h", "PIOCLSTATUS", 0x712f}, +{"sys/procfs.h", "PIOCLUSAGE", 0x7130}, +{"sys/procfs.h", "PIOCNAUXV", 0x7131}, +{"sys/procfs.h", "PIOCAUXV", 0x7132}, +{"sys/procfs.h", "PIOCGWIN", 0x7165}, +{"sys/ttold.h", "TIOCGETD", 0x7400}, +{"sys/termios.h", "TIOCGETD", 0x7400}, +{"sys/termios.h", "TIOCSETD", 0x7401}, +{"sys/ttold.h", "TIOCSETD", 0x7401}, +{"sys/termios.h", "TIOCHPCL", 0x7402}, +{"sys/ttold.h", "TIOCHPCL", 0x7402}, +{"sys/ttold.h", "TIOCGETP", 0x7408}, +{"sys/termios.h", "TIOCGETP", 0x7408}, +{"sys/termios.h", "TIOCSETP", 0x7409}, +{"sys/ttold.h", "TIOCSETP", 0x7409}, +{"sys/ttold.h", "TIOCSETN", 0x740a}, +{"sys/termios.h", "TIOCSETN", 0x740a}, +{"sys/ttold.h", "TIOCEXCL", 0x740d}, +{"sys/termios.h", "TIOCEXCL", 0x740d}, +{"sys/ttold.h", "TIOCNXCL", 0x740e}, +{"sys/termios.h", "TIOCNXCL", 0x740e}, +{"sys/termios.h", "TIOCFLUSH", 0x7410}, +{"sys/ttold.h", "TIOCFLUSH", 0x7410}, +{"sys/termios.h", "TIOCSETC", 0x7411}, +{"sys/ttold.h", "TIOCSETC", 0x7411}, +{"sys/termios.h", "TIOCGETC", 0x7412}, +{"sys/ttold.h", "TIOCGETC", 0x7412}, +{"sys/termios.h", "TIOCGPGRP", 0x7414}, +{"sys/termios.h", "TIOCSPGRP", 0x7415}, +{"sys/termios.h", "TIOCGSID", 0x7416}, +{"sys/termios.h", "TIOCSTI", 0x7417}, +{"sys/termios.h", "TIOCSSID", 0x7418}, +{"sys/termios.h", "TIOCMSET", 0x741a}, +{"sys/termios.h", "TIOCMBIS", 0x741b}, +{"sys/termios.h", "TIOCMBIC", 0x741c}, +{"sys/termios.h", "TIOCMGET", 0x741d}, +{"sys/termios.h", "TIOCREMOTE", 0x741e}, +{"sys/ttold.h", "TIOCREMOTE", 0x741e}, +{"sys/termios.h", "TIOCSIGNAL", 0x741f}, +{"sys/termios.h", "TIOCSTART", 0x746e}, +{"sys/ttold.h", "TIOCSTART", 0x746e}, +{"sys/termios.h", "TIOCSTOP", 0x746f}, +{"sys/ttold.h", "TIOCSTOP", 0x746f}, +{"sys/ttold.h", "TIOCNOTTY", 0x7471}, +{"sys/termios.h", "TIOCNOTTY", 0x7471}, +{"sys/termios.h", "TIOCOUTQ", 0x7473}, +{"sys/ttold.h", "TIOCOUTQ", 0x7473}, +{"sys/termios.h", "TIOCGLTC", 0x7474}, +{"sys/ttold.h", "TIOCGLTC", 0x7474}, +{"sys/termios.h", "TIOCSLTC", 0x7475}, +{"sys/ttold.h", "TIOCSLTC", 0x7475}, +{"sys/termios.h", "TIOCCDTR", 0x7478}, +{"sys/ttold.h", "TIOCCDTR", 0x7478}, +{"sys/ttold.h", "TIOCSDTR", 0x7479}, +{"sys/termios.h", "TIOCSDTR", 0x7479}, +{"sys/termios.h", "TIOCCBRK", 0x747a}, +{"sys/ttold.h", "TIOCCBRK", 0x747a}, +{"sys/termios.h", "TIOCSBRK", 0x747b}, +{"sys/ttold.h", "TIOCSBRK", 0x747b}, +{"sys/termios.h", "TIOCLGET", 0x747c}, +{"sys/ttold.h", "TIOCLGET", 0x747c}, +{"sys/termios.h", "TIOCLSET", 0x747d}, +{"sys/ttold.h", "TIOCLSET", 0x747d}, +{"sys/ttold.h", "TIOCLBIC", 0x747e}, +{"sys/termios.h", "TIOCLBIC", 0x747e}, +{"sys/ttold.h", "TIOCLBIS", 0x747f}, +{"sys/termios.h", "TIOCLBIS", 0x747f}, +{"sys/vol.h", "VOLIOCMAP", 0x7601}, +{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601}, +{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601}, +{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602}, +{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602}, +{"sys/vol.h", "VOLIOCUNMAP", 0x7602}, +{"sys/vol.h", "VOLIOCEVENT", 0x7603}, +{"sys/vuid_event.h", "VUIDSADDR", 0x7603}, +{"sys/vuid_event.h", "VUIDSADDR", 0x7603}, +{"sys/vuid_event.h", "VUIDGADDR", 0x7604}, +{"sys/vuid_event.h", "VUIDGADDR", 0x7604}, +{"sys/vol.h", "VOLIOCEJECT", 0x7604}, +{"sys/vol.h", "VOLIOCCHECK", 0x7605}, +{"sys/vol.h", "VOLIOCINUSE", 0x7606}, +{"sys/vol.h", "VOLIOCDGATTR", 0x7607}, +{"sys/vol.h", "VOLIOCDSATTR", 0x7608}, +{"sys/vol.h", "VOLIOCDCHECK", 0x7609}, +{"sys/vol.h", "VOLIOCCANCEL", 0x760a}, +{"sys/vol.h", "VOLIOCINFO", 0x760b}, +{"sys/vol.h", "VOLIOCSATTR", 0x760c}, +{"sys/vol.h", "VOLIOCGATTR", 0x760d}, +{"sys/vol.h", "VOLIOCDINUSE", 0x760e}, +{"sys/vol.h", "VOLIOCDAEMON", 0x760f}, +{"sys/vol.h", "VOLIOCFLAGS", 0x7610}, +{"sys/vol.h", "VOLIOCEXTRA4", 0x7611}, +{"sys/vol.h", "VOLIOCEXTRA5", 0x7612}, +{"sys/vol.h", "VOLIOCEXTRA6", 0x7613}, +{"sys/vol.h", "VOLIOCEXTRA7", 0x7614}, +{"sys/ser_sync.h", "S_IOCGETMODE", 0x7a01}, +{"sys/ser_sync.h", "S_IOCSETMODE", 0x7a02}, +{"sys/ser_sync.h", "S_IOCGETSTATS", 0x7a03}, +{"sys/ser_sync.h", "S_IOCCLRSTATS", 0x7a04}, +{"sys/ser_sync.h", "S_IOCGETSPEED", 0x7a05}, +{"sys/ser_sync.h", "S_IOCGETMRU", 0x7a06}, +{"sys/ser_sync.h", "S_IOCSETMRU", 0x7a07}, +{"sys/ser_sync.h", "S_IOCGETMTU", 0x7a08}, +{"sys/ser_sync.h", "S_IOCSETMTU", 0x7a09}, +{"sys/ser_sync.h", "S_IOCGETMCTL", 0x7a0a}, +{"sys/tl.h", "TL_IOC_CREDOPT", 0x544c01}, diff --git a/alice-strace/linux/sparc/signalent.h b/alice-strace/linux/sparc/signalent.h new file mode 100644 index 0000000..e059b5d --- /dev/null +++ b/alice-strace/linux/sparc/signalent.h @@ -0,0 +1,32 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGURG", /* 16 */ + "SIGSTOP", /* 17 */ + "SIGTSTP", /* 18 */ + "SIGCONT", /* 19 */ + "SIGCHLD", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGIO", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGLOST", /* 29 */ + "SIGUSR1", /* 30 */ + "SIGUSR2", /* 31 */ diff --git a/alice-strace/linux/sparc/signalent1.h b/alice-strace/linux/sparc/signalent1.h new file mode 100644 index 0000000..58869a5 --- /dev/null +++ b/alice-strace/linux/sparc/signalent1.h @@ -0,0 +1,36 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGUSR1", /* 16 */ + "SIGUSR2", /* 17 */ + "SIGCHLD", /* 18 */ + "SIGPWR", /* 19 */ + "SIGWINCH", /* 20 */ + "SIGURG", /* 21 */ + "SIGPOLL", /* 22 */ + "SIGSTOP", /* 23 */ + "SIGTSTP", /* 24 */ + "SIGCONT", /* 25 */ + "SIGTTIN", /* 26 */ + "SIGTTOU", /* 27 */ + "SIGVTALRM", /* 28 */ + "SIGPROF", /* 29 */ + "SIGXCPU", /* 30 */ + "SIGXFSZ", /* 31 */ + "SIGWAITING", /* 32 */ + "SIGLWP", /* 33 */ + "SIGFREEZE", /* 34 */ + "SIGTHAW", /* 35 */ diff --git a/alice-strace/linux/sparc/syscall1.h b/alice-strace/linux/sparc/syscall1.h new file mode 100644 index 0000000..6f30b74 --- /dev/null +++ b/alice-strace/linux/sparc/syscall1.h @@ -0,0 +1,498 @@ +/* + * Copyright (c) 1993, 1994, 1995 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. + */ + +#define SOLARIS_syscall 0 +#define SOLARIS_exit 1 +#define SOLARIS_fork 2 +#define SOLARIS_read 3 +#define SOLARIS_write 4 +#define SOLARIS_open 5 +#define SOLARIS_close 6 +#define SOLARIS_wait 7 +#define SOLARIS_creat 8 +#define SOLARIS_link 9 +#define SOLARIS_unlink 10 +#define SOLARIS_exec 11 +#define SOLARIS_chdir 12 +#define SOLARIS_time 13 +#define SOLARIS_mknod 14 +#define SOLARIS_chmod 15 +#define SOLARIS_chown 16 +#define SOLARIS_brk 17 +#define SOLARIS_stat 18 +#define SOLARIS_lseek 19 +#define SOLARIS_getpid 20 +#define SOLARIS_mount 21 +#define SOLARIS_umount 22 +#define SOLARIS_setuid 23 +#define SOLARIS_getuid 24 +#define SOLARIS_stime 25 +#define SOLARIS_ptrace 26 +#define SOLARIS_alarm 27 +#define SOLARIS_fstat 28 +#define SOLARIS_pause 29 +#define SOLARIS_utime 30 +#define SOLARIS_stty 31 +#define SOLARIS_gtty 32 +#define SOLARIS_access 33 +#define SOLARIS_nice 34 +#define SOLARIS_statfs 35 +#define SOLARIS_sync 36 +#define SOLARIS_kill 37 +#define SOLARIS_fstatfs 38 +#define SOLARIS_pgrpsys 39 +#define SOLARIS_xenix 40 +#define SOLARIS_dup 41 +#define SOLARIS_pipe 42 +#define SOLARIS_times 43 +#define SOLARIS_profil 44 +#define SOLARIS_plock 45 +#define SOLARIS_setgid 46 +#define SOLARIS_getgid 47 +#define SOLARIS_signal 48 +#define SOLARIS_msgsys 49 +#define SOLARIS_syssun 50 +#define SOLARIS_acct 51 +#define SOLARIS_shmsys 52 +#define SOLARIS_semsys 53 +#define SOLARIS_ioctl 54 +#define SOLARIS_uadmin 55 +#define SOLARIS_utssys 57 +#define SOLARIS_fdsync 58 +#define SOLARIS_execve 59 +#define SOLARIS_umask 60 +#define SOLARIS_chroot 61 +#define SOLARIS_fcntl 62 +#define SOLARIS_ulimit 63 +#define SOLARIS_rmdir 79 +#define SOLARIS_mkdir 80 +#define SOLARIS_getdents 81 +#define SOLARIS_sysfs 84 +#define SOLARIS_getmsg 85 +#define SOLARIS_putmsg 86 +#define SOLARIS_poll 87 +#define SOLARIS_lstat 88 +#define SOLARIS_symlink 89 +#define SOLARIS_readlink 90 +#define SOLARIS_setgroups 91 +#define SOLARIS_getgroups 92 +#define SOLARIS_fchmod 93 +#define SOLARIS_fchown 94 +#define SOLARIS_sigprocmask 95 +#define SOLARIS_sigsuspend 96 +#define SOLARIS_sigaltstack 97 +#define SOLARIS_sigaction 98 +#define SOLARIS_sigpending 99 +#define SOLARIS_context 100 +#define SOLARIS_evsys 101 +#define SOLARIS_evtrapret 102 +#define SOLARIS_statvfs 103 +#define SOLARIS_fstatvfs 104 +#define SOLARIS_nfssys 106 +#define SOLARIS_waitsys 107 +#define SOLARIS_sigsendsys 108 +#define SOLARIS_hrtsys 109 +#define SOLARIS_acancel 110 +#define SOLARIS_async 111 +#define SOLARIS_priocntlsys 112 +#define SOLARIS_pathconf 113 +#define SOLARIS_mincore 114 +#define SOLARIS_mmap 115 +#define SOLARIS_mprotect 116 +#define SOLARIS_munmap 117 +#define SOLARIS_fpathconf 118 +#define SOLARIS_vfork 119 +#define SOLARIS_fchdir 120 +#define SOLARIS_readv 121 +#define SOLARIS_writev 122 +#define SOLARIS_xstat 123 +#define SOLARIS_lxstat 124 +#define SOLARIS_fxstat 125 +#define SOLARIS_xmknod 126 +#define SOLARIS_clocal 127 +#define SOLARIS_setrlimit 128 +#define SOLARIS_getrlimit 129 +#define SOLARIS_lchown 130 +#define SOLARIS_memcntl 131 +#define SOLARIS_getpmsg 132 +#define SOLARIS_putpmsg 133 +#define SOLARIS_rename 134 +#define SOLARIS_uname 135 +#define SOLARIS_setegid 136 +#define SOLARIS_sysconfig 137 +#define SOLARIS_adjtime 138 +#define SOLARIS_systeminfo 139 +#define SOLARIS_seteuid 141 +#define SOLARIS_vtrace 142 +#define SOLARIS_fork1 143 +#define SOLARIS_sigtimedwait 144 +#define SOLARIS_lwp_info 145 +#define SOLARIS_yield 146 +#define SOLARIS_lwp_sema_wait 147 +#define SOLARIS_lwp_sema_post 148 +#define SOLARIS_modctl 152 +#define SOLARIS_fchroot 153 +#define SOLARIS_utimes 154 +#define SOLARIS_vhangup 155 +#define SOLARIS_gettimeofday 156 +#define SOLARIS_getitimer 157 +#define SOLARIS_setitimer 158 +#define SOLARIS_lwp_create 159 +#define SOLARIS_lwp_exit 160 +#define SOLARIS_lwp_suspend 161 +#define SOLARIS_lwp_continue 162 +#define SOLARIS_lwp_kill 163 +#define SOLARIS_lwp_self 164 +#define SOLARIS_lwp_setprivate 165 +#define SOLARIS_lwp_getprivate 166 +#define SOLARIS_lwp_wait 167 +#define SOLARIS_lwp_mutex_unlock 168 +#define SOLARIS_lwp_mutex_lock 169 +#define SOLARIS_lwp_cond_wait 170 +#define SOLARIS_lwp_cond_signal 171 +#define SOLARIS_lwp_cond_broadcast 172 +#define SOLARIS_pread 173 +#define SOLARIS_pwrite 174 +#define SOLARIS_llseek 175 +#define SOLARIS_inst_sync 176 +#define SOLARIS_kaio 178 +#define SOLARIS_tsolsys 184 +#define SOLARIS_acl 185 +#define SOLARIS_auditsys 186 +#define SOLARIS_processor_bind 187 +#define SOLARIS_processor_info 188 +#define SOLARIS_p_online 189 +#define SOLARIS_sigqueue 190 +#define SOLARIS_clock_gettime 191 +#define SOLARIS_clock_settime 192 +#define SOLARIS_clock_getres 193 +#define SOLARIS_timer_create 194 +#define SOLARIS_timer_delete 195 +#define SOLARIS_timer_settime 196 +#define SOLARIS_timer_gettime 197 +#define SOLARIS_timer_getoverrun 198 +#define SOLARIS_nanosleep 199 +#define SOLARIS_facl 200 +#define SOLARIS_door 201 +#define SOLARIS_setreuid 202 +#define SOLARIS_setregid 203 +#define SOLARIS_signotifywait 210 +#define SOLARIS_lwp_sigredirect 211 +#define SOLARIS_lwp_alarm 212 + +#include "dummy2.h" + +extern int solaris_syscall(); +extern int solaris_exit(); +extern int solaris_fork(); +extern int solaris_read(); +extern int solaris_write(); +extern int solaris_open(); +extern int solaris_close(); +extern int solaris_wait(); +extern int solaris_creat(); +extern int solaris_link(); +extern int solaris_unlink(); +extern int solaris_exec(); +extern int solaris_chdir(); +extern int solaris_time(); +extern int solaris_mknod(); +extern int solaris_chmod(); +extern int solaris_chown(); +extern int solaris_brk(); +extern int solaris_stat(); +extern int solaris_lseek(); +extern int solaris_getpid(); +extern int solaris_mount(); +extern int solaris_umount(); +extern int solaris_setuid(); +extern int solaris_getuid(); +extern int solaris_stime(); +extern int solaris_ptrace(); +extern int solaris_alarm(); +extern int solaris_fstat(); +extern int solaris_pause(); +extern int solaris_utime(); +extern int solaris_stty(); +extern int solaris_gtty(); +extern int solaris_access(); +extern int solaris_nice(); +extern int solaris_statfs(); +extern int solaris_sync(); +extern int solaris_kill(); +extern int solaris_fstatfs(); +extern int solaris_pgrpsys(); +extern int solaris_setpgrp(); +extern int solaris_xenix(); +extern int solaris_syssgi(); +extern int solaris_dup(); +extern int solaris_pipe(); +extern int solaris_times(); +extern int solaris_profil(); +extern int solaris_plock(); +extern int solaris_setgid(); +extern int solaris_getgid(); +extern int solaris_sigcall(); +extern int solaris_msgsys(); +extern int solaris_syssun(); +extern int solaris_sysi86(); +extern int solaris_sysmips(); +extern int solaris_sysmachine(); +extern int solaris_acct(); +extern int solaris_shmsys(); +extern int solaris_semsys(); +extern int solaris_ioctl(); +extern int solaris_uadmin(); +extern int solaris_utssys(); +extern int solaris_fdsync(); +extern int solaris_execve(); +extern int solaris_umask(); +extern int solaris_chroot(); +extern int solaris_fcntl(); +extern int solaris_ulimit(); +extern int solaris_rmdir(); +extern int solaris_mkdir(); +extern int solaris_getdents(); +extern int solaris_sysfs(); +extern int solaris_getmsg(); +extern int solaris_putmsg(); +extern int solaris_poll(); +extern int solaris_lstat(); +extern int solaris_symlink(); +extern int solaris_readlink(); +extern int solaris_setgroups(); +extern int solaris_getgroups(); +extern int solaris_fchmod(); +extern int solaris_fchown(); +extern int solaris_sigprocmask(); +extern int solaris_sigsuspend(); +extern int solaris_sigaltstack(); +extern int solaris_sigaction(); +extern int solaris_spcall(); +extern int solaris_context(); +extern int solaris_evsys(); +extern int solaris_evtrapret(); +extern int solaris_statvfs(); +extern int solaris_fstatvfs(); +extern int solaris_nfssys(); +extern int solaris_waitid(); +extern int solaris_sigsendsys(); +extern int solaris_hrtsys(); +extern int solaris_acancel(); +extern int solaris_async(); +extern int solaris_priocntlsys(); +extern int solaris_pathconf(); +extern int solaris_mincore(); +extern int solaris_mmap(); +extern int solaris_mprotect(); +extern int solaris_munmap(); +extern int solaris_fpathconf(); +extern int solaris_vfork(); +extern int solaris_fchdir(); +extern int solaris_readv(); +extern int solaris_writev(); +extern int solaris_xstat(); +extern int solaris_lxstat(); +extern int solaris_fxstat(); +extern int solaris_xmknod(); +extern int solaris_clocal(); +extern int solaris_setrlimit(); +extern int solaris_getrlimit(); +extern int solaris_lchown(); +extern int solaris_memcntl(); +extern int solaris_getpmsg(); +extern int solaris_putpmsg(); +extern int solaris_rename(); +extern int solaris_uname(); +extern int solaris_setegid(); +extern int solaris_sysconfig(); +extern int solaris_adjtime(); +extern int solaris_sysinfo(); +extern int solaris_seteuid(); +extern int solaris_vtrace(); +extern int solaris_fork1(); +extern int solaris_sigtimedwait(); +extern int solaris_lwp_info(); +extern int solaris_yield(); +extern int solaris_lwp_sema_wait(); +extern int solaris_lwp_sema_post(); +extern int solaris_modctl(); +extern int solaris_fchroot(); +extern int solaris_utimes(); +extern int solaris_vhangup(); +extern int solaris_gettimeofday(); +extern int solaris_getitimer(); +extern int solaris_setitimer(); +extern int solaris_lwp_create(); +extern int solaris_lwp_exit(); +extern int solaris_lwp_suspend(); +extern int solaris_lwp_continue(); +extern int solaris_lwp_kill(); +extern int solaris_lwp_self(); +extern int solaris_lwp_setprivate(); +extern int solaris_lwp_getprivate(); +extern int solaris_lwp_wait(); +extern int solaris_lwp_mutex_unlock(); +extern int solaris_lwp_mutex_lock(); +extern int solaris_lwp_cond_wait(); +extern int solaris_lwp_cond_signal(); +extern int solaris_lwp_cond_broadcast(); +extern int solaris_pread(); +extern int solaris_pwrite(); +extern int solaris_llseek(); +extern int solaris_inst_sync(); +extern int solaris_auditsys(); +extern int solaris_processor_bind(); +extern int solaris_processor_info(); +extern int solaris_p_online(); +extern int solaris_sigqueue(); +extern int solaris_clock_gettime(); +extern int solaris_clock_settime(); +extern int solaris_clock_getres(); +extern int solaris_timer_create(); +extern int solaris_timer_delete(); +extern int solaris_timer_settime(); +extern int solaris_timer_gettime(); +extern int solaris_timer_getoverrun(); +extern int solaris_nanosleep(); + +/* solaris_pgrpsys subcalls */ + +extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid(); +extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid(); + +#define SOLARIS_pgrpsys_subcall 300 +#define SOLARIS_getpgrp (SOLARIS_pgrpsys_subcall + 0) +#define SOLARIS_setpgrp (SOLARIS_pgrpsys_subcall + 1) +#define SOLARIS_getsid (SOLARIS_pgrpsys_subcall + 2) +#define SOLARIS_setsid (SOLARIS_pgrpsys_subcall + 3) +#define SOLARIS_getpgid (SOLARIS_pgrpsys_subcall + 4) +#define SOLARIS_setpgid (SOLARIS_pgrpsys_subcall + 5) + +#define SOLARIS_pgrpsys_nsubcalls 6 + +/* solaris_sigcall subcalls */ + +#undef SOLARIS_signal +#define SOLARIS_sigcall 48 + +extern int solaris_signal(), solaris_sigset(), solaris_sighold(); +extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause(); + +#define SOLARIS_sigcall_subcall 310 +#define SOLARIS_signal (SOLARIS_sigcall_subcall + 0) +#define SOLARIS_sigset (SOLARIS_sigcall_subcall + 1) +#define SOLARIS_sighold (SOLARIS_sigcall_subcall + 2) +#define SOLARIS_sigrelse (SOLARIS_sigcall_subcall + 3) +#define SOLARIS_sigignore (SOLARIS_sigcall_subcall + 4) +#define SOLARIS_sigpause (SOLARIS_sigcall_subcall + 5) + +#define SOLARIS_sigcall_nsubcalls 6 + +/* msgsys subcalls */ + +extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd(); + +#define SOLARIS_msgsys_subcall 320 +#define SOLARIS_msgget (SOLARIS_msgsys_subcall + 0) +#define SOLARIS_msgctl (SOLARIS_msgsys_subcall + 1) +#define SOLARIS_msgrcv (SOLARIS_msgsys_subcall + 2) +#define SOLARIS_msgsnd (SOLARIS_msgsys_subcall + 3) + +#define SOLARIS_msgsys_nsubcalls 4 + +/* shmsys subcalls */ + +extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget(); + +#define SOLARIS_shmsys_subcall 330 +#define SOLARIS_shmat (SOLARIS_shmsys_subcall + 0) +#define SOLARIS_shmctl (SOLARIS_shmsys_subcall + 1) +#define SOLARIS_shmdt (SOLARIS_shmsys_subcall + 2) +#define SOLARIS_shmget (SOLARIS_shmsys_subcall + 3) + +#define SOLARIS_shmsys_nsubcalls 4 + +/* semsys subcalls */ + +extern int solaris_semctl(), solaris_semget(), solaris_semop(); + +#define SOLARIS_semsys_subcall 340 +#define SOLARIS_semctl (SOLARIS_semsys_subcall + 0) +#define SOLARIS_semget (SOLARIS_semsys_subcall + 1) +#define SOLARIS_semop (SOLARIS_semsys_subcall + 2) + +#define SOLARIS_semsys_nsubcalls 3 + +/* utssys subcalls */ + +extern int solaris_olduname(), solaris_ustat(), solaris_fusers(); + +#define SOLARIS_utssys_subcall 350 + +#define SOLARIS_olduname (SOLARIS_utssys_subcall + 0) + /* 1 is unused */ +#define SOLARIS_ustat (SOLARIS_utssys_subcall + 2) +#define SOLARIS_fusers (SOLARIS_utssys_subcall + 3) + +#define SOLARIS_utssys_nsubcalls 4 + +/* sysfs subcalls */ + +extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3(); + +#define SOLARIS_sysfs_subcall 360 + /* 0 is unused */ +#define SOLARIS_sysfs1 (SOLARIS_sysfs_subcall + 1) +#define SOLARIS_sysfs2 (SOLARIS_sysfs_subcall + 2) +#define SOLARIS_sysfs3 (SOLARIS_sysfs_subcall + 3) + +#define SOLARIS_sysfs_nsubcalls 4 + +/* solaris_spcall subcalls */ + +#undef SOLARIS_sigpending +#define SOLARIS_spcall 99 + +extern int solaris_sigpending(), solaris_sigfillset(); + +#define SOLARIS_spcall_subcall 370 + /* 0 is unused */ +#define SOLARIS_sigpending (SOLARIS_spcall_subcall + 1) +#define SOLARIS_sigfillset (SOLARIS_spcall_subcall + 2) + +#define SOLARIS_spcall_nsubcalls 3 + +/* solaris_context subcalls */ + +extern int solaris_getcontext(), solaris_setcontext(); + +#define SOLARIS_context_subcall 380 +#define SOLARIS_getcontext (SOLARIS_context_subcall + 0) +#define SOLARIS_setcontext (SOLARIS_context_subcall + 1) + +#define SOLARIS_context_nsubcalls 2 diff --git a/alice-strace/linux/sparc/syscallent.h b/alice-strace/linux/sparc/syscallent.h new file mode 100644 index 0000000..804e8c3 --- /dev/null +++ b/alice-strace/linux/sparc/syscallent.h @@ -0,0 +1,407 @@ + { 0, 0, sys_restart_syscall, "restart_syscall" },/* 0 */ + { 1, TP, sys_exit, "exit" }, /* 1 */ + { 0, TP, sys_fork, "fork" }, /* 2 */ + { 3, TD, sys_read, "read" }, /* 3 */ + { 3, TD, sys_write, "write" }, /* 4 */ + { 3, TD|TF, sys_open, "open" }, /* 5 */ + { 1, TD, sys_close, "close" }, /* 6 */ + { 4, TP, sys_wait4, "wait4" }, /* 7 */ + { 2, TD|TF, sys_creat, "creat" }, /* 8 */ + { 2, TF, sys_link, "link" }, /* 9 */ + { 1, TF, sys_unlink, "unlink" }, /* 10 */ + { 2, TF|TP, sys_execv, "execv" }, /* 11 */ + { 1, TF, sys_chdir, "chdir" }, /* 12 */ + { 3, TF, sys_chown, "chown"}, /* 13 */ + { 3, TF, sys_mknod, "mknod" }, /* 14 */ + { 2, TF, sys_chmod, "chmod" }, /* 15 */ + { 3, TF, sys_chown, "lchown" }, /* 16 */ + { 1, TM, sys_brk, "brk" }, /* 17 */ + { 4, 0, printargs, "perfctr" }, /* 18 */ + { 3, TD, sys_lseek, "lseek" }, /* 19 */ + { 0, 0, sys_getpid, "getpid" }, /* 20 */ + { 2, 0, sys_capget, "capget" }, /* 21 */ + { 2, 0, sys_capset, "capset" }, /* 22 */ + { 1, 0, sys_setuid, "setuid" }, /* 23 */ + { 0, NF, sys_getuid, "getuid" }, /* 24 */ + { 1, 0, sys_time, "time" }, /* 25 */ + { 5, 0, sys_ptrace, "ptrace" }, /* 26 */ + { 1, 0, sys_alarm, "alarm" }, /* 27 */ + { 2, TS, sys_sigaltstack,"sigaltstack" }, /* 28 */ + { 0, TS, sys_pause, "pause" }, /* 29 */ + { 2, TF, sys_utime, "utime" }, /* 30 */ + { 3, TF, sys_chown, "lchown32" }, /* 31 */ + { 3, TD, sys_fchown, "fchown32" }, /* 32 */ + { 2, TF, sys_access, "access" }, /* 33 */ + { 1, 0, sys_nice, "nice" }, /* 34 */ + { 3, TF, sys_chown, "chown32" }, /* 35 */ + { 0, 0, sys_sync, "sync" }, /* 36 */ + { 2, TS, sys_kill, "kill" }, /* 37 */ + { 2, TF, sys_stat, "stat" }, /* 38 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 39 */ + { 2, TF, sys_lstat, "lstat" }, /* 40 */ + { 2, TD, sys_dup, "dup" }, /* 41 */ + { 0, TD, sys_pipe, "pipe" }, /* 42 */ + { 1, 0, sys_times, "times" }, /* 43 */ + { 0, NF, sys_getuid, "getuid32" }, /* 44 */ + { 2, TF, sys_umount2, "umount" }, /* 45 */ + { 1, 0, sys_setgid, "setgid" }, /* 46 */ + { 0, NF, sys_getgid, "getgid" }, /* 47 */ + { 3, TS, sys_signal, "signal" }, /* 48 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 49 */ + { 0, NF, sys_getegid, "getegid" }, /* 50 */ + { 1, TF, sys_acct, "acct" }, /* 51 */ + { 2, 0, printargs, "memory_ordering" }, /* 52 */ + { 0, NF, sys_getgid, "getgid32" }, /* 53 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 54 */ + { 4, 0, sys_reboot, "reboot" }, /* 55 */ + { 6, TD|TM, sys_mmap, "mmap2" }, /* 56 */ + { 2, TF, sys_symlink, "symlink" }, /* 57 */ + { 3, TF, sys_readlink, "readlink" }, /* 58 */ + { 3, TF|TP, sys_execve, "execve" }, /* 59 */ + { 1, 0, sys_umask, "umask" }, /* 60 */ + { 1, TF, sys_chroot, "chroot" }, /* 61 */ + { 2, TD, sys_fstat, "fstat" }, /* 62 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 63 */ + { 0, 0, sys_getpagesize,"getpagesize" }, /* 64 */ + { 3, TM, sys_msync, "msync" }, /* 65 */ + { 0, TP, sys_vfork, "vfork" }, /* 66 */ + { 5, TD, sys_pread, "pread" }, /* 67 */ + { 5, TD, sys_pwrite, "pwrite" }, /* 68 */ + { 0, NF, sys_geteuid, "geteuid32" }, /* 69 */ + { 0, NF, sys_getegid, "getegid32" }, /* 70 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 71 */ + { 2, 0, sys_setreuid, "setreuid32" }, /* 72 */ + { 2, TM, sys_munmap, "munmap" }, /* 73 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 74 */ + { 3, TM, sys_madvise, "madvise" }, /* 75 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 76 */ + { 3, TF, sys_truncate64, "truncate64" }, /* 77 */ + { 3, TM, sys_mincore, "mincore" }, /* 78 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 79 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 80 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 81 */ + { 2, 0, sys_setgroups32,"setgroups32" }, /* 82 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 83 */ + { 3, TD, sys_ftruncate64,"ftruncate64" }, /* 84 */ + { 2, TF, sys_swapon, "swapon" }, /* 85 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 86 */ + { 1, 0, sys_setuid, "setuid32" }, /* 87 */ + { 2, 0, sys_sethostname,"sethostname" }, /* 88 */ + { 1, 0, sys_setgid, "setgid32" }, /* 89 */ + { 2, TD, sys_dup2, "dup2" }, /* 90 */ + { 1, NF, sys_setfsuid, "setfsuid32" }, /* 91 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 92 */ + { 5, TD, sys_select, "select" }, /* 93 */ + { 1, NF, sys_setfsgid, "setfsgid32" }, /* 94 */ + { 1, TD, sys_fsync, "fsync" }, /* 95 */ + { 3, 0, sys_setpriority,"setpriority" }, /* 96 */ + { 3, TN, sys_socket, "socket" }, /* 97 */ + { 3, TN, sys_connect, "connect" }, /* 98 */ + { 3, TN, sys_accept, "accept" }, /* 99 */ + { 2, 0, sys_getpriority,"getpriority" }, /* 100 */ + { 0, TS, sys_rt_sigreturn,"rt_sigreturn" }, /* 101 */ + { 4, TS, sys_rt_sigaction,"rt_sigaction" }, /* 102 */ + { 4, TS, sys_rt_sigprocmask,"rt_sigprocmask" }, /* 103 */ + { 2, TS, sys_rt_sigpending,"rt_sigpending" }, /* 104 */ + { 4, TS, sys_rt_sigtimedwait,"rt_sigtimedwait" },/* 105 */ + { 3, TS, sys_rt_sigqueueinfo,"rt_sigqueueinfo" },/* 106 */ + { 2, TS, sys_rt_sigsuspend,"rt_sigsuspend" }, /* 107 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 108 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 109 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 110 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 111 */ + { 2, 0, sys_setresgid, "setresgid32" }, /* 112 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */ + { 2, 0, sys_getgroups32,"getgroups32" }, /* 115 */ + { 2, 0, sys_gettimeofday,"gettimeofday" }, /* 116 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 117 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 119 */ + { 3, TD, sys_readv, "readv" }, /* 120 */ + { 3, TD, sys_writev, "writev" }, /* 121 */ + { 2, 0, sys_settimeofday,"settimeofday" }, /* 122 */ + { 3, TD, sys_fchown, "fchown" }, /* 123 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 124 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 126 */ + { 2, 0, sys_setregid, "setregid" }, /* 127 */ + { 2, TF, sys_rename, "rename" }, /* 128 */ + { 2, TF, sys_truncate, "truncate" }, /* 129 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 130 */ + { 2, TD, sys_flock, "flock" }, /* 131 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 132 */ + { 6, TN, sys_sendto, "sendto" }, /* 133 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 134 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 135 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 136 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 137 */ + { 2, TF, sys_utimes, "utimes" }, /* 138 */ + { 2, TF, sys_stat64, "stat64" }, /* 139 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 140 */ + { 3, TN, sys_getpeername,"getpeername" }, /* 141 */ + { 6, 0, sys_futex, "futex" }, /* 142 */ + { 0, 0, sys_gettid, "gettid" }, /* 143 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 146 */ + { 5, 0, sys_prctl, "prctl" }, /* 147 */ + { 5, 0, printargs, "pciconfig_read" }, /* 148 */ + { 5, 0, printargs, "pciconfig_write" }, /* 149 */ + { 3, TN, sys_getsockname,"getsockname" }, /* 150 */ + { 4, TN, sys_getmsg, "getmsg" }, /* 151 */ + { 4, TN, sys_putmsg, "putmsg" }, /* 152 */ + { 3, TD, sys_poll, "poll" }, /* 153 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 154 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 155 */ + { 4, 0, printargs, "getdirentries" }, /* 156 */ + { 2, TF, sys_statfs, "statfs" }, /* 157 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 158 */ + { 1, TF, sys_umount, "oldumount" }, /* 159 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 160 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 161 */ + { 2, 0, printargs, "getdomainname" }, /* 162 */ + { 2, 0, sys_setdomainname,"setdomainname" }, /* 163 */ + { 5, 0, printargs, "utrap_install" }, /* 164 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 165 */ + { 1, 0, sys_set_tid_address,"set_tid_address" }, /* 166 */ + { 5, TF, sys_mount, "mount" }, /* 167 */ + { 2, 0, sys_ustat, "ustat" }, /* 168 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 169 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 170 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 171 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 172 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 173 */ + { 3, TD, sys_getdents, "getdents" }, /* 174 */ + { 0, 0, sys_setsid, "setsid" }, /* 175 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 176 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 177 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 178 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 179 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 180 */ + { 2, TF, sys_removexattr,"removexattr" }, /* 181 */ + { 2, TF, sys_removexattr,"lremovexattr" }, /* 182 */ + { 1, TS, sys_sigpending, "sigpending" }, /* 183 */ + { 5, 0, sys_query_module,"query_module" }, /* 184 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 185 */ + { 2, TD, sys_fremovexattr,"fremovexattr" }, /* 186 */ + { 2, TS, sys_kill, "tkill" }, /* 187 */ + { 1, TP, sys_exit, "exit_group" }, /* 188 */ + { 1, 0, sys_uname, "uname" }, /* 189 */ + { 3, 0, sys_init_module,"init_module" }, /* 190 */ + { 1, 0, sys_personality,"personality" }, /* 191 */ + { 5, TM, sys_remap_file_pages,"remap_file_pages" },/* 192 */ + { 1, TD, sys_epoll_create,"epoll_create" }, /* 193 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 194 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 195 */ + { 2, 0, sys_ulimit, "ulimit" }, /* 196 */ + { 0, 0, sys_getppid, "getppid" }, /* 197 */ + { 3, TS, sys_sigaction, "sigaction" }, /* 198 */ + { 0, TS, sys_siggetmask, "sgetmask" }, /* 199 */ + { 1, TS, sys_sigsetmask, "ssetmask" }, /* 200 */ + { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 201 */ + { 2, TF, sys_lstat, "lstat" }, /* 202 */ + { 1, TF, sys_uselib, "uselib" }, /* 203 */ + { 3, TD, sys_readdir, "readdir" }, /* 204 */ + { 4, TD, sys_readahead, "readahead" }, /* 205 */ + { 2, TD, sys_socketcall, "socketcall" }, /* 206 */ + { 3, 0, sys_syslog, "syslog" }, /* 207 */ + { 4, 0, sys_lookup_dcookie,"lookup_dcookie" }, /* 208 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 209 */ + { 6, TD, sys_fadvise64_64,"fadvise64_64" }, /* 210 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 211 */ + { 3, TP, sys_waitpid, "waitpid" }, /* 212 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 213 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 214 */ + { 5, TI, sys_ipc, "ipc" }, /* 215 */ + { 0, TS, sys_sigreturn, "sigreturn" }, /* 216 */ + { 5, TP, sys_clone, "clone" }, /* 217 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 218 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 219 */ + { 3, TS, sys_sigprocmask,"sigprocmask" }, /* 220 */ + { 2, 0, sys_create_module,"create_module" }, /* 221 */ + { 2, 0, sys_delete_module,"delete_module" }, + { 1, 0, sys_get_kernel_syms,"get_kernel_syms"}, /* 223 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 224 */ + { 0, 0, sys_bdflush, "bdflush" }, /* 225 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 226 */ + { 5, 0, sys_afs_syscall,"afs_syscall" }, /* 227 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 228 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 229 */ + { 5, TD, sys_select, "select" }, /* 230 */ + { 1, 0, sys_time, "time" }, /* 231 */ + { 2, TF, sys_stat, "stat" }, /* 232 */ + { 1, 0, sys_stime, "stime" }, /* 233 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 234 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 235 */ + { 5, TD, sys_llseek, "_llseek" }, /* 236 */ + { 2, TM, sys_mlock, "mlock" }, /* 237 */ + { 2, TM, sys_munlock, "munlock" }, /* 238 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 239 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 240 */ + { 2, 0, sys_sched_setparam,"sched_setparam"}, /* 241 */ + { 2, 0, sys_sched_getparam,"sched_getparam"}, /* 242 */ + { 3, 0, sys_sched_setscheduler,"sched_setscheduler"},/* 243 */ + { 1, 0, sys_sched_getscheduler,"sched_getscheduler"},/* 244 */ + { 0, 0, sys_sched_yield,"sched_yield" }, /* 245 */ + { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"},/* 246 */ + { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"},/* 247 */ + { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"},/* 248 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 249 */ + { 5, TM, sys_mremap, "mremap" }, /* 250 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 251 */ + { 1, 0, sys_getsid, "getsid" }, /* 252 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 253 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 254 */ + { 5, 0, printargs, "aplib" }, /* 255 */ + { 2, 0, sys_clock_settime,"clock_settime" }, /* 256 */ + { 2, 0, sys_clock_gettime,"clock_gettime" }, /* 257 */ + { 2, 0, sys_clock_getres,"clock_getres" }, /* 258 */ + { 4, 0, sys_clock_nanosleep,"clock_nanosleep" },/* 259 */ + { 3, 0, sys_sched_setaffinity,"sched_setaffinity" },/* 260 */ + { 3, 0, sys_sched_getaffinity,"sched_getaffinity" },/* 261 */ + { 4, 0, sys_timer_settime,"timer_settime" }, /* 262 */ + { 2, 0, sys_timer_gettime,"timer_gettime" }, /* 263 */ + { 1, 0, sys_timer_getoverrun,"timer_getoverrun" },/* 264 */ + { 1, 0, sys_timer_delete,"timer_delete" }, /* 265 */ + { 3, 0, sys_timer_create,"timer_create" }, /* 266 */ + { 5, 0, NULL, NULL }, /* 267 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 268 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 269 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 270 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 271 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 272 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 273 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 274 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 275 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 276 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 277 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 278 */ + { 5, TP, sys_waitid, "waitid" }, /* 279 */ + { 4, TD, sys_tee, "tee" }, /* 280 */ + { 5, 0, sys_add_key, "add_key" }, /* 281 */ + { 4, 0, sys_request_key, "request_key" }, /* 282 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 283 */ + { 4, TD|TF, sys_openat, "openat" }, /* 284 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 285 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 286 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 287 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 288 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 289 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 290 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 291 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 292 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 293 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 294 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 295 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 296 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 297 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 298 */ + { 1, TP, sys_unshare, "unshare" }, /* 299 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 300 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 301 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 302 */ + { 6, TM, sys_mbind, "mbind" }, /* 303 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 304 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 305 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 306 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 307 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 308 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 309 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 310 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 311 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 312 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 313 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 314 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 315 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 316 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 317 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 318 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 319 */ + { 3, TD, sys_dup3, "dup3" }, /* 320 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 321 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 322 */ + { 4, TN, sys_accept4, "accept4" }, /* 323 */ + { 5, TD, sys_preadv, "preadv" }, /* 324 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 325 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 326 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 327 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 328 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 329 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 330 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 331 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 332 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 333 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 334 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 335 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 336 */ + { 2, TD, sys_setns, "setns" }, /* 337 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 338 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 339 */ + { 0, NF, printargs, "kern_features" }, /* 340 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 341 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 342 */ + { 5, 0, NULL, NULL }, /* 343 */ + { 5, 0, NULL, NULL }, /* 344 */ + { 5, 0, NULL, NULL }, /* 345 */ + { 5, 0, NULL, NULL }, /* 346 */ + { 5, 0, NULL, NULL }, /* 347 */ + { 5, 0, NULL, NULL }, /* 348 */ + { 5, 0, NULL, NULL }, /* 349 */ + { 5, 0, NULL, NULL }, /* 350 */ + { 5, 0, NULL, NULL }, /* 351 */ + { 5, 0, NULL, NULL }, /* 352 */ +#define SYS_socket_subcall 353 +#include "subcall.h" + { 6, 0, printargs, "socket_subcall"}, /* 353 */ + { 3, TN, sys_socket, "socket" }, /* 354 */ + { 3, TN, sys_bind, "bind" }, /* 355 */ + { 3, TN, sys_connect, "connect" }, /* 356 */ + { 2, TN, sys_listen, "listen" }, /* 357 */ + { 3, TN, sys_accept, "accept" }, /* 358 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 359 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 360 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 361 */ + { 4, TN, sys_send, "send" }, /* 362 */ + { 4, TN, sys_recv, "recv" }, /* 363 */ + { 6, TN, sys_sendto, "sendto" }, /* 364 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 365 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 366 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 367 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 368 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 369 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 370 */ + { 4, TN, sys_accept4, "accept4" }, /* 371 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 372 */ +#if SYS_ipc_subcall != 373 + #error fix me +#endif + { 4, 0, printargs, "ipc_subcall" }, /* 373 */ + { 4, TI, printargs, "semop" }, /* 374 */ + { 4, TI, sys_semget, "semget" }, /* 375 */ + { 4, TI, sys_semctl, "semctl" }, /* 376 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 377 */ + { 4, 0, printargs, "ipc_subcall" }, /* 378 */ + { 4, 0, printargs, "ipc_subcall" }, /* 379 */ + { 4, 0, printargs, "ipc_subcall" }, /* 380 */ + { 4, 0, printargs, "ipc_subcall" }, /* 381 */ + { 4, 0, printargs, "ipc_subcall" }, /* 382 */ + { 4, 0, printargs, "ipc_subcall" }, /* 383 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 384 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 385 */ + { 4, TI, sys_msgget, "msgget" }, /* 386 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 387 */ + { 4, 0, printargs, "ipc_subcall" }, /* 388 */ + { 4, 0, printargs, "ipc_subcall" }, /* 389 */ + { 4, 0, printargs, "ipc_subcall" }, /* 390 */ + { 4, 0, printargs, "ipc_subcall" }, /* 391 */ + { 4, 0, printargs, "ipc_subcall" }, /* 392 */ + { 4, 0, printargs, "ipc_subcall" }, /* 393 */ + { 4, TI, sys_shmat, "shmat" }, /* 394 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 395 */ + { 4, TI, sys_shmget, "shmget" }, /* 396 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 397 */ + { 5, 0, NULL, NULL }, /* 398 */ + { 5, 0, NULL, NULL }, /* 399 */ + { 5, 0, NULL, NULL }, /* 400 */ + { 5, 0, NULL, NULL }, /* 401 */ diff --git a/alice-strace/linux/sparc/syscallent1.h b/alice-strace/linux/sparc/syscallent1.h new file mode 100644 index 0000000..9519e08 --- /dev/null +++ b/alice-strace/linux/sparc/syscallent1.h @@ -0,0 +1,437 @@ +/* + * 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. + */ + + { 6, 0, solaris_syscall, "syscall" }, /* 0 */ + { 6, TP, solaris_exit, "_exit" }, /* 1 */ + { 6, TP, solaris_fork, "fork" }, /* 2 */ + { 6, 0, solaris_read, "read" }, /* 3 */ + { 6, 0, solaris_write, "write" }, /* 4 */ + { 6, TF, solaris_open, "open" }, /* 5 */ + { 6, 0, solaris_close, "close" }, /* 6 */ + { 6, TP, solaris_wait, "wait" }, /* 7 */ + { 6, TF, solaris_creat, "creat" }, /* 8 */ + { 6, TF, solaris_link, "link" }, /* 9 */ + { 6, TF, solaris_unlink, "unlink" }, /* 10 */ + { 6, TF|TP, solaris_exec, "exec" }, /* 11 */ + { 6, TF, solaris_chdir, "chdir" }, /* 12 */ + { 6, 0, solaris_time, "time" }, /* 13 */ + { 6, TF, solaris_mknod, "mknod" }, /* 14 */ + { 6, TF, solaris_chmod, "chmod" }, /* 15 */ + { 6, TF, solaris_chown, "chown" }, /* 16 */ + { 6, 0, solaris_brk, "brk" }, /* 17 */ + { 6, TF, solaris_stat, "stat" }, /* 18 */ + { 6, 0, solaris_lseek, "lseek" }, /* 19 */ + { 6, 0, solaris_getpid, "getpid" }, /* 20 */ + { 6, TF, solaris_mount, "mount" }, /* 21 */ + { 6, TF, solaris_umount, "umount" }, /* 22 */ + { 6, 0, solaris_setuid, "setuid" }, /* 23 */ + { 6, 0, solaris_getuid, "getuid" }, /* 24 */ + { 6, 0, solaris_stime, "stime" }, /* 25 */ + { 6, 0, solaris_ptrace, "ptrace" }, /* 26 */ + { 6, 0, solaris_alarm, "alarm" }, /* 27 */ + { 6, 0, solaris_fstat, "fstat" }, /* 28 */ + { 6, TS, solaris_pause, "pause" }, /* 29 */ + { 6, TF, solaris_utime, "utime" }, /* 30 */ + { 6, 0, solaris_stty, "stty" }, /* 31 */ + { 6, 0, solaris_gtty, "gtty" }, /* 32 */ + { 6, TF, solaris_access, "access" }, /* 33 */ + { 6, 0, solaris_nice, "nice" }, /* 34 */ + { 6, TF, solaris_statfs, "statfs" }, /* 35 */ + { 6, 0, solaris_sync, "sync" }, /* 36 */ + { 6, TS, solaris_kill, "kill" }, /* 37 */ + { 6, 0, solaris_fstatfs, "fstatfs" }, /* 38 */ + { 6, 0, solaris_pgrpsys, "pgrpsys" }, /* 39 */ + { 6, 0, solaris_xenix, "xenix" }, /* 40 */ + { 6, 0, solaris_dup, "dup" }, /* 41 */ + { 6, 0, solaris_pipe, "pipe" }, /* 42 */ + { 6, 0, solaris_times, "times" }, /* 43 */ + { 6, 0, solaris_profil, "profil" }, /* 44 */ + { 6, 0, solaris_plock, "plock" }, /* 45 */ + { 6, 0, solaris_setgid, "setgid" }, /* 46 */ + { 6, 0, solaris_getgid, "getgid" }, /* 47 */ + { 6, 0, solaris_sigcall, "sigcall" }, /* 48 */ + { 6, TI, solaris_msgsys, "msgsys" }, /* 49 */ + { 6, 0, solaris_syssun, "syssun" }, /* 50 */ + { 6, TF, solaris_acct, "acct" }, /* 51 */ + { 6, TI, solaris_shmsys, "shmsys" }, /* 52 */ + { 6, TI, solaris_semsys, "semsys" }, /* 53 */ + { 6, 0, solaris_ioctl, "ioctl" }, /* 54 */ + { 6, 0, solaris_uadmin, "uadmin" }, /* 55 */ + { 6, 0, solaris_sysmp, "sysmp" }, /* 56 */ + { 6, 0, solaris_utssys, "utssys" }, /* 57 */ + { 6, 0, solaris_fdsync, "fdsync" }, /* 58 */ + { 6, TF|TP, solaris_execve, "execve" }, /* 59 */ + { 6, 0, solaris_umask, "umask" }, /* 60 */ + { 6, TF, solaris_chroot, "chroot" }, /* 61 */ + { 6, 0, solaris_fcntl, "fcntl" }, /* 62 */ + { 6, 0, solaris_ulimit, "ulimit" }, /* 63 */ + { 6, 0, NULL, NULL }, /* 64 */ + { 6, 0, NULL, NULL }, /* 65 */ + { 6, 0, NULL, NULL }, /* 66 */ + { 6, 0, NULL, NULL }, /* 67 */ + { 6, 0, NULL, NULL }, /* 68 */ + { 6, 0, NULL, NULL }, /* 69 */ + { 6, 0, NULL, NULL }, /* 70 */ + { 6, 0, NULL, NULL }, /* 71 */ + { 6, 0, NULL, NULL }, /* 72 */ + { 6, 0, NULL, NULL }, /* 73 */ + { 6, 0, NULL, NULL }, /* 74 */ + { 6, 0, NULL, NULL }, /* 75 */ + { 6, 0, NULL, NULL }, /* 76 */ + { 6, 0, NULL, NULL }, /* 77 */ + { 6, 0, NULL, NULL }, /* 78 */ + { 6, TF, solaris_rmdir, "rmdir" }, /* 79 */ + { 6, TF, solaris_mkdir, "mkdir" }, /* 80 */ + { 6, 0, solaris_getdents, "getdents" }, /* 81 */ + { 6, 0, solaris_sginap, "sginap" }, /* 82 */ + { 6, 0, solaris_sgikopt, "sgikopt" }, /* 83 */ + { 6, 0, solaris_sysfs, "sysfs" }, /* 84 */ + { 6, TN, sys_getmsg, "getmsg" }, /* 85 */ + { 6, TN, sys_putmsg, "putmsg" }, /* 86 */ + { 6, TN, solaris_poll, "poll" }, /* 87 */ + { 6, TF, solaris_lstat, "lstat" }, /* 88 */ + { 6, TF, solaris_symlink, "symlink" }, /* 89 */ + { 6, TF, solaris_readlink, "readlink" }, /* 90 */ + { 6, 0, solaris_setgroups, "setgroups" }, /* 91 */ + { 6, 0, solaris_getgroups, "getgroups" }, /* 92 */ + { 6, 0, solaris_fchmod, "fchmod" }, /* 93 */ + { 6, 0, solaris_fchown, "fchown" }, /* 94 */ + { 6, TS, solaris_sigprocmask, "sigprocmask" }, /* 95 */ + { 6, TS, solaris_sigsuspend, "sigsuspend" }, /* 96 */ + { 6, TS, solaris_sigaltstack, "sigaltstack" }, /* 97 */ + { 6, TS, solaris_sigaction, "sigaction" }, /* 98 */ + { 6, 0, solaris_spcall, "spcall" }, /* 99 */ + { 6, 0, solaris_context, "context" }, /* 100 */ + { 6, 0, solaris_evsys, "evsys" }, /* 101 */ + { 6, 0, solaris_evtrapret, "evtrapret" }, /* 102 */ + { 6, TF, solaris_statvfs, "statvfs" }, /* 103 */ + { 6, 0, solaris_fstatvfs, "fstatvfs" }, /* 104 */ + { 6, 0, NULL, NULL }, /* 105 */ + { 6, 0, solaris_nfssys, "nfssys" }, /* 106 */ + { 6, TP, solaris_waitid, "waitid" }, /* 107 */ + { 6, 0, solaris_sigsendsys, "sigsendsys" }, /* 108 */ + { 6, 0, solaris_hrtsys, "hrtsys" }, /* 109 */ + { 6, 0, solaris_acancel, "acancel" }, /* 110 */ + { 6, 0, solaris_async, "async" }, /* 111 */ + { 6, 0, solaris_priocntlsys, "priocntlsys" }, /* 112 */ + { 6, TF, solaris_pathconf, "pathconf" }, /* 113 */ + { 6, 0, solaris_mincore, "mincore" }, /* 114 */ + { 6, TD|TM, solaris_mmap, "mmap" }, /* 115 */ + { 6, 0, solaris_mprotect, "mprotect" }, /* 116 */ + { 6, 0, solaris_munmap, "munmap" }, /* 117 */ + { 6, 0, solaris_fpathconf, "fpathconf" }, /* 118 */ + { 6, TP, solaris_vfork, "vfork" }, /* 119 */ + { 6, 0, solaris_fchdir, "fchdir" }, /* 120 */ + { 6, 0, solaris_readv, "readv" }, /* 121 */ + { 6, 0, solaris_writev, "writev" }, /* 122 */ + { 6, TF, solaris_xstat, "xstat" }, /* 123 */ + { 6, TF, solaris_lxstat, "lxstat" }, /* 124 */ + { 6, 0, solaris_fxstat, "fxstat" }, /* 125 */ + { 6, TF, solaris_xmknod, "xmknod" }, /* 126 */ + { 6, 0, solaris_clocal, "clocal" }, /* 127 */ + { 6, 0, solaris_setrlimit, "setrlimit" }, /* 128 */ + { 6, 0, solaris_getrlimit, "getrlimit" }, /* 129 */ + { 6, TF, solaris_lchown, "lchown" }, /* 130 */ + { 6, 0, solaris_memcntl, "memcntl" }, /* 131 */ + { 6, TN, solaris_getpmsg, "getpmsg" }, /* 132 */ + { 6, TN, solaris_putpmsg, "putpmsg" }, /* 133 */ + { 6, TF, solaris_rename, "rename" }, /* 134 */ + { 6, 0, solaris_uname, "uname" }, /* 135 */ + { 6, 0, solaris_setegid, "setegid" }, /* 136 */ + { 6, 0, solaris_sysconfig, "sysconfig" }, /* 137 */ + { 6, 0, solaris_adjtime, "adjtime" }, /* 138 */ + { 6, 0, solaris_sysinfo, "sysinfo" }, /* 139 */ + { 6, 0, NULL, NULL }, /* 140 */ + { 6, 0, solaris_seteuid, "seteuid" }, /* 141 */ + { 6, 0, solaris_vtrace, "vtrace" }, /* 142 */ + { 6, TP, solaris_fork1, "fork1" }, /* 143 */ + { 6, TS, solaris_sigtimedwait, "sigtimedwait" }, /* 144 */ + { 6, 0, solaris_lwp_info, "lwp_info" }, /* 145 */ + { 6, 0, solaris_yield, "yield" }, /* 146 */ + { 6, 0, solaris_lwp_sema_wait, "lwp_sema_wait" }, /* 147 */ + { 6, 0, solaris_lwp_sema_post, "lwp_sema_post" }, /* 148 */ + { 6, 0, NULL, NULL }, /* 149 */ + { 6, 0, NULL, NULL }, /* 150 */ + { 6, 0, NULL, NULL }, /* 151 */ + { 6, 0, solaris_modctl, "modctl" }, /* 152 */ + { 6, 0, solaris_fchroot, "fchroot" }, /* 153 */ + { 6, TF, solaris_utimes, "utimes" }, /* 154 */ + { 6, 0, solaris_vhangup, "vhangup" }, /* 155 */ + { 6, 0, solaris_gettimeofday, "gettimeofday" }, /* 156 */ + { 6, 0, solaris_getitimer, "getitimer" }, /* 157 */ + { 6, 0, solaris_setitimer, "setitimer" }, /* 158 */ + { 6, 0, solaris_lwp_create, "lwp_create" }, /* 159 */ + { 6, 0, solaris_lwp_exit, "lwp_exit" }, /* 160 */ + { 6, 0, solaris_lwp_suspend, "lwp_suspend" }, /* 161 */ + { 6, 0, solaris_lwp_continue, "lwp_continue" }, /* 162 */ + { 6, 0, solaris_lwp_kill, "lwp_kill" }, /* 163 */ + { 6, 0, solaris_lwp_self, "lwp_self" }, /* 164 */ + { 6, 0, solaris_lwp_setprivate, "lwp_setprivate"}, /* 165 */ + { 6, 0, solaris_lwp_getprivate, "lwp_getprivate"}, /* 166 */ + { 6, 0, solaris_lwp_wait, "lwp_wait" }, /* 167 */ + { 6, 0, solaris_lwp_mutex_unlock,"lwp_mutex_unlock"}, /* 168 */ + { 6, 0, solaris_lwp_mutex_lock, "lwp_mutex_lock"}, /* 169 */ + { 6, 0, solaris_lwp_cond_wait, "lwp_cond_wait"}, /* 170 */ + { 6, 0, solaris_lwp_cond_signal,"lwp_cond_signal"}, /* 171 */ + { 6, 0, solaris_lwp_cond_broadcast,"lwp_cond_broadcast"}, /* 172 */ + { 6, 0, solaris_pread, "pread" }, /* 173 */ + { 6, 0, solaris_pwrite, "pwrite" }, /* 174 */ + { 6, 0, solaris_llseek, "llseek" }, /* 175 */ + { 6, 0, solaris_inst_sync, "inst_sync" }, /* 176 */ + { 6, 0, NULL, NULL }, /* 177 */ + { 6, 0, NULL, NULL }, /* 178 */ + { 6, 0, NULL, NULL }, /* 179 */ + { 6, 0, NULL, NULL }, /* 180 */ + { 6, 0, NULL, NULL }, /* 181 */ + { 6, 0, NULL, NULL }, /* 182 */ + { 6, 0, NULL, NULL }, /* 183 */ + { 6, 0, NULL, NULL }, /* 184 */ + { 6, 0, NULL, NULL }, /* 185 */ + { 6, 0, solaris_auditsys, "auditsys" }, /* 186 */ + { 6, 0, solaris_processor_bind, "processor_bind"}, /* 187 */ + { 6, 0, solaris_processor_info, "processor_info"}, /* 188 */ + { 6, 0, solaris_p_online, "p_online" }, /* 189 */ + { 6, 0, solaris_sigqueue, "sigqueue" }, /* 190 */ + { 6, 0, solaris_clock_gettime, "clock_gettime" }, /* 191 */ + { 6, 0, solaris_clock_settime, "clock_settime" }, /* 192 */ + { 6, 0, solaris_clock_getres, "clock_getres" }, /* 193 */ + { 6, 0, solaris_timer_create, "timer_create" }, /* 194 */ + { 6, 0, solaris_timer_delete, "timer_delete" }, /* 195 */ + { 6, 0, solaris_timer_settime, "timer_settime" }, /* 196 */ + { 6, 0, solaris_timer_gettime, "timer_gettime" }, /* 197 */ + { 6, 0, solaris_timer_getoverrun,"timer_getoverrun"}, /* 198 */ + { 6, 0, solaris_nanosleep, "nanosleep" }, /* 199 */ + { 6, 0, NULL, NULL }, /* 200 */ + { 6, 0, NULL, NULL }, /* 201 */ + { 6, 0, NULL, NULL }, /* 202 */ + { 6, 0, NULL, NULL }, /* 203 */ + { 6, 0, NULL, NULL }, /* 204 */ + { 6, 0, NULL, NULL }, /* 205 */ + { 6, 0, NULL, NULL }, /* 206 */ + { 6, 0, NULL, NULL }, /* 207 */ + { 6, 0, NULL, NULL }, /* 208 */ + { 6, 0, NULL, NULL }, /* 209 */ + { 6, 0, NULL, NULL }, /* 210 */ + { 6, 0, NULL, NULL }, /* 211 */ + { 6, 0, NULL, NULL }, /* 212 */ + { 6, 0, NULL, NULL }, /* 213 */ + { 6, 0, NULL, NULL }, /* 214 */ + { 6, 0, NULL, NULL }, /* 215 */ + { 6, 0, NULL, NULL }, /* 216 */ + { 6, 0, NULL, NULL }, /* 217 */ + { 6, 0, NULL, NULL }, /* 218 */ + { 6, 0, NULL, NULL }, /* 219 */ + { 6, 0, NULL, NULL }, /* 220 */ + { 6, 0, NULL, NULL }, /* 221 */ + { 6, 0, NULL, NULL }, /* 222 */ + { 6, 0, NULL, NULL }, /* 223 */ + { 6, 0, NULL, NULL }, /* 224 */ + { 6, 0, NULL, NULL }, /* 225 */ + { 6, 0, NULL, NULL }, /* 226 */ + { 6, 0, NULL, NULL }, /* 227 */ + { 6, 0, NULL, NULL }, /* 228 */ + { 6, 0, NULL, NULL }, /* 229 */ + { 6, 0, NULL, NULL }, /* 230 */ + { 6, 0, NULL, NULL }, /* 231 */ + { 6, 0, NULL, NULL }, /* 232 */ + { 6, 0, NULL, NULL }, /* 233 */ + { 6, 0, NULL, NULL }, /* 234 */ + { 6, 0, NULL, NULL }, /* 235 */ + { 6, 0, NULL, NULL }, /* 236 */ + { 6, 0, NULL, NULL }, /* 237 */ + { 6, 0, NULL, NULL }, /* 238 */ + { 6, 0, NULL, NULL }, /* 239 */ + { 6, 0, NULL, NULL }, /* 240 */ + { 6, 0, NULL, NULL }, /* 241 */ + { 6, 0, NULL, NULL }, /* 242 */ + { 6, 0, NULL, NULL }, /* 243 */ + { 6, 0, NULL, NULL }, /* 244 */ + { 6, 0, NULL, NULL }, /* 245 */ + { 6, 0, NULL, NULL }, /* 246 */ + { 6, 0, NULL, NULL }, /* 247 */ + { 6, 0, NULL, NULL }, /* 248 */ + { 6, 0, NULL, NULL }, /* 249 */ + { 6, 0, NULL, NULL }, /* 250 */ + { 6, 0, NULL, NULL }, /* 251 */ + { 6, 0, NULL, NULL }, /* 252 */ + { 6, 0, NULL, NULL }, /* 253 */ + { 6, 0, NULL, NULL }, /* 254 */ + { 6, 0, NULL, NULL }, /* 255 */ + { 6, 0, NULL, NULL }, /* 256 */ + { 6, 0, NULL, NULL }, /* 257 */ + { 6, 0, NULL, NULL }, /* 258 */ + { 6, 0, NULL, NULL }, /* 259 */ + { 6, 0, NULL, NULL }, /* 260 */ + { 6, 0, NULL, NULL }, /* 261 */ + { 6, 0, NULL, NULL }, /* 262 */ + { 6, 0, NULL, NULL }, /* 263 */ + { 6, 0, NULL, NULL }, /* 264 */ + { 6, 0, NULL, NULL }, /* 265 */ + { 6, 0, NULL, NULL }, /* 266 */ + { 6, 0, NULL, NULL }, /* 267 */ + { 6, 0, NULL, NULL }, /* 268 */ + { 6, 0, NULL, NULL }, /* 269 */ + { 6, 0, NULL, NULL }, /* 270 */ + { 6, 0, NULL, NULL }, /* 271 */ + { 6, 0, NULL, NULL }, /* 272 */ + { 6, 0, NULL, NULL }, /* 273 */ + { 6, 0, NULL, NULL }, /* 274 */ + { 6, 0, NULL, NULL }, /* 275 */ + { 6, 0, NULL, NULL }, /* 276 */ + { 6, 0, NULL, NULL }, /* 277 */ + { 6, 0, NULL, NULL }, /* 278 */ + { 6, 0, NULL, NULL }, /* 279 */ + { 6, 0, NULL, NULL }, /* 280 */ + { 6, 0, NULL, NULL }, /* 281 */ + { 6, 0, NULL, NULL }, /* 282 */ + { 6, 0, NULL, NULL }, /* 283 */ + { 6, 0, NULL, NULL }, /* 284 */ + { 6, 0, NULL, NULL }, /* 285 */ + { 6, 0, NULL, NULL }, /* 286 */ + { 6, 0, NULL, NULL }, /* 287 */ + { 6, 0, NULL, NULL }, /* 288 */ + { 6, 0, NULL, NULL }, /* 289 */ + { 6, 0, NULL, NULL }, /* 290 */ + { 6, 0, NULL, NULL }, /* 291 */ + { 6, 0, NULL, NULL }, /* 292 */ + { 6, 0, NULL, NULL }, /* 293 */ + { 6, 0, NULL, NULL }, /* 294 */ + { 6, 0, NULL, NULL }, /* 295 */ + { 6, 0, NULL, NULL }, /* 296 */ + { 6, 0, NULL, NULL }, /* 297 */ + { 6, 0, NULL, NULL }, /* 298 */ + { 6, 0, NULL, NULL }, /* 299 */ + + { 6, 0, solaris_getpgrp, "getpgrp" }, /* 300 */ + { 6, 0, solaris_setpgrp, "setpgrp" }, /* 301 */ + { 6, 0, solaris_getsid, "getsid" }, /* 302 */ + { 6, 0, solaris_setsid, "setsid" }, /* 303 */ + { 6, 0, solaris_getpgid, "getpgid" }, /* 304 */ + { 6, 0, solaris_setpgid, "setpgid" }, /* 305 */ + { 6, 0, NULL, NULL }, /* 306 */ + { 6, 0, NULL, NULL }, /* 307 */ + { 6, 0, NULL, NULL }, /* 308 */ + { 6, 0, NULL, NULL }, /* 309 */ + + { 6, TS, solaris_signal, "signal" }, /* 310 */ + { 6, TS, solaris_sigset, "sigset" }, /* 311 */ + { 6, TS, solaris_sighold, "sighold" }, /* 312 */ + { 6, TS, solaris_sigrelse, "sigrelse" }, /* 313 */ + { 6, TS, solaris_sigignore, "sigignore" }, /* 314 */ + { 6, TS, solaris_sigpause, "sigpause" }, /* 315 */ + { 6, 0, NULL, NULL }, /* 316 */ + { 6, 0, NULL, NULL }, /* 317 */ + { 6, 0, NULL, NULL }, /* 318 */ + { 6, 0, NULL, NULL }, /* 319 */ + + { 6, TI, solaris_msgget, "msgget" }, /* 320 */ + { 6, TI, solaris_msgctl, "msgctl" }, /* 321 */ + { 6, TI, solaris_msgrcv, "msgrcv" }, /* 322 */ + { 6, TI, solaris_msgsnd, "msgsnd" }, /* 323 */ + { 6, 0, NULL, NULL }, /* 324 */ + { 6, 0, NULL, NULL }, /* 325 */ + { 6, 0, NULL, NULL }, /* 326 */ + { 6, 0, NULL, NULL }, /* 327 */ + { 6, 0, NULL, NULL }, /* 328 */ + { 6, 0, NULL, NULL }, /* 329 */ + + { 6, TI, solaris_shmat, "shmat" }, /* 330 */ + { 6, TI, solaris_shmctl, "shmctl" }, /* 331 */ + { 6, TI, solaris_shmdt, "shmdt" }, /* 332 */ + { 6, TI, solaris_shmget, "shmget" }, /* 333 */ + { 6, 0, NULL, NULL }, /* 334 */ + { 6, 0, NULL, NULL }, /* 335 */ + { 6, 0, NULL, NULL }, /* 336 */ + { 6, 0, NULL, NULL }, /* 337 */ + { 6, 0, NULL, NULL }, /* 338 */ + { 6, 0, NULL, NULL }, /* 339 */ + + { 6, TI, solaris_semctl, "semctl" }, /* 340 */ + { 6, TI, solaris_semget, "semget" }, /* 341 */ + { 6, TI, solaris_semop, "semop" }, /* 342 */ + { 6, 0, NULL, NULL }, /* 343 */ + { 6, 0, NULL, NULL }, /* 344 */ + { 6, 0, NULL, NULL }, /* 345 */ + { 6, 0, NULL, NULL }, /* 346 */ + { 6, 0, NULL, NULL }, /* 347 */ + { 6, 0, NULL, NULL }, /* 348 */ + { 6, 0, NULL, NULL }, /* 349 */ + + { 6, 0, solaris_olduname, "olduname" }, /* 350 */ + { 6, 0, printargs, "utssys1" }, /* 351 */ + { 6, 0, solaris_ustat, "ustat" }, /* 352 */ + { 6, 0, solaris_fusers, "fusers" }, /* 353 */ + { 6, 0, NULL, NULL }, /* 354 */ + { 6, 0, NULL, NULL }, /* 355 */ + { 6, 0, NULL, NULL }, /* 356 */ + { 6, 0, NULL, NULL }, /* 357 */ + { 6, 0, NULL, NULL }, /* 358 */ + { 6, 0, NULL, NULL }, /* 359 */ + + { 6, 0, printargs, "sysfs0" }, /* 360 */ + { 6, 0, solaris_sysfs1, "sysfs1" }, /* 361 */ + { 6, 0, solaris_sysfs2, "sysfs2" }, /* 362 */ + { 6, 0, solaris_sysfs3, "sysfs3" }, /* 363 */ + { 6, 0, NULL, NULL }, /* 364 */ + { 6, 0, NULL, NULL }, /* 365 */ + { 6, 0, NULL, NULL }, /* 366 */ + { 6, 0, NULL, NULL }, /* 367 */ + { 6, 0, NULL, NULL }, /* 368 */ + { 6, 0, NULL, NULL }, /* 369 */ + + { 6, 0, printargs, "spcall0" }, /* 370 */ + { 6, TS, solaris_sigpending, "sigpending" }, /* 371 */ + { 6, TS, solaris_sigfillset, "sigfillset" }, /* 372 */ + { 6, 0, NULL, NULL }, /* 373 */ + { 6, 0, NULL, NULL }, /* 374 */ + { 6, 0, NULL, NULL }, /* 375 */ + { 6, 0, NULL, NULL }, /* 376 */ + { 6, 0, NULL, NULL }, /* 377 */ + { 6, 0, NULL, NULL }, /* 378 */ + { 6, 0, NULL, NULL }, /* 379 */ + + { 6, 0, solaris_getcontext, "getcontext" }, /* 380 */ + { 6, 0, solaris_setcontext, "setcontext" }, /* 381 */ + { 6, 0, NULL, NULL }, /* 382 */ + { 6, 0, NULL, NULL }, /* 383 */ + { 6, 0, NULL, NULL }, /* 384 */ + { 6, 0, NULL, NULL }, /* 385 */ + { 6, 0, NULL, NULL }, /* 386 */ + { 6, 0, NULL, NULL }, /* 387 */ + { 6, 0, NULL, NULL }, /* 388 */ + { 6, 0, NULL, NULL }, /* 389 */ + + { 6, 0, NULL, NULL }, /* 390 */ + { 6, 0, NULL, NULL }, /* 391 */ + { 6, 0, NULL, NULL }, /* 392 */ + { 6, 0, NULL, NULL }, /* 393 */ + { 6, 0, NULL, NULL }, /* 394 */ + { 6, 0, NULL, NULL }, /* 395 */ + { 6, 0, NULL, NULL }, /* 396 */ + { 6, 0, NULL, NULL }, /* 397 */ + { 6, 0, NULL, NULL }, /* 398 */ + { 6, 0, NULL, NULL }, /* 399 */ diff --git a/alice-strace/linux/sparc64/dummy2.h b/alice-strace/linux/sparc64/dummy2.h new file mode 100644 index 0000000..39552a2 --- /dev/null +++ b/alice-strace/linux/sparc64/dummy2.h @@ -0,0 +1,276 @@ +/* + * Copyright (c) 1993, 1994, 1995 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. + */ + +/* still unfinished */ + +#define solaris_sysmp printargs +#define solaris_sginap printargs +#define solaris_sgikopt printargs +#define solaris_sysmips printargs +#define solaris_sigreturn printargs +#define solaris_recvmsg printargs +#define solaris_sendmsg printargs +#define solaris_nfssvc printargs +#define solaris_getfh printargs +#define solaris_async_daemon printargs +#define solaris_exportfs printargs +#define solaris_BSD_getime printargs +#define solaris_sproc printargs +#define solaris_procblk printargs +#define solaris_sprocsp printargs +#define solaris_msync printargs +#define solaris_madvise printargs +#define solaris_pagelock printargs +#define solaris_quotactl printargs +#define solaris_cacheflush printargs +#define solaris_cachectl printargs +#define solaris_nuname printargs +#define solaris_sigpoll printargs +#define solaris_swapctl printargs +#define solaris_sigstack printargs +#define solaris_sigsendset printargs +#define solaris_priocntl printargs +#define solaris_ksigqueue printargs +#define solaris_lwp_sema_wait printargs +#define solaris_memcntl printargs +#define solaris_syscall printargs +#define solaris_clocal printargs +#define solaris_syssun printargs +#define solaris_sysi86 printargs +#define solaris_sysmachine printargs +#define solaris_plock printargs +#define solaris_pathconf printargs +#define solaris_sigtimedwait printargs +#define solaris_ulimit printargs +#define solaris_ptrace printargs +#define solaris_stty printargs +#define solaris_lwp_info printargs +#define solaris_priocntlsys printargs +#define solaris_hrtsys printargs +#define solaris_xenix printargs +#define solaris_statfs printargs +#define solaris_fstatfs printargs +#define solaris_statvfs printargs +#define solaris_fstatvfs printargs +#define solaris_fork1 printargs +#define solaris_sigsendsys printargs +#define solaris_gtty printargs +#define solaris_vtrace printargs +#define solaris_fpathconf printargs +#define solaris_evsys printargs +#define solaris_acct printargs +#define solaris_exec printargs +#define solaris_lwp_sema_post printargs +#define solaris_nfssys printargs +#define solaris_sigaltstack printargs +#define solaris_uadmin printargs +#define solaris_umount printargs +#define solaris_modctl printargs +#define solaris_acancel printargs +#define solaris_async printargs +#define solaris_evtrapret printargs +#define solaris_lwp_create printargs +#define solaris_lwp_exit printargs +#define solaris_lwp_suspend printargs +#define solaris_lwp_continue printargs +#define solaris_lwp_kill printargs +#define solaris_lwp_self printargs +#define solaris_lwp_setprivate printargs +#define solaris_lwp_getprivate printargs +#define solaris_lwp_wait printargs +#define solaris_lwp_mutex_unlock printargs +#define solaris_lwp_mutex_lock printargs +#define solaris_lwp_cond_wait printargs +#define solaris_lwp_cond_signal printargs +#define solaris_lwp_cond_broadcast printargs +#define solaris_llseek printargs +#define solaris_inst_sync printargs +#define solaris_auditsys printargs +#define solaris_processor_bind printargs +#define solaris_processor_info printargs +#define solaris_p_online printargs +#define solaris_sigqueue printargs +#define solaris_clock_gettime printargs +#define solaris_clock_settime printargs +#define solaris_clock_getres printargs +#define solaris_nanosleep printargs +#define solaris_timer_create printargs +#define solaris_timer_delete printargs +#define solaris_timer_settime printargs +#define solaris_timer_gettime printargs +#define solaris_timer_getoverrun printargs +#define solaris_signal printargs +#define solaris_sigset printargs +#define solaris_sighold printargs +#define solaris_sigrelse printargs +#define solaris_sigignore printargs +#define solaris_sigpause printargs +#define solaris_msgctl printargs +#define solaris_msgget printargs +#define solaris_msgrcv printargs +#define solaris_msgsnd printargs +#define solaris_shmat printargs +#define solaris_shmctl printargs +#define solaris_shmdt printargs +#define solaris_shmget printargs +#define solaris_semctl printargs +#define solaris_semget printargs +#define solaris_semop printargs +#define solaris_olduname printargs +#define solaris_ustat printargs +#define solaris_fusers printargs +#define solaris_sysfs1 printargs +#define solaris_sysfs2 printargs +#define solaris_sysfs3 printargs + +/* like another call */ +#define solaris_lchown solaris_chown +#define solaris_setuid solaris_close +#define solaris_seteuid solaris_close +#define solaris_setgid solaris_close +#define solaris_setegid solaris_close +#define solaris_vhangup solaris_close +#define solaris_fdsync solaris_close +#define solaris_sigfillset solaris_sigpending +#define solaris_vfork solaris_fork +#define solaris_ksigaction solaris_sigaction +#define solaris_BSDgetpgrp solaris_getpgrp +#define solaris_BSDsetpgrp solaris_setpgrp +#define solaris_waitsys solaris_waitid + +/* printargs does the right thing */ +#define solaris_sync printargs +#define solaris_profil printargs +#define solaris_yield printargs +#define solaris_pause printargs +#define solaris_sethostid printargs + +/* subfunction entry points */ +#define solaris_pgrpsys printargs +#define solaris_sigcall printargs +#define solaris_msgsys printargs +#define solaris_shmsys printargs +#define solaris_semsys printargs +#define solaris_utssys printargs +#define solaris_sysfs printargs +#define solaris_spcall printargs +#define solaris_context printargs + +/* same as linux */ +#define solaris_exit sys_exit +#define solaris_fork sys_fork +#define solaris_read sys_read +#define solaris_write sys_write +#define solaris_close sys_close +#define solaris_creat sys_creat +#define solaris_link sys_link +#define solaris_unlink sys_unlink +#define solaris_chdir sys_chdir +#define solaris_time sys_time +#define solaris_chmod sys_chmod +#define solaris_lseek sys_lseek +#define solaris_stime sys_stime +#define solaris_alarm sys_alarm +#define solaris_utime sys_utime +#define solaris_access sys_access +#define solaris_nice sys_nice +#define solaris_dup sys_dup +#define solaris_pipe sys_pipe +#define solaris_times sys_times +#define solaris_execve sys_execve +#define solaris_umask sys_umask +#define solaris_chroot sys_chroot +#define solaris_rmdir sys_rmdir +#define solaris_mkdir sys_mkdir +#define solaris_getdents sys_getdents +#define solaris_poll sys_poll +#define solaris_symlink sys_symlink +#define solaris_readlink sys_readlink +#define solaris_setgroups sys_setgroups +#define solaris_getgroups sys_getgroups +#define solaris_fchmod sys_fchmod +#define solaris_fchown sys_fchown +#define solaris_mprotect sys_mprotect +#define solaris_munmap sys_munmap +#define solaris_readv sys_readv +#define solaris_writev sys_writev +#define solaris_chown sys_chown +#define solaris_rename sys_rename +#define solaris_gettimeofday sys_gettimeofday +#define solaris_getitimer sys_getitimer +#define solaris_setitimer sys_setitimer +#define solaris_brk sys_brk +#define solaris_mmap sys_mmap +#define solaris_getsid sys_getsid +#define solaris_setsid sys_setsid +#define solaris_getpgid sys_getpgid +#define solaris_setpgid sys_setpgid +#define solaris_getpgrp sys_getpgrp + +/* These are handled according to current_personality */ +#define solaris_xstat sys_xstat +#define solaris_fxstat sys_fxstat +#define solaris_lxstat sys_lxstat +#define solaris_xmknod sys_xmknod +#define solaris_stat sys_stat +#define solaris_fstat sys_fstat +#define solaris_lstat sys_lstat +#define solaris_pread sys_pread +#define solaris_pwrite sys_pwrite +#define solaris_ioctl sys_ioctl +#define solaris_mknod sys_mknod + +/* To be done */ +#define solaris_mount printargs +#define solaris_sysinfo printargs +#define solaris_sysconfig printargs +#define solaris_getpmsg printargs +#define solaris_putpmsg printargs +#define solaris_wait printargs +#define solaris_waitid printargs +#define solaris_sigsuspend printargs +#define solaris_setpgrp printargs +#define solaris_getcontext printargs +#define solaris_setcontext printargs +#define solaris_getpid printargs +#define solaris_getuid printargs +#define solaris_kill printargs +#define solaris_getgid printargs +#define solaris_fcntl printargs +#define solaris_getmsg printargs +#define solaris_putmsg printargs +#define solaris_sigprocmask printargs +#define solaris_sigaction printargs +#define solaris_sigpending printargs +#define solaris_mincore printargs +#define solaris_fchdir printargs +#define solaris_setrlimit printargs +#define solaris_getrlimit printargs +#define solaris_uname printargs +#define solaris_adjtime printargs +#define solaris_fchroot printargs +#define solaris_utimes printargs diff --git a/alice-strace/linux/sparc64/errnoent.h b/alice-strace/linux/sparc64/errnoent.h new file mode 100644 index 0000000..d243699 --- /dev/null +++ b/alice-strace/linux/sparc64/errnoent.h @@ -0,0 +1,127 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "EWOULDBLOCK", /* 35 */ + "EINPROGRESS", /* 36 */ + "EALREADY", /* 37 */ + "ENOTSOCK", /* 38 */ + "EDESTADDRREQ", /* 39 */ + "EMSGSIZE", /* 40 */ + "EPROTOTYPE", /* 41 */ + "ENOPROTOOPT", /* 42 */ + "EPROTONOSUPPORT", /* 43 */ + "ESOCKTNOSUPPORT", /* 44 */ + "EOPNOTSUPP", /* 45 */ + "EPFNOSUPPORT", /* 46 */ + "EAFNOSUPPORT", /* 47 */ + "EADDRINUSE", /* 48 */ + "EADDRNOTAVAIL", /* 49 */ + "ENETDOWN", /* 50 */ + "ENETUNREACH", /* 51 */ + "ENETRESET", /* 52 */ + "ECONNABORTED", /* 53 */ + "ECONNRESET", /* 54 */ + "ENOBUFS", /* 55 */ + "EISCONN", /* 56 */ + "ENOTCONN", /* 57 */ + "ESHUTDOWN", /* 58 */ + "ETOOMANYREFS", /* 59 */ + "ETIMEDOUT", /* 60 */ + "ECONNREFUSED", /* 61 */ + "ELOOP", /* 62 */ + "ENAMETOOLONG", /* 63 */ + "EHOSTDOWN", /* 64 */ + "EHOSTUNREACH", /* 65 */ + "ENOTEMPTY", /* 66 */ + "EPROCLIM", /* 67 */ + "EUSERS", /* 68 */ + "EDQUOT", /* 69 */ + "ESTALE", /* 70 */ + "EREMOTE", /* 71 */ + "ENOSTR", /* 72 */ + "ETIME", /* 73 */ + "ENOSR", /* 74 */ + "ENOMSG", /* 75 */ + "EBADMSG", /* 76 */ + "EIDRM", /* 77 */ + "EDEADLK", /* 78 */ + "ENOLCK", /* 79 */ + "ENONET", /* 80 */ + "ERREMOTE", /* 81 */ + "ENOLINK", /* 82 */ + "EADV", /* 83 */ + "ESRMNT", /* 84 */ + "ECOMM", /* 85 */ + "EPROTO", /* 86 */ + "EMULTIHOP", /* 87 */ + "EDOTDOT", /* 88 */ + "EREMCHG", /* 89 */ + "ENOSYS", /* 90 */ + "ESTRPIPE", /* 91 */ + "EOVERFLOW", /* 92 */ + "EBADFD", /* 93 */ + "ECHRNG", /* 94 */ + "EL2NSYNC", /* 95 */ + "EL3HLT", /* 96 */ + "EL3RST", /* 97 */ + "ELNRNG", /* 98 */ + "EUNATCH", /* 99 */ + "ENOCSI", /* 100 */ + "EL2HLT", /* 101 */ + "EBADE", /* 102 */ + "EBADR", /* 103 */ + "EXFULL", /* 104 */ + "ENOANO", /* 105 */ + "EBADRQC", /* 106 */ + "EBADSLT", /* 107 */ + "EDEADLOCK", /* 108 */ + "EBFONT", /* 109 */ + "ELIBEXEC", /* 110 */ + "ENODATA", /* 111 */ + "ELIBBAD", /* 112 */ + "ENOPKG", /* 113 */ + "ELIBACC", /* 114 */ + "ENOTUNIQ", /* 115 */ + "ERESTART", /* 116 */ + "EUCLEAN", /* 117 */ + "ENOTNAM", /* 118 */ + "ENAVAIL", /* 119 */ + "EISNAM", /* 120 */ + "EREMOTEIO", /* 121 */ + "EILSEQ", /* 122 */ + "ELIBMAX", /* 123 */ + "ELIBSCN", /* 124 */ + "ENOMEDIUM", /* 125 */ + "EMEDIUMTYPE", /* 126 */ diff --git a/alice-strace/linux/sparc64/errnoent1.h b/alice-strace/linux/sparc64/errnoent1.h new file mode 100644 index 0000000..c1eaac6 --- /dev/null +++ b/alice-strace/linux/sparc64/errnoent1.h @@ -0,0 +1 @@ +#include "../sparc/errnoent1.h" diff --git a/alice-strace/linux/sparc64/errnoent2.h b/alice-strace/linux/sparc64/errnoent2.h new file mode 100644 index 0000000..d243699 --- /dev/null +++ b/alice-strace/linux/sparc64/errnoent2.h @@ -0,0 +1,127 @@ + "ERRNO_0", /* 0 */ + "EPERM", /* 1 */ + "ENOENT", /* 2 */ + "ESRCH", /* 3 */ + "EINTR", /* 4 */ + "EIO", /* 5 */ + "ENXIO", /* 6 */ + "E2BIG", /* 7 */ + "ENOEXEC", /* 8 */ + "EBADF", /* 9 */ + "ECHILD", /* 10 */ + "EAGAIN", /* 11 */ + "ENOMEM", /* 12 */ + "EACCES", /* 13 */ + "EFAULT", /* 14 */ + "ENOTBLK", /* 15 */ + "EBUSY", /* 16 */ + "EEXIST", /* 17 */ + "EXDEV", /* 18 */ + "ENODEV", /* 19 */ + "ENOTDIR", /* 20 */ + "EISDIR", /* 21 */ + "EINVAL", /* 22 */ + "ENFILE", /* 23 */ + "EMFILE", /* 24 */ + "ENOTTY", /* 25 */ + "ETXTBSY", /* 26 */ + "EFBIG", /* 27 */ + "ENOSPC", /* 28 */ + "ESPIPE", /* 29 */ + "EROFS", /* 30 */ + "EMLINK", /* 31 */ + "EPIPE", /* 32 */ + "EDOM", /* 33 */ + "ERANGE", /* 34 */ + "EWOULDBLOCK", /* 35 */ + "EINPROGRESS", /* 36 */ + "EALREADY", /* 37 */ + "ENOTSOCK", /* 38 */ + "EDESTADDRREQ", /* 39 */ + "EMSGSIZE", /* 40 */ + "EPROTOTYPE", /* 41 */ + "ENOPROTOOPT", /* 42 */ + "EPROTONOSUPPORT", /* 43 */ + "ESOCKTNOSUPPORT", /* 44 */ + "EOPNOTSUPP", /* 45 */ + "EPFNOSUPPORT", /* 46 */ + "EAFNOSUPPORT", /* 47 */ + "EADDRINUSE", /* 48 */ + "EADDRNOTAVAIL", /* 49 */ + "ENETDOWN", /* 50 */ + "ENETUNREACH", /* 51 */ + "ENETRESET", /* 52 */ + "ECONNABORTED", /* 53 */ + "ECONNRESET", /* 54 */ + "ENOBUFS", /* 55 */ + "EISCONN", /* 56 */ + "ENOTCONN", /* 57 */ + "ESHUTDOWN", /* 58 */ + "ETOOMANYREFS", /* 59 */ + "ETIMEDOUT", /* 60 */ + "ECONNREFUSED", /* 61 */ + "ELOOP", /* 62 */ + "ENAMETOOLONG", /* 63 */ + "EHOSTDOWN", /* 64 */ + "EHOSTUNREACH", /* 65 */ + "ENOTEMPTY", /* 66 */ + "EPROCLIM", /* 67 */ + "EUSERS", /* 68 */ + "EDQUOT", /* 69 */ + "ESTALE", /* 70 */ + "EREMOTE", /* 71 */ + "ENOSTR", /* 72 */ + "ETIME", /* 73 */ + "ENOSR", /* 74 */ + "ENOMSG", /* 75 */ + "EBADMSG", /* 76 */ + "EIDRM", /* 77 */ + "EDEADLK", /* 78 */ + "ENOLCK", /* 79 */ + "ENONET", /* 80 */ + "ERREMOTE", /* 81 */ + "ENOLINK", /* 82 */ + "EADV", /* 83 */ + "ESRMNT", /* 84 */ + "ECOMM", /* 85 */ + "EPROTO", /* 86 */ + "EMULTIHOP", /* 87 */ + "EDOTDOT", /* 88 */ + "EREMCHG", /* 89 */ + "ENOSYS", /* 90 */ + "ESTRPIPE", /* 91 */ + "EOVERFLOW", /* 92 */ + "EBADFD", /* 93 */ + "ECHRNG", /* 94 */ + "EL2NSYNC", /* 95 */ + "EL3HLT", /* 96 */ + "EL3RST", /* 97 */ + "ELNRNG", /* 98 */ + "EUNATCH", /* 99 */ + "ENOCSI", /* 100 */ + "EL2HLT", /* 101 */ + "EBADE", /* 102 */ + "EBADR", /* 103 */ + "EXFULL", /* 104 */ + "ENOANO", /* 105 */ + "EBADRQC", /* 106 */ + "EBADSLT", /* 107 */ + "EDEADLOCK", /* 108 */ + "EBFONT", /* 109 */ + "ELIBEXEC", /* 110 */ + "ENODATA", /* 111 */ + "ELIBBAD", /* 112 */ + "ENOPKG", /* 113 */ + "ELIBACC", /* 114 */ + "ENOTUNIQ", /* 115 */ + "ERESTART", /* 116 */ + "EUCLEAN", /* 117 */ + "ENOTNAM", /* 118 */ + "ENAVAIL", /* 119 */ + "EISNAM", /* 120 */ + "EREMOTEIO", /* 121 */ + "EILSEQ", /* 122 */ + "ELIBMAX", /* 123 */ + "ELIBSCN", /* 124 */ + "ENOMEDIUM", /* 125 */ + "EMEDIUMTYPE", /* 126 */ diff --git a/alice-strace/linux/sparc64/ioctlent.h.in b/alice-strace/linux/sparc64/ioctlent.h.in new file mode 100644 index 0000000..4bc5cfd --- /dev/null +++ b/alice-strace/linux/sparc64/ioctlent.h.in @@ -0,0 +1 @@ +#include "../sparc/ioctlent.h.in" diff --git a/alice-strace/linux/sparc64/ioctlent1.h b/alice-strace/linux/sparc64/ioctlent1.h new file mode 100644 index 0000000..c572f6e --- /dev/null +++ b/alice-strace/linux/sparc64/ioctlent1.h @@ -0,0 +1 @@ +#include "../sparc/ioctlent1.h" diff --git a/alice-strace/linux/sparc64/ioctlent2.h b/alice-strace/linux/sparc64/ioctlent2.h new file mode 100644 index 0000000..c1d6b8a --- /dev/null +++ b/alice-strace/linux/sparc64/ioctlent2.h @@ -0,0 +1,838 @@ + {"linux/fs.h", "FIBMAP", 0x1}, + {"linux/fs.h", "FIGETBSZ", 0x2}, + {"linux/fd.h", "FDGETPRM", 0x204}, + {"linux/fd.h", "FDGETMAXERRS", 0x20e}, + {"linux/fd.h", "FDGETDRVTYP", 0x20f}, + {"linux/fd.h", "FDGETDRVPRM", 0x211}, + {"linux/fd.h", "FDGETDRVSTAT", 0x212}, + {"linux/fd.h", "FDPOLLDRVSTAT", 0x213}, + {"linux/fd.h", "FDGETFDCSTAT", 0x215}, + {"linux/fd.h", "FDWERRORGET", 0x217}, + {"linux/fd.h", "FDCLRPRM", 0x241}, + {"linux/fd.h", "FDSETPRM", 0x242}, + {"linux/fd.h", "FDDEFPRM", 0x243}, + {"linux/fd.h", "FDMSGON", 0x245}, + {"linux/fd.h", "FDMSGOFF", 0x246}, + {"linux/fd.h", "FDFMTBEG", 0x247}, + {"linux/fd.h", "FDFMTTRK", 0x248}, + {"linux/fd.h", "FDFMTEND", 0x249}, + {"linux/fd.h", "FDSETEMSGTRESH", 0x24a}, + {"linux/fd.h", "FDFLUSH", 0x24b}, + {"linux/fd.h", "FDSETMAXERRS", 0x24c}, + {"linux/fd.h", "FDRESET", 0x254}, + {"linux/fd.h", "FDWERRORCLR", 0x256}, + {"linux/fd.h", "FDRAWCMD", 0x258}, + {"linux/fd.h", "FDTWADDLE", 0x259}, + {"linux/fd.h", "FDEJECT", 0x25a}, + {"linux/fd.h", "FDSETDRVPRM", 0x290}, + {"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x4d2}, + {"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x4d3}, + {"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x4d4}, + {"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x4d5}, + {"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x4d6}, + {"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x4d7}, + {"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x4d8}, + {"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x4d9}, + {"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x4da}, + {"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x4db}, + {"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x4dc}, + {"linux/fs.h", "BLKROSET", 0x125d}, + {"linux/fs.h", "BLKROGET", 0x125e}, + {"linux/fs.h", "BLKRRPART", 0x125f}, + {"linux/fs.h", "BLKGETSIZE", 0x1260}, + {"linux/fs.h", "BLKFLSBUF", 0x1261}, + {"linux/fs.h", "BLKRASET", 0x1262}, + {"linux/fs.h", "BLKRAGET", 0x1263}, + {"linux/fs.h", "BLKFRASET", 0x1264}, + {"linux/fs.h", "BLKFRAGET", 0x1265}, + {"linux/fs.h", "BLKSECTSET", 0x1266}, + {"linux/fs.h", "BLKSECTGET", 0x1267}, + {"linux/fs.h", "BLKSSZGET", 0x1268}, + {"linux/blkpg.h", "BLKPG", 0x1269}, + {"linux/fs.h", "BLKPG", 0x1269}, + {"linux/elevator.h", "BLKELVGET", 0x126a}, + {"linux/fs.h", "BLKELVGET", 0x126a}, + {"linux/elevator.h", "BLKELVSET", 0x126b}, + {"linux/fs.h", "BLKELVSET", 0x126b}, + {"linux/fs.h", "BLKBSZGET", 0x1270}, + {"linux/fs.h", "BLKBSZSET", 0x1271}, + {"linux/fs.h", "BLKGETSIZE64", 0x1272}, + {"linux/agpgart.h", "AGPIOC_INFO", 0x4100}, + {"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101}, + {"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101}, + {"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102}, + {"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102}, + {"linux/agpgart.h", "AGPIOC_SETUP", 0x4103}, + {"linux/agpgart.h", "AGPIOC_RESERVE", 0x4104}, + {"linux/agpgart.h", "AGPIOC_PROTECT", 0x4105}, + {"linux/agpgart.h", "AGPIOC_ALLOCATE", 0x4106}, + {"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x4107}, + {"linux/agpgart.h", "AGPIOC_BIND", 0x4108}, + {"linux/agpgart.h", "AGPIOC_UNBIND", 0x4109}, + {"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200}, + {"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x4201}, + {"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x4201}, + {"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x4202}, + {"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x4202}, + {"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x4203}, + {"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x4203}, + {"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x4204}, + {"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x4204}, + {"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x4205}, + {"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x4205}, + {"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x4206}, + {"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x4207}, + {"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x4208}, + {"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x4209}, + {"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a}, + {"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0x420b}, + {"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300}, + {"linux/capi.h", "CAPI_REGISTER", 0x4301}, + {"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0x4301}, + {"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0x4302}, + {"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0x4303}, + {"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x4304}, + {"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x4305}, + {"linux/capi.h", "CAPI_GET_MANUFACTURER", 0x4306}, + {"linux/soundcard.h", "SNDCTL_COPR_RUN", 0x4306}, + {"linux/capi.h", "CAPI_GET_VERSION", 0x4307}, + {"linux/soundcard.h", "SNDCTL_COPR_HALT", 0x4307}, + {"linux/capi.h", "CAPI_GET_SERIAL", 0x4308}, + {"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x4308}, + {"linux/capi.h", "CAPI_GET_PROFILE", 0x4309}, + {"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4309}, + {"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0x4320}, + {"linux/capi.h", "CAPI_GET_ERRCODE", 0x4321}, + {"linux/capi.h", "CAPI_INSTALLED", 0x4322}, + {"linux/capi.h", "CAPI_GET_FLAGS", 0x4323}, + {"linux/capi.h", "CAPI_SET_FLAGS", 0x4324}, + {"linux/capi.h", "CAPI_CLR_FLAGS", 0x4325}, + {"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x4326}, + {"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x4327}, + {"linux/input.h", "EVIOCGVERSION", 0x4501}, + {"linux/input.h", "EVIOCGID", 0x4502}, + {"linux/input.h", "EVIOCGREP", 0x4503}, + {"linux/input.h", "EVIOCSREP", 0x4503}, + {"linux/input.h", "EVIOCGKEYCODE", 0x4504}, + {"linux/input.h", "EVIOCSKEYCODE", 0x4504}, + {"linux/input.h", "EVIOCGKEY", 0x4505}, + {"linux/input.h", "EVIOCGBUS", 0x4507}, + {"linux/input.h", "EVIOCRMFF", 0x4581}, + {"linux/input.h", "EVIOCSGAIN", 0x4582}, + {"linux/input.h", "EVIOCSAUTOCENTER", 0x4583}, + {"linux/input.h", "EVIOCGEFFECTS", 0x4584}, + {"linux/fb.h", "FBIOGET_VBLANK", 0x4612}, + {"linux/hiddev.h", "HIDIOCGVERSION", 0x4801}, + {"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802}, + {"linux/hiddev.h", "HIDIOCGDEVINFO", 0x4803}, + {"linux/hiddev.h", "HIDIOCGSTRING", 0x4804}, + {"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805}, + {"linux/hiddev.h", "HIDIOCGREPORT", 0x4807}, + {"linux/hiddev.h", "HIDIOCSREPORT", 0x4808}, + {"linux/hiddev.h", "HIDIOCGREPORTINFO", 0x4809}, + {"linux/hiddev.h", "HIDIOCGFIELDINFO", 0x480a}, + {"linux/hiddev.h", "HIDIOCGUSAGE", 0x480b}, + {"linux/hiddev.h", "HIDIOCSUSAGE", 0x480c}, + {"linux/hiddev.h", "HIDIOCGUCODE", 0x480d}, + {"linux/isdn.h", "IIOCNETAIF", 0x4901}, + {"linux/isdn.h", "IIOCNETDIF", 0x4902}, + {"linux/isdn.h", "IIOCNETSCF", 0x4903}, + {"linux/isdn.h", "IIOCNETGCF", 0x4904}, + {"linux/isdn.h", "IIOCNETANM", 0x4905}, + {"linux/isdn.h", "IIOCNETDNM", 0x4906}, + {"linux/isdn.h", "IIOCNETGNM", 0x4907}, + {"linux/isdn.h", "IIOCGETSET", 0x4908}, + {"linux/isdn.h", "IIOCSETSET", 0x4909}, + {"linux/isdn.h", "IIOCSETVER", 0x490a}, + {"linux/isdn.h", "IIOCNETHUP", 0x490b}, + {"linux/isdn.h", "IIOCSETGST", 0x490c}, + {"linux/isdn.h", "IIOCSETBRJ", 0x490d}, + {"linux/isdn.h", "IIOCSIGPRF", 0x490e}, + {"linux/isdn.h", "IIOCGETPRF", 0x490f}, + {"linux/isdn.h", "IIOCSETPRF", 0x4910}, + {"linux/isdn.h", "IIOCGETMAP", 0x4911}, + {"linux/isdn.h", "IIOCSETMAP", 0x4912}, + {"linux/isdn.h", "IIOCNETASL", 0x4913}, + {"linux/isdn.h", "IIOCNETDIL", 0x4914}, + {"linux/isdn.h", "IIOCGETCPS", 0x4915}, + {"linux/isdn.h", "IIOCGETDVR", 0x4916}, + {"linux/isdn.h", "IIOCNETLCR", 0x4917}, + {"linux/isdn.h", "IIOCNETDWRSET", 0x4918}, + {"linux/isdn.h", "IIOCNETALN", 0x4920}, + {"linux/isdn.h", "IIOCNETDLN", 0x4921}, + {"linux/isdn.h", "IIOCNETGPN", 0x4922}, + {"linux/isdn.h", "IIOCDBGVAR", 0x497f}, + {"linux/isdn.h", "IIOCDRVCTL", 0x4980}, + {"linux/soundcard.h", "SOUND_MIXER_INFO", 0x4d65}, + {"linux/soundcard.h", "SOUND_OLD_MIXER_INFO", 0x4d65}, + {"linux/soundcard.h", "SOUND_MIXER_ACCESS", 0x4d66}, + {"linux/soundcard.h", "SOUND_MIXER_AGC", 0x4d67}, + {"linux/soundcard.h", "SOUND_MIXER_3DSE", 0x4d68}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE1", 0x4d6f}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE2", 0x4d70}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE3", 0x4d71}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE4", 0x4d72}, + {"linux/soundcard.h", "SOUND_MIXER_PRIVATE5", 0x4d73}, + {"linux/soundcard.h", "SOUND_MIXER_GETLEVELS", 0x4d74}, + {"linux/soundcard.h", "SOUND_MIXER_SETLEVELS", 0x4d75}, + {"linux/soundcard.h", "OSS_GETVERSION", 0x4d76}, + {"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000}, + {"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001}, + {"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0x5002}, + {"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x5002}, + {"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0x5003}, + {"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0x5004}, + {"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0x5005}, + {"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x5005}, + {"linux/soundcard.h", "SNDCTL_DSP_CHANNELS", 0x5006}, + {"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x5006}, + {"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0x5007}, + {"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x5007}, + {"linux/soundcard.h", "SNDCTL_DSP_POST", 0x5008}, + {"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0x5009}, + {"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0x500a}, + {"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x500b}, + {"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x500c}, + {"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x500d}, + {"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x500e}, + {"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x500f}, + {"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x5010}, + {"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x5010}, + {"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x5011}, + {"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x5012}, + {"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x5013}, + {"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x5014}, + {"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x5015}, + {"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x5016}, + {"linux/soundcard.h", "SNDCTL_DSP_GETODELAY", 0x5017}, + {"linux/soundcard.h", "SNDCTL_DSP_PROFILE", 0x5017}, + {"linux/soundcard.h", "SNDCTL_DSP_GETCHANNELMASK", 0x5040}, + {"linux/soundcard.h", "SNDCTL_DSP_BIND_CHANNEL", 0x5041}, + {"linux/soundcard.h", "SNDCTL_DSP_SETSPDIF", 0x5042}, + {"linux/soundcard.h", "SNDCTL_DSP_GETSPDIF", 0x5043}, + {"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x5100}, + {"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x5101}, + {"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0x5102}, + {"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0x5103}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x5104}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x5105}, + {"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x5106}, + {"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x5107}, + {"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x5108}, + {"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x5109}, + {"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x510a}, + {"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x510b}, + {"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0x510c}, + {"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x510d}, + {"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0x510e}, + {"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x510f}, + {"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x5111}, + {"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x5112}, + {"linux/soundcard.h", "SNDCTL_SEQ_GETTIME", 0x5113}, + {"linux/soundcard.h", "SNDCTL_SYNTH_ID", 0x5114}, + {"linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", 0x5115}, + {"linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", 0x5116}, + {"linux/random.h", "RNDGETENTCNT", 0x5200}, + {"linux/random.h", "RNDADDTOENTCNT", 0x5201}, + {"linux/random.h", "RNDGETPOOL", 0x5202}, + {"linux/random.h", "RNDADDENTROPY", 0x5203}, + {"linux/random.h", "RNDZAPENTCNT", 0x5204}, + {"linux/random.h", "RNDCLEARPOOL", 0x5206}, + {"asm/ioctls.h", "TCGETS", 0x5401}, + {"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0x5401}, + {"asm/ioctls.h", "TCSETS", 0x5402}, + {"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402}, + {"asm/ioctls.h", "TCSETSW", 0x5403}, + {"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403}, + {"asm/ioctls.h", "TCSETSF", 0x5404}, + {"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404}, + {"asm/ioctls.h", "TCGETA", 0x5405}, + {"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0x5405}, + {"asm/ioctls.h", "TCSETA", 0x5406}, + {"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0x5406}, + {"asm/ioctls.h", "TCSETAW", 0x5407}, + {"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x5407}, + {"asm/ioctls.h", "TCSETAF", 0x5408}, + {"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x5408}, + {"asm/ioctls.h", "TCSBRK", 0x5409}, + {"asm/ioctls.h", "TCXONC", 0x540a}, + {"asm/ioctls.h", "TCFLSH", 0x540b}, + {"asm/ioctls.h", "TIOCEXCL", 0x540c}, + {"asm/ioctls.h", "TIOCNXCL", 0x540d}, + {"asm/ioctls.h", "TIOCSCTTY", 0x540e}, + {"asm/ioctls.h", "TIOCGPGRP", 0x540f}, + {"asm/ioctls.h", "TIOCSPGRP", 0x5410}, + {"asm/ioctls.h", "TIOCOUTQ", 0x5411}, + {"asm/ioctls.h", "TIOCSTI", 0x5412}, + {"asm/ioctls.h", "TIOCGWINSZ", 0x5413}, + {"asm/ioctls.h", "TIOCSWINSZ", 0x5414}, + {"asm/ioctls.h", "TIOCMGET", 0x5415}, + {"asm/ioctls.h", "TIOCMBIS", 0x5416}, + {"asm/ioctls.h", "TIOCMBIC", 0x5417}, + {"asm/ioctls.h", "TIOCMSET", 0x5418}, + {"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419}, + {"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a}, + {"asm/ioctls.h", "FIONREAD", 0x541b}, + {"asm/ioctls.h", "TIOCLINUX", 0x541c}, + {"asm/ioctls.h", "TIOCCONS", 0x541d}, + {"asm/ioctls.h", "TIOCGSERIAL", 0x541e}, + {"asm/ioctls.h", "TIOCSSERIAL", 0x541f}, + {"asm/ioctls.h", "TIOCPKT", 0x5420}, + {"asm/ioctls.h", "FIONBIO", 0x5421}, + {"asm/ioctls.h", "TIOCNOTTY", 0x5422}, + {"asm/ioctls.h", "TIOCSETD", 0x5423}, + {"asm/ioctls.h", "TIOCGETD", 0x5424}, + {"asm/ioctls.h", "TCSBRKP", 0x5425}, + {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426}, + {"asm/ioctls.h", "TIOCSBRK", 0x5427}, + {"asm/ioctls.h", "TIOCCBRK", 0x5428}, + {"asm/ioctls.h", "TIOCGSID", 0x5429}, + {"asm/ioctls.h", "TIOCGPTN", 0x5430}, + {"asm/ioctls.h", "TIOCSPTLCK", 0x5431}, + {"asm/ioctls.h", "FIONCLEX", 0x5450}, + {"asm/ioctls.h", "FIOCLEX", 0x5451}, + {"asm/ioctls.h", "FIOASYNC", 0x5452}, + {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453}, + {"asm/ioctls.h", "TIOCSERGWILD", 0x5454}, + {"asm/ioctls.h", "TIOCSERSWILD", 0x5455}, + {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456}, + {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457}, + {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458}, + {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459}, + {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a}, + {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b}, + {"asm/ioctls.h", "TIOCMIWAIT", 0x545c}, + {"asm/ioctls.h", "TIOCGICOUNT", 0x545d}, + {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e}, + {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f}, + {"linux/if_tun.h", "TUNSETNOCSUM", 0x54c8}, + {"linux/if_tun.h", "TUNSETDEBUG", 0x54c9}, + {"linux/if_tun.h", "TUNSETIFF", 0x54ca}, + {"linux/if_tun.h", "TUNSETPERSIST", 0x54cb}, + {"linux/if_tun.h", "TUNSETOWNER", 0x54cc}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONTROL", 0x5500}, + {"linux/usbdevice_fs.h", "USBDEVFS_BULK", 0x5502}, + {"linux/usbdevice_fs.h", "USBDEVFS_RESETEP", 0x5503}, + {"linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", 0x5504}, + {"linux/usbdevice_fs.h", "USBDEVFS_SETCONFIGURATION", 0x5505}, + {"linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", 0x5508}, + {"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", 0x550a}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCARDURB", 0x550b}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c}, + {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d}, + {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e}, + {"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f}, + {"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510}, + {"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511}, + {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 0x5512}, + {"linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", 0x5513}, + {"linux/usbdevice_fs.h", "USBDEVFS_RESET", 0x5514}, + {"linux/usbdevice_fs.h", "USBDEVFS_CLEAR_HALT", 0x5515}, + {"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x5700}, + {"linux/watchdog.h", "WDIOC_GETSTATUS", 0x5701}, + {"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x5702}, + {"linux/watchdog.h", "WDIOC_GETTEMP", 0x5703}, + {"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x5704}, + {"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x5705}, + {"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0x5706}, + {"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x5707}, + {"linux/ite_gpio.h", "ITE_GPIO_IN", 0x5a00}, + {"linux/ite_gpio.h", "ITE_GPIO_OUT", 0x5a01}, + {"linux/ite_gpio.h", "ITE_GPIO_INT_CTRL", 0x5a02}, + {"linux/ite_gpio.h", "ITE_GPIO_IN_STATUS", 0x5a03}, + {"linux/ite_gpio.h", "ITE_GPIO_OUT_STATUS", 0x5a04}, + {"linux/ite_gpio.h", "ITE_GPIO_GEN_CTRL", 0x5a05}, + {"linux/ite_gpio.h", "ITE_GPIO_INT_WAIT", 0x5a06}, + {"linux/sonet.h", "SONET_GETSTAT", 0x6110}, + {"linux/sonet.h", "SONET_GETSTATZ", 0x6111}, + {"linux/sonet.h", "SONET_SETDIAG", 0x6112}, + {"linux/sonet.h", "SONET_CLRDIAG", 0x6113}, + {"linux/sonet.h", "SONET_GETDIAG", 0x6114}, + {"linux/sonet.h", "SONET_SETFRAMING", 0x6115}, + {"linux/sonet.h", "SONET_GETFRAMING", 0x6116}, + {"linux/sonet.h", "SONET_GETFRSENSE", 0x6117}, + {"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x6132}, + {"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x6133}, + {"linux/atmdev.h", "ATM_GETSTAT", 0x6150}, + {"linux/atmdev.h", "ATM_GETSTATZ", 0x6151}, + {"linux/atmdev.h", "ATM_GETLOOP", 0x6152}, + {"linux/atmdev.h", "ATM_SETLOOP", 0x6153}, + {"linux/atmdev.h", "ATM_QUERYLOOP", 0x6154}, + {"linux/atm_eni.h", "ENI_MEMDUMP", 0x6160}, + {"linux/atm_nicstar.h", "NS_GETPSTAT", 0x6161}, + {"linux/atm_zatm.h", "ZATM_GETPOOL", 0x6161}, + {"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x6162}, + {"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x6162}, + {"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163}, + {"linux/atm_zatm.h", "ZATM_SETPOOL", 0x6163}, + {"linux/atm_zatm.h", "ZATM_GETTHIST", 0x6164}, + {"linux/atm_eni.h", "ENI_SETMULT", 0x6167}, + {"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180}, + {"linux/atmdev.h", "ATM_GETLINKRATE", 0x6181}, + {"linux/atmdev.h", "ATM_GETNAMES", 0x6183}, + {"linux/atmdev.h", "ATM_GETTYPE", 0x6184}, + {"linux/atmdev.h", "ATM_GETESI", 0x6185}, + {"linux/atmdev.h", "ATM_GETADDR", 0x6186}, + {"linux/atmdev.h", "ATM_RSTADDR", 0x6187}, + {"linux/atmdev.h", "ATM_ADDADDR", 0x6188}, + {"linux/atmdev.h", "ATM_DELADDR", 0x6189}, + {"linux/atmdev.h", "ATM_GETCIRANGE", 0x618a}, + {"linux/atmdev.h", "ATM_SETCIRANGE", 0x618b}, + {"linux/atmdev.h", "ATM_SETESI", 0x618c}, + {"linux/atmdev.h", "ATM_SETESIF", 0x618d}, + {"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e}, + {"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f}, + {"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0}, + {"linux/atmlec.h", "ATMLEC_DATA", 0x61d1}, + {"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2}, + {"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8}, + {"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9}, + {"linux/atmclip.h", "SIOCMKCLIP", 0x61e0}, + {"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1}, + {"linux/atmarp.h", "ATMARP_MKIP", 0x61e2}, + {"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3}, + {"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5}, + {"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0}, + {"linux/atmdev.h", "ATM_SETSC", 0x61f1}, + {"linux/atmdev.h", "ATM_SETBACKEND", 0x61f2}, + {"linux/coda.h", "CIOC_KERNEL_VERSION", 0x630a}, + {"linux/comstats.h", "COM_GETPORTSTATS", 0x631e}, + {"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f}, + {"linux/comstats.h", "COM_GETBRDSTATS", 0x6320}, + {"linux/comstats.h", "COM_READPORT", 0x6328}, + {"linux/comstats.h", "COM_READBOARD", 0x6329}, + {"linux/comstats.h", "COM_READPANEL", 0x632a}, + {"linux/devfs_fs.h", "DEVFSDIOC_GET_PROTO_REV", 0x6400}, + {"linux/video_decoder.h", "DECODER_GET_CAPABILITIES", 0x6401}, + {"linux/devfs_fs.h", "DEVFSDIOC_SET_EVENT_MASK", 0x6402}, + {"linux/video_decoder.h", "DECODER_GET_STATUS", 0x6402}, + {"linux/devfs_fs.h", "DEVFSDIOC_RELEASE_EVENT_QUEUE", 0x6403}, + {"linux/video_decoder.h", "DECODER_SET_NORM", 0x6403}, + {"linux/devfs_fs.h", "DEVFSDIOC_SET_DEBUG_MASK", 0x6404}, + {"linux/video_decoder.h", "DECODER_SET_INPUT", 0x6404}, + {"linux/video_decoder.h", "DECODER_SET_OUTPUT", 0x6405}, + {"linux/video_decoder.h", "DECODER_ENABLE_OUTPUT", 0x6406}, + {"linux/video_decoder.h", "DECODER_SET_PICTURE", 0x6407}, + {"linux/video_decoder.h", "DECODER_DUMP", 0x64c0}, + {"linux/video_encoder.h", "ENCODER_GET_CAPABILITIES", 0x6501}, + {"linux/video_encoder.h", "ENCODER_SET_NORM", 0x6502}, + {"linux/video_encoder.h", "ENCODER_SET_INPUT", 0x6503}, + {"linux/video_encoder.h", "ENCODER_SET_OUTPUT", 0x6504}, + {"linux/video_encoder.h", "ENCODER_ENABLE_OUTPUT", 0x6505}, + {"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x6601}, + {"linux/ext3_fs.h", "EXT3_IOC_GETFLAGS", 0x6601}, + {"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x6602}, + {"linux/ext3_fs.h", "EXT3_IOC_SETFLAGS", 0x6602}, + {"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x6603}, + {"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x6604}, + {"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x6663}, + {"linux/i2o-dev.h", "I2OGETIOPS", 0x6900}, + {"linux/i2o-dev.h", "I2OHRTGET", 0x6901}, + {"linux/i2o-dev.h", "I2OLCTGET", 0x6902}, + {"linux/i2o-dev.h", "I2OPARMSET", 0x6903}, + {"linux/i2o-dev.h", "I2OPARMGET", 0x6904}, + {"linux/i2o-dev.h", "I2OSWDL", 0x6905}, + {"linux/i2o-dev.h", "I2OSWUL", 0x6906}, + {"linux/i2o-dev.h", "I2OSWDEL", 0x6907}, + {"linux/i2o-dev.h", "I2OVALIDATE", 0x6908}, + {"linux/i2o-dev.h", "I2OHTML", 0x6909}, + {"linux/i2o-dev.h", "I2OEVTREG", 0x690a}, + {"linux/i2o-dev.h", "I2OEVTGET", 0x690b}, + {"linux/i8k.h", "I8K_BIOS_VERSION", 0x6980}, + {"linux/i8k.h", "I8K_MACHINE_ID", 0x6981}, + {"linux/i8k.h", "I8K_POWER_STATUS", 0x6982}, + {"linux/i8k.h", "I8K_FN_STATUS", 0x6983}, + {"linux/i8k.h", "I8K_GET_TEMP", 0x6984}, + {"linux/i8k.h", "I8K_GET_SPEED", 0x6985}, + {"linux/i8k.h", "I8K_GET_FAN", 0x6986}, + {"linux/i8k.h", "I8K_SET_FAN", 0x6987}, + {"linux/joystick.h", "JSIOCGVERSION", 0x6a01}, + {"linux/joystick.h", "JSIOCGAXES", 0x6a11}, + {"linux/joystick.h", "JSIOCGBUTTONS", 0x6a12}, + {"linux/joystick.h", "JSIOCSCORR", 0x6a21}, + {"linux/joystick.h", "JSIOCGCORR", 0x6a22}, + {"linux/joystick.h", "JSIOCSAXMAP", 0x6a31}, + {"linux/joystick.h", "JSIOCGAXMAP", 0x6a32}, + {"linux/joystick.h", "JSIOCSBTNMAP", 0x6a33}, + {"linux/joystick.h", "JSIOCGBTNMAP", 0x6a34}, + {"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x6c40}, + {"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x6c41}, + {"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42}, + {"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43}, + {"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00}, + {"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00}, + {"linux/mtio.h", "MTIOCTOP", 0x6d01}, + {"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0x6d01}, + {"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01}, + {"linux/mtio.h", "MTIOCGET", 0x6d02}, + {"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0x6d02}, + {"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02}, + {"linux/mtio.h", "MTIOCPOS", 0x6d03}, + {"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03}, + {"linux/mtio.h", "MTIOCGETCONFIG", 0x6d04}, + {"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04}, + {"linux/mtio.h", "MTIOCSETCONFIG", 0x6d05}, + {"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05}, + {"linux/mtio.h", "MTIOCRDFTSEG", 0x6d06}, + {"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06}, + {"linux/mtio.h", "MTIOCWRFTSEG", 0x6d07}, + {"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07}, + {"linux/mtio.h", "MTIOCVOLINFO", 0x6d08}, + {"linux/synclink.h", "MGSL_IOCWAITEVENT", 0x6d08}, + {"linux/mtio.h", "MTIOCGETSIZE", 0x6d09}, + {"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09}, + {"linux/mtio.h", "MTIOCFTFORMAT", 0x6d0a}, + {"linux/mtio.h", "MTIOCFTCMD", 0x6d0b}, + {"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f}, + {"linux/zftape.h", "MTIOC_ZFTAPE_GETBLKSZ", 0x6d68}, + {"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x6e01}, + {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x6e02}, + {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x6e02}, + {"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03}, + {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0x6e04}, + {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0x6e04}, + {"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x6e05}, + {"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x6e06}, + {"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x6e06}, + {"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x6e07}, + {"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x6e08}, + {"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x6e08}, + {"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0x6e09}, + {"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x6e09}, + {"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0x6e0a}, + {"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x6e0a}, + {"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0x6e0b}, + {"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x6e0b}, + {"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x6e0c}, + {"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x6e0c}, + {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x6ef8}, + {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x6ef8}, + {"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x6ef9}, + {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x6efa}, + {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0x6efa}, + {"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x6efb}, + {"linux/rtc.h", "RTC_AIE_ON", 0x7001}, + {"linux/rtc.h", "RTC_AIE_OFF", 0x7002}, + {"linux/intermezzo_fs.h", "PRESTO_GETMOUNT", 0x7003}, + {"linux/rtc.h", "RTC_UIE_ON", 0x7003}, + {"linux/intermezzo_fs.h", "PRESTO_SETPID", 0x7004}, + {"linux/rtc.h", "RTC_UIE_OFF", 0x7004}, + {"linux/rtc.h", "RTC_PIE_ON", 0x7005}, + {"linux/intermezzo_fs.h", "PRESTO_CLOSE_JOURNALF", 0x7006}, + {"linux/rtc.h", "RTC_PIE_OFF", 0x7006}, + {"linux/intermezzo_fs.h", "PRESTO_SET_FSETROOT", 0x7007}, + {"linux/rtc.h", "RTC_ALM_SET", 0x7007}, + {"linux/intermezzo_fs.h", "PRESTO_CLEAR_FSETROOT", 0x7008}, + {"linux/rtc.h", "RTC_ALM_READ", 0x7008}, + {"linux/intermezzo_fs.h", "PRESTO_SETOPT", 0x7009}, + {"linux/rtc.h", "RTC_RD_TIME", 0x7009}, + {"linux/intermezzo_fs.h", "PRESTO_GETOPT", 0x700a}, + {"linux/rtc.h", "RTC_SET_TIME", 0x700a}, + {"linux/intermezzo_fs.h", "PRESTO_GET_KMLSIZE", 0x700b}, + {"linux/rtc.h", "RTC_IRQP_READ", 0x700b}, + {"linux/intermezzo_fs.h", "PRESTO_GET_RECNO", 0x700c}, + {"linux/rtc.h", "RTC_IRQP_SET", 0x700c}, + {"linux/rtc.h", "RTC_EPOCH_READ", 0x700d}, + {"linux/rtc.h", "RTC_EPOCH_SET", 0x700e}, + {"linux/rtc.h", "RTC_WIE_ON", 0x700f}, + {"linux/rtc.h", "RTC_WKALM_SET", 0x700f}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_SETATTR", 0x7010}, + {"linux/rtc.h", "RTC_WIE_OFF", 0x7010}, + {"linux/rtc.h", "RTC_WKALM_RD", 0x7010}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_CREATE", 0x7011}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_LINK", 0x7012}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_UNLINK", 0x7013}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_SYMLINK", 0x7014}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_MKDIR", 0x7015}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_RMDIR", 0x7016}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_MKNOD", 0x7017}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_RENAME", 0x7018}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_CLOSE", 0x701a}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_IOPEN", 0x701b}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_SETEXTATTR", 0x701c}, + {"linux/intermezzo_fs.h", "PRESTO_VFS_DELEXTATTR", 0x701d}, + {"linux/intermezzo_fs.h", "PRESTO_MARK", 0x7020}, + {"linux/intermezzo_fs.h", "PRESTO_RELEASE_PERMIT", 0x7021}, + {"linux/intermezzo_fs.h", "PRESTO_CLEAR_ALL_FSETROOTS", 0x7022}, + {"linux/intermezzo_fs.h", "PRESTO_BACKFETCH_LML", 0x7023}, + {"linux/intermezzo_fs.h", "PRESTO_REINT", 0x7024}, + {"linux/intermezzo_fs.h", "PRESTO_CANCEL_LML", 0x7025}, + {"linux/intermezzo_fs.h", "PRESTO_RESET_FSET", 0x7026}, + {"linux/intermezzo_fs.h", "PRESTO_COMPLETE_CLOSES", 0x7027}, + {"linux/intermezzo_fs.h", "PRESTO_REINT_BEGIN", 0x7030}, + {"linux/intermezzo_fs.h", "PRESTO_DO_REINT", 0x7031}, + {"linux/intermezzo_fs.h", "PRESTO_REINT_END", 0x7032}, + {"linux/nvram.h", "NVRAM_INIT", 0x7040}, + {"linux/nvram.h", "NVRAM_SETCKS", 0x7041}, + {"linux/ppdev.h", "PPSETMODE", 0x7080}, + {"linux/ppdev.h", "PPRSTATUS", 0x7081}, + {"linux/ppdev.h", "PPRCONTROL", 0x7083}, + {"linux/ppdev.h", "PPWCONTROL", 0x7084}, + {"linux/ppdev.h", "PPRDATA", 0x7085}, + {"linux/ppdev.h", "PPWDATA", 0x7086}, + {"linux/ppdev.h", "PPCLAIM", 0x708b}, + {"linux/ppdev.h", "PPRELEASE", 0x708c}, + {"linux/ppdev.h", "PPYIELD", 0x708d}, + {"linux/ppdev.h", "PPFCONTROL", 0x708e}, + {"linux/ppdev.h", "PPEXCL", 0x708f}, + {"linux/ppdev.h", "PPDATADIR", 0x7090}, + {"linux/ppdev.h", "PPNEGOT", 0x7091}, + {"linux/ppdev.h", "PPWCTLONIRQ", 0x7092}, + {"linux/ppdev.h", "PPCLRIRQ", 0x7093}, + {"linux/ppdev.h", "PPSETPHASE", 0x7094}, + {"linux/ppdev.h", "PPGETTIME", 0x7095}, + {"linux/ppdev.h", "PPSETTIME", 0x7096}, + {"linux/ppdev.h", "PPGETMODES", 0x7097}, + {"linux/ppdev.h", "PPGETMODE", 0x7098}, + {"linux/ppdev.h", "PPGETPHASE", 0x7099}, + {"linux/ppdev.h", "PPGETFLAGS", 0x709a}, + {"linux/ppdev.h", "PPSETFLAGS", 0x709b}, + {"linux/serio.h", "SPIOCSTYPE", 0x7101}, + {"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180}, + {"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x7181}, + {"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x7182}, + {"linux/telephony.h", "PHONE_RING", 0x7183}, + {"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184}, + {"linux/telephony.h", "PHONE_MAXRINGS", 0x7185}, + {"linux/telephony.h", "PHONE_RING_CADENCE", 0x7186}, + {"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187}, + {"linux/telephony.h", "PHONE_RING_START", 0x7187}, + {"linux/telephony.h", "PHONE_RING_STOP", 0x7188}, + {"linux/telephony.h", "PHONE_REC_CODEC", 0x7189}, + {"linux/telephony.h", "PHONE_REC_START", 0x718a}, + {"linux/telephony.h", "PHONE_REC_STOP", 0x718b}, + {"linux/telephony.h", "PHONE_REC_DEPTH", 0x718c}, + {"linux/telephony.h", "PHONE_FRAME", 0x718d}, + {"linux/telephony.h", "PHONE_REC_VOLUME", 0x718e}, + {"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f}, + {"linux/telephony.h", "PHONE_PLAY_CODEC", 0x7190}, + {"linux/telephony.h", "PHONE_PLAY_START", 0x7191}, + {"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192}, + {"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x7193}, + {"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x7194}, + {"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195}, + {"linux/telephony.h", "PHONE_DTMF_READY", 0x7196}, + {"linux/telephony.h", "PHONE_GET_DTMF", 0x7197}, + {"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x7198}, + {"linux/telephony.h", "PHONE_DTMF_OOB", 0x7199}, + {"linux/telephony.h", "PHONE_EXCEPTION", 0x719a}, + {"linux/telephony.h", "PHONE_PLAY_TONE", 0x719b}, + {"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x719c}, + {"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x719d}, + {"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e}, + {"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f}, + {"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0}, + {"linux/telephony.h", "PHONE_BUSY", 0x71a1}, + {"linux/telephony.h", "PHONE_RINGBACK", 0x71a2}, + {"linux/telephony.h", "PHONE_DIALTONE", 0x71a3}, + {"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4}, + {"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x71a4}, + {"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5}, + {"linux/telephony.h", "PHONE_WINK_DURATION", 0x71a6}, + {"linux/telephony.h", "PHONE_QUERY_CODEC", 0x71a7}, + {"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8}, + {"linux/telephony.h", "PHONE_VAD", 0x71a9}, + {"linux/telephony.h", "PHONE_WINK", 0x71aa}, + {"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0}, + {"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x71c1}, + {"linux/ixjuser.h", "IXJCTL_SERIAL", 0x71c2}, + {"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x71c3}, + {"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x71c4}, + {"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5}, + {"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6}, + {"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x71c7}, + {"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x71c8}, + {"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x71c9}, + {"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x71ca}, + {"linux/ixjuser.h", "IXJCTL_AEC_START", 0x71cb}, + {"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc}, + {"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd}, + {"linux/ixjuser.h", "IXJCTL_SET_LED", 0x71ce}, + {"linux/ixjuser.h", "IXJCTL_MIXER", 0x71cf}, + {"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x71d0}, + {"linux/ixjuser.h", "IXJCTL_PORT", 0x71d1}, + {"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x71d2}, + {"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3}, + {"linux/ixjuser.h", "IXJCTL_CID", 0x71d4}, + {"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x71d5}, + {"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x71d6}, + {"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7}, + {"linux/ixjuser.h", "IXJCTL_VMWI", 0x71d8}, + {"linux/ixjuser.h", "IXJCTL_CIDCW", 0x71d9}, + {"linux/ixjuser.h", "IXJCTL_VERSION", 0x71da}, + {"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x71db}, + {"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x71dc}, + {"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x71dd}, + {"linux/ixjuser.h", "IXJCTL_HZ", 0x71e0}, + {"linux/ixjuser.h", "IXJCTL_RATE", 0x71e1}, + {"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x71e2}, + {"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x71e3}, + {"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x71e4}, + {"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x71e5}, + {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x71e6}, + {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7}, + {"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x71e8}, + {"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x71e9}, + {"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x71ea}, + {"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x71eb}, + {"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x71fd}, + {"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x71fe}, + {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x7201}, + {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x7202}, + {"linux/cdk.h", "STL_BINTR", 0x7314}, + {"linux/cdk.h", "STL_BSTART", 0x7315}, + {"linux/cdk.h", "STL_BSTOP", 0x7316}, + {"linux/cdk.h", "STL_BRESET", 0x7317}, + {"linux/cdk.h", "STL_GETPFLAG", 0x7350}, + {"linux/cdk.h", "STL_SETPFLAG", 0x7351}, + {"linux/if_ppp.h", "PPPIOCGCHAN", 0x7437}, + {"linux/if_ppp.h", "PPPIOCATTCHAN", 0x7438}, + {"linux/if_ppp.h", "PPPIOCDISCONN", 0x7439}, + {"linux/if_ppp.h", "PPPIOCCONNECT", 0x743a}, + {"linux/if_ppp.h", "PPPIOCSMRRU", 0x743b}, + {"linux/if_ppp.h", "PPPIOCDETACH", 0x743c}, + {"linux/if_ppp.h", "PPPIOCATTACH", 0x743d}, + {"linux/if_ppp.h", "PPPIOCNEWUNIT", 0x743e}, + {"linux/if_ppp.h", "PPPIOCGIDLE", 0x743f}, + {"linux/if_ppp.h", "PPPIOCSDEBUG", 0x7440}, + {"linux/if_ppp.h", "PPPIOCGDEBUG", 0x7441}, + {"linux/if_ppp.h", "PPPIOCSACTIVE", 0x7446}, + {"linux/if_ppp.h", "PPPIOCSPASS", 0x7447}, + {"linux/if_ppp.h", "PPPIOCSNPMODE", 0x744b}, + {"linux/if_ppp.h", "PPPIOCGNPMODE", 0x744c}, + {"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x744d}, + {"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e}, + {"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x744f}, + {"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x7450}, + {"linux/if_ppp.h", "PPPIOCSMAXCID", 0x7451}, + {"linux/if_ppp.h", "PPPIOCSMRU", 0x7452}, + {"linux/if_ppp.h", "PPPIOCGMRU", 0x7453}, + {"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x7454}, + {"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x7455}, + {"linux/if_ppp.h", "PPPIOCGUNIT", 0x7456}, + {"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x7457}, + {"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x7458}, + {"linux/if_ppp.h", "PPPIOCSFLAGS", 0x7459}, + {"linux/if_ppp.h", "PPPIOCGFLAGS", 0x745a}, + {"linux/jffs.h", "JFFS_PRINT_HASH", 0x745a}, + {"linux/jffs.h", "JFFS_PRINT_TREE", 0x745b}, + {"linux/jffs.h", "JFFS_GET_STATUS", 0x745c}, + {"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0x7480}, + {"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x7481}, + {"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x7482}, + {"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x7483}, + {"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x7484}, + {"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x7485}, + {"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x7486}, + {"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x7487}, + {"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x7488}, + {"linux/toshiba.h", "TOSH_SMM", 0x7490}, + {"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x7501}, + {"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x7502}, + {"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID32", 0x7503}, + {"linux/sonypi.h", "SONYPI_IOCGBRT", 0x7600}, + {"linux/sonypi.h", "SONYPI_IOCSBRT", 0x7600}, + {"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x7601}, + {"linux/ext3_fs.h", "EXT3_IOC_GETVERSION_OLD", 0x7601}, + {"linux/videodev.h", "VIDIOCGCAP", 0x7601}, + {"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x7602}, + {"linux/ext3_fs.h", "EXT3_IOC_SETVERSION_OLD", 0x7602}, + {"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x7602}, + {"linux/videodev.h", "VIDIOCGCHAN", 0x7602}, + {"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x7603}, + {"linux/videodev.h", "VIDIOCSCHAN", 0x7603}, + {"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x7604}, + {"linux/videodev.h", "VIDIOCGTUNER", 0x7604}, + {"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x7605}, + {"linux/videodev.h", "VIDIOCSTUNER", 0x7605}, + {"linux/videodev.h", "VIDIOCGPICT", 0x7606}, + {"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x7607}, + {"linux/videodev.h", "VIDIOCSPICT", 0x7607}, + {"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x7608}, + {"linux/videodev.h", "VIDIOCCAPTURE", 0x7608}, + {"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x7609}, + {"linux/videodev.h", "VIDIOCGWIN", 0x7609}, + {"linux/videodev.h", "VIDIOCSWIN", 0x760a}, + {"linux/videodev.h", "VIDIOCGFBUF", 0x760b}, + {"linux/videodev.h", "VIDIOCSFBUF", 0x760c}, + {"linux/videodev.h", "VIDIOCKEY", 0x760d}, + {"linux/videodev.h", "VIDIOCGFREQ", 0x760e}, + {"linux/videodev.h", "VIDIOCSFREQ", 0x760f}, + {"linux/videodev.h", "VIDIOCGAUDIO", 0x7610}, + {"linux/videodev.h", "VIDIOCSAUDIO", 0x7611}, + {"linux/videodev.h", "VIDIOCSYNC", 0x7612}, + {"linux/videodev.h", "VIDIOCMCAPTURE", 0x7613}, + {"linux/videodev.h", "VIDIOCGMBUF", 0x7614}, + {"linux/videodev.h", "VIDIOCGUNIT", 0x7615}, + {"linux/videodev.h", "VIDIOCGCAPTURE", 0x7616}, + {"linux/videodev.h", "VIDIOCSCAPTURE", 0x7617}, + {"linux/videodev.h", "VIDIOCSPLAYMODE", 0x7618}, + {"linux/videodev.h", "VIDIOCSWRITEMODE", 0x7619}, + {"linux/videodev.h", "VIDIOCGPLAYINFO", 0x761a}, + {"linux/videodev.h", "VIDIOCSMICROCODE", 0x761b}, + {"linux/videodev.h", "VIDIOCGVBIFMT", 0x761c}, + {"linux/videodev.h", "VIDIOCSVBIFMT", 0x761d}, + {"linux/meye.h", "MEYEIOC_G_PARAMS", 0x76c0}, + {"linux/meye.h", "MEYEIOC_S_PARAMS", 0x76c1}, + {"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x76c2}, + {"linux/meye.h", "MEYEIOC_SYNC", 0x76c3}, + {"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4}, + {"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x76c5}, + {"linux/dn.h", "SIOCSNETADDR", 0x89e0}, + {"linux/dn.h", "OSIOCSNETADDR", 0x89e0}, + {"linux/dn.h", "SIOCGNETADDR", 0x89e1}, + {"linux/dn.h", "OSIOCGNETADDR", 0x89e1}, + {"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360}, + {"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361}, + {"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362}, + {"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x9363}, + {"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0x9364}, + {"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x9365}, + {"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x9366}, + {"linux/nbd.h", "NBD_SET_SOCK", 0xab00}, + {"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01}, + {"linux/nbd.h", "NBD_SET_SIZE", 0xab02}, + {"linux/nbd.h", "NBD_DO_IT", 0xab03}, + {"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04}, + {"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05}, + {"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06}, + {"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07}, + {"linux/nbd.h", "NBD_DISCONNECT", 0xab08}, + {"linux/raw.h", "RAW_SETBIND", 0xac00}, + {"linux/raw.h", "RAW_GETBIND", 0xac01}, + {"linux/if_pppox.h", "PPPOEIOCSFWD", 0xb100}, + {"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101}, + {"linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", 0xcd01}, + {"linux/lvm.h", "VG_CREATE_OLD", 0xfe00}, + {"linux/lvm.h", "VG_REMOVE", 0xfe01}, + {"linux/lvm.h", "VG_EXTEND", 0xfe03}, + {"linux/lvm.h", "VG_REDUCE", 0xfe04}, + {"linux/lvm.h", "VG_STATUS", 0xfe05}, + {"linux/lvm.h", "VG_STATUS_GET_COUNT", 0xfe06}, + {"linux/lvm.h", "VG_STATUS_GET_NAMELIST", 0xfe07}, + {"linux/lvm.h", "VG_SET_EXTENDABLE", 0xfe08}, + {"linux/lvm.h", "VG_RENAME", 0xfe09}, + {"linux/lvm.h", "VG_CREATE", 0xfe0a}, + {"linux/lvm.h", "LV_CREATE", 0xfe20}, + {"linux/lvm.h", "LV_REMOVE", 0xfe21}, + {"linux/lvm.h", "LV_ACTIVATE", 0xfe22}, + {"linux/lvm.h", "LV_DEACTIVATE", 0xfe23}, + {"linux/lvm.h", "LV_EXTEND", 0xfe24}, + {"linux/lvm.h", "LV_REDUCE", 0xfe25}, + {"linux/lvm.h", "LV_STATUS_BYNAME", 0xfe26}, + {"linux/lvm.h", "LV_STATUS_BYINDEX", 0xfe27}, + {"linux/lvm.h", "LV_SET_ACCESS", 0xfe28}, + {"linux/lvm.h", "LV_SET_ALLOCATION", 0xfe29}, + {"linux/lvm.h", "LV_SET_STATUS", 0xfe2a}, + {"linux/lvm.h", "LE_REMAP", 0xfe2b}, + {"linux/lvm.h", "LV_SNAPSHOT_USE_RATE", 0xfe2c}, + {"linux/lvm.h", "LV_STATUS_BYDEV", 0xfe2e}, + {"linux/lvm.h", "LV_RENAME", 0xfe2f}, + {"linux/lvm.h", "LV_BMAP", 0xfe30}, + {"linux/lvm.h", "PV_STATUS", 0xfe40}, + {"linux/lvm.h", "PV_CHANGE", 0xfe41}, + {"linux/lvm.h", "PV_FLUSH", 0xfe42}, + {"linux/lvm.h", "PE_LOCK_UNLOCK", 0xfe50}, + {"linux/lvm.h", "LVM_GET_IOP_VERSION", 0xfe98}, + {"linux/lvm.h", "LVM_RESET", 0xfe99}, + {"linux/lvm.h", "LVM_LOCK_LVM", 0xff00}, diff --git a/alice-strace/linux/sparc64/signalent.h b/alice-strace/linux/sparc64/signalent.h new file mode 100644 index 0000000..e059b5d --- /dev/null +++ b/alice-strace/linux/sparc64/signalent.h @@ -0,0 +1,32 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGURG", /* 16 */ + "SIGSTOP", /* 17 */ + "SIGTSTP", /* 18 */ + "SIGCONT", /* 19 */ + "SIGCHLD", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGIO", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGLOST", /* 29 */ + "SIGUSR1", /* 30 */ + "SIGUSR2", /* 31 */ diff --git a/alice-strace/linux/sparc64/signalent1.h b/alice-strace/linux/sparc64/signalent1.h new file mode 100644 index 0000000..0f6314f --- /dev/null +++ b/alice-strace/linux/sparc64/signalent1.h @@ -0,0 +1 @@ +#include "../sparc/signalent1.h" diff --git a/alice-strace/linux/sparc64/signalent2.h b/alice-strace/linux/sparc64/signalent2.h new file mode 100644 index 0000000..e059b5d --- /dev/null +++ b/alice-strace/linux/sparc64/signalent2.h @@ -0,0 +1,32 @@ + "SIG_0", /* 0 */ + "SIGHUP", /* 1 */ + "SIGINT", /* 2 */ + "SIGQUIT", /* 3 */ + "SIGILL", /* 4 */ + "SIGTRAP", /* 5 */ + "SIGABRT", /* 6 */ + "SIGEMT", /* 7 */ + "SIGFPE", /* 8 */ + "SIGKILL", /* 9 */ + "SIGBUS", /* 10 */ + "SIGSEGV", /* 11 */ + "SIGSYS", /* 12 */ + "SIGPIPE", /* 13 */ + "SIGALRM", /* 14 */ + "SIGTERM", /* 15 */ + "SIGURG", /* 16 */ + "SIGSTOP", /* 17 */ + "SIGTSTP", /* 18 */ + "SIGCONT", /* 19 */ + "SIGCHLD", /* 20 */ + "SIGTTIN", /* 21 */ + "SIGTTOU", /* 22 */ + "SIGIO", /* 23 */ + "SIGXCPU", /* 24 */ + "SIGXFSZ", /* 25 */ + "SIGVTALRM", /* 26 */ + "SIGPROF", /* 27 */ + "SIGWINCH", /* 28 */ + "SIGLOST", /* 29 */ + "SIGUSR1", /* 30 */ + "SIGUSR2", /* 31 */ diff --git a/alice-strace/linux/sparc64/syscall1.h b/alice-strace/linux/sparc64/syscall1.h new file mode 100644 index 0000000..6f30b74 --- /dev/null +++ b/alice-strace/linux/sparc64/syscall1.h @@ -0,0 +1,498 @@ +/* + * Copyright (c) 1993, 1994, 1995 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. + */ + +#define SOLARIS_syscall 0 +#define SOLARIS_exit 1 +#define SOLARIS_fork 2 +#define SOLARIS_read 3 +#define SOLARIS_write 4 +#define SOLARIS_open 5 +#define SOLARIS_close 6 +#define SOLARIS_wait 7 +#define SOLARIS_creat 8 +#define SOLARIS_link 9 +#define SOLARIS_unlink 10 +#define SOLARIS_exec 11 +#define SOLARIS_chdir 12 +#define SOLARIS_time 13 +#define SOLARIS_mknod 14 +#define SOLARIS_chmod 15 +#define SOLARIS_chown 16 +#define SOLARIS_brk 17 +#define SOLARIS_stat 18 +#define SOLARIS_lseek 19 +#define SOLARIS_getpid 20 +#define SOLARIS_mount 21 +#define SOLARIS_umount 22 +#define SOLARIS_setuid 23 +#define SOLARIS_getuid 24 +#define SOLARIS_stime 25 +#define SOLARIS_ptrace 26 +#define SOLARIS_alarm 27 +#define SOLARIS_fstat 28 +#define SOLARIS_pause 29 +#define SOLARIS_utime 30 +#define SOLARIS_stty 31 +#define SOLARIS_gtty 32 +#define SOLARIS_access 33 +#define SOLARIS_nice 34 +#define SOLARIS_statfs 35 +#define SOLARIS_sync 36 +#define SOLARIS_kill 37 +#define SOLARIS_fstatfs 38 +#define SOLARIS_pgrpsys 39 +#define SOLARIS_xenix 40 +#define SOLARIS_dup 41 +#define SOLARIS_pipe 42 +#define SOLARIS_times 43 +#define SOLARIS_profil 44 +#define SOLARIS_plock 45 +#define SOLARIS_setgid 46 +#define SOLARIS_getgid 47 +#define SOLARIS_signal 48 +#define SOLARIS_msgsys 49 +#define SOLARIS_syssun 50 +#define SOLARIS_acct 51 +#define SOLARIS_shmsys 52 +#define SOLARIS_semsys 53 +#define SOLARIS_ioctl 54 +#define SOLARIS_uadmin 55 +#define SOLARIS_utssys 57 +#define SOLARIS_fdsync 58 +#define SOLARIS_execve 59 +#define SOLARIS_umask 60 +#define SOLARIS_chroot 61 +#define SOLARIS_fcntl 62 +#define SOLARIS_ulimit 63 +#define SOLARIS_rmdir 79 +#define SOLARIS_mkdir 80 +#define SOLARIS_getdents 81 +#define SOLARIS_sysfs 84 +#define SOLARIS_getmsg 85 +#define SOLARIS_putmsg 86 +#define SOLARIS_poll 87 +#define SOLARIS_lstat 88 +#define SOLARIS_symlink 89 +#define SOLARIS_readlink 90 +#define SOLARIS_setgroups 91 +#define SOLARIS_getgroups 92 +#define SOLARIS_fchmod 93 +#define SOLARIS_fchown 94 +#define SOLARIS_sigprocmask 95 +#define SOLARIS_sigsuspend 96 +#define SOLARIS_sigaltstack 97 +#define SOLARIS_sigaction 98 +#define SOLARIS_sigpending 99 +#define SOLARIS_context 100 +#define SOLARIS_evsys 101 +#define SOLARIS_evtrapret 102 +#define SOLARIS_statvfs 103 +#define SOLARIS_fstatvfs 104 +#define SOLARIS_nfssys 106 +#define SOLARIS_waitsys 107 +#define SOLARIS_sigsendsys 108 +#define SOLARIS_hrtsys 109 +#define SOLARIS_acancel 110 +#define SOLARIS_async 111 +#define SOLARIS_priocntlsys 112 +#define SOLARIS_pathconf 113 +#define SOLARIS_mincore 114 +#define SOLARIS_mmap 115 +#define SOLARIS_mprotect 116 +#define SOLARIS_munmap 117 +#define SOLARIS_fpathconf 118 +#define SOLARIS_vfork 119 +#define SOLARIS_fchdir 120 +#define SOLARIS_readv 121 +#define SOLARIS_writev 122 +#define SOLARIS_xstat 123 +#define SOLARIS_lxstat 124 +#define SOLARIS_fxstat 125 +#define SOLARIS_xmknod 126 +#define SOLARIS_clocal 127 +#define SOLARIS_setrlimit 128 +#define SOLARIS_getrlimit 129 +#define SOLARIS_lchown 130 +#define SOLARIS_memcntl 131 +#define SOLARIS_getpmsg 132 +#define SOLARIS_putpmsg 133 +#define SOLARIS_rename 134 +#define SOLARIS_uname 135 +#define SOLARIS_setegid 136 +#define SOLARIS_sysconfig 137 +#define SOLARIS_adjtime 138 +#define SOLARIS_systeminfo 139 +#define SOLARIS_seteuid 141 +#define SOLARIS_vtrace 142 +#define SOLARIS_fork1 143 +#define SOLARIS_sigtimedwait 144 +#define SOLARIS_lwp_info 145 +#define SOLARIS_yield 146 +#define SOLARIS_lwp_sema_wait 147 +#define SOLARIS_lwp_sema_post 148 +#define SOLARIS_modctl 152 +#define SOLARIS_fchroot 153 +#define SOLARIS_utimes 154 +#define SOLARIS_vhangup 155 +#define SOLARIS_gettimeofday 156 +#define SOLARIS_getitimer 157 +#define SOLARIS_setitimer 158 +#define SOLARIS_lwp_create 159 +#define SOLARIS_lwp_exit 160 +#define SOLARIS_lwp_suspend 161 +#define SOLARIS_lwp_continue 162 +#define SOLARIS_lwp_kill 163 +#define SOLARIS_lwp_self 164 +#define SOLARIS_lwp_setprivate 165 +#define SOLARIS_lwp_getprivate 166 +#define SOLARIS_lwp_wait 167 +#define SOLARIS_lwp_mutex_unlock 168 +#define SOLARIS_lwp_mutex_lock 169 +#define SOLARIS_lwp_cond_wait 170 +#define SOLARIS_lwp_cond_signal 171 +#define SOLARIS_lwp_cond_broadcast 172 +#define SOLARIS_pread 173 +#define SOLARIS_pwrite 174 +#define SOLARIS_llseek 175 +#define SOLARIS_inst_sync 176 +#define SOLARIS_kaio 178 +#define SOLARIS_tsolsys 184 +#define SOLARIS_acl 185 +#define SOLARIS_auditsys 186 +#define SOLARIS_processor_bind 187 +#define SOLARIS_processor_info 188 +#define SOLARIS_p_online 189 +#define SOLARIS_sigqueue 190 +#define SOLARIS_clock_gettime 191 +#define SOLARIS_clock_settime 192 +#define SOLARIS_clock_getres 193 +#define SOLARIS_timer_create 194 +#define SOLARIS_timer_delete 195 +#define SOLARIS_timer_settime 196 +#define SOLARIS_timer_gettime 197 +#define SOLARIS_timer_getoverrun 198 +#define SOLARIS_nanosleep 199 +#define SOLARIS_facl 200 +#define SOLARIS_door 201 +#define SOLARIS_setreuid 202 +#define SOLARIS_setregid 203 +#define SOLARIS_signotifywait 210 +#define SOLARIS_lwp_sigredirect 211 +#define SOLARIS_lwp_alarm 212 + +#include "dummy2.h" + +extern int solaris_syscall(); +extern int solaris_exit(); +extern int solaris_fork(); +extern int solaris_read(); +extern int solaris_write(); +extern int solaris_open(); +extern int solaris_close(); +extern int solaris_wait(); +extern int solaris_creat(); +extern int solaris_link(); +extern int solaris_unlink(); +extern int solaris_exec(); +extern int solaris_chdir(); +extern int solaris_time(); +extern int solaris_mknod(); +extern int solaris_chmod(); +extern int solaris_chown(); +extern int solaris_brk(); +extern int solaris_stat(); +extern int solaris_lseek(); +extern int solaris_getpid(); +extern int solaris_mount(); +extern int solaris_umount(); +extern int solaris_setuid(); +extern int solaris_getuid(); +extern int solaris_stime(); +extern int solaris_ptrace(); +extern int solaris_alarm(); +extern int solaris_fstat(); +extern int solaris_pause(); +extern int solaris_utime(); +extern int solaris_stty(); +extern int solaris_gtty(); +extern int solaris_access(); +extern int solaris_nice(); +extern int solaris_statfs(); +extern int solaris_sync(); +extern int solaris_kill(); +extern int solaris_fstatfs(); +extern int solaris_pgrpsys(); +extern int solaris_setpgrp(); +extern int solaris_xenix(); +extern int solaris_syssgi(); +extern int solaris_dup(); +extern int solaris_pipe(); +extern int solaris_times(); +extern int solaris_profil(); +extern int solaris_plock(); +extern int solaris_setgid(); +extern int solaris_getgid(); +extern int solaris_sigcall(); +extern int solaris_msgsys(); +extern int solaris_syssun(); +extern int solaris_sysi86(); +extern int solaris_sysmips(); +extern int solaris_sysmachine(); +extern int solaris_acct(); +extern int solaris_shmsys(); +extern int solaris_semsys(); +extern int solaris_ioctl(); +extern int solaris_uadmin(); +extern int solaris_utssys(); +extern int solaris_fdsync(); +extern int solaris_execve(); +extern int solaris_umask(); +extern int solaris_chroot(); +extern int solaris_fcntl(); +extern int solaris_ulimit(); +extern int solaris_rmdir(); +extern int solaris_mkdir(); +extern int solaris_getdents(); +extern int solaris_sysfs(); +extern int solaris_getmsg(); +extern int solaris_putmsg(); +extern int solaris_poll(); +extern int solaris_lstat(); +extern int solaris_symlink(); +extern int solaris_readlink(); +extern int solaris_setgroups(); +extern int solaris_getgroups(); +extern int solaris_fchmod(); +extern int solaris_fchown(); +extern int solaris_sigprocmask(); +extern int solaris_sigsuspend(); +extern int solaris_sigaltstack(); +extern int solaris_sigaction(); +extern int solaris_spcall(); +extern int solaris_context(); +extern int solaris_evsys(); +extern int solaris_evtrapret(); +extern int solaris_statvfs(); +extern int solaris_fstatvfs(); +extern int solaris_nfssys(); +extern int solaris_waitid(); +extern int solaris_sigsendsys(); +extern int solaris_hrtsys(); +extern int solaris_acancel(); +extern int solaris_async(); +extern int solaris_priocntlsys(); +extern int solaris_pathconf(); +extern int solaris_mincore(); +extern int solaris_mmap(); +extern int solaris_mprotect(); +extern int solaris_munmap(); +extern int solaris_fpathconf(); +extern int solaris_vfork(); +extern int solaris_fchdir(); +extern int solaris_readv(); +extern int solaris_writev(); +extern int solaris_xstat(); +extern int solaris_lxstat(); +extern int solaris_fxstat(); +extern int solaris_xmknod(); +extern int solaris_clocal(); +extern int solaris_setrlimit(); +extern int solaris_getrlimit(); +extern int solaris_lchown(); +extern int solaris_memcntl(); +extern int solaris_getpmsg(); +extern int solaris_putpmsg(); +extern int solaris_rename(); +extern int solaris_uname(); +extern int solaris_setegid(); +extern int solaris_sysconfig(); +extern int solaris_adjtime(); +extern int solaris_sysinfo(); +extern int solaris_seteuid(); +extern int solaris_vtrace(); +extern int solaris_fork1(); +extern int solaris_sigtimedwait(); +extern int solaris_lwp_info(); +extern int solaris_yield(); +extern int solaris_lwp_sema_wait(); +extern int solaris_lwp_sema_post(); +extern int solaris_modctl(); +extern int solaris_fchroot(); +extern int solaris_utimes(); +extern int solaris_vhangup(); +extern int solaris_gettimeofday(); +extern int solaris_getitimer(); +extern int solaris_setitimer(); +extern int solaris_lwp_create(); +extern int solaris_lwp_exit(); +extern int solaris_lwp_suspend(); +extern int solaris_lwp_continue(); +extern int solaris_lwp_kill(); +extern int solaris_lwp_self(); +extern int solaris_lwp_setprivate(); +extern int solaris_lwp_getprivate(); +extern int solaris_lwp_wait(); +extern int solaris_lwp_mutex_unlock(); +extern int solaris_lwp_mutex_lock(); +extern int solaris_lwp_cond_wait(); +extern int solaris_lwp_cond_signal(); +extern int solaris_lwp_cond_broadcast(); +extern int solaris_pread(); +extern int solaris_pwrite(); +extern int solaris_llseek(); +extern int solaris_inst_sync(); +extern int solaris_auditsys(); +extern int solaris_processor_bind(); +extern int solaris_processor_info(); +extern int solaris_p_online(); +extern int solaris_sigqueue(); +extern int solaris_clock_gettime(); +extern int solaris_clock_settime(); +extern int solaris_clock_getres(); +extern int solaris_timer_create(); +extern int solaris_timer_delete(); +extern int solaris_timer_settime(); +extern int solaris_timer_gettime(); +extern int solaris_timer_getoverrun(); +extern int solaris_nanosleep(); + +/* solaris_pgrpsys subcalls */ + +extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid(); +extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid(); + +#define SOLARIS_pgrpsys_subcall 300 +#define SOLARIS_getpgrp (SOLARIS_pgrpsys_subcall + 0) +#define SOLARIS_setpgrp (SOLARIS_pgrpsys_subcall + 1) +#define SOLARIS_getsid (SOLARIS_pgrpsys_subcall + 2) +#define SOLARIS_setsid (SOLARIS_pgrpsys_subcall + 3) +#define SOLARIS_getpgid (SOLARIS_pgrpsys_subcall + 4) +#define SOLARIS_setpgid (SOLARIS_pgrpsys_subcall + 5) + +#define SOLARIS_pgrpsys_nsubcalls 6 + +/* solaris_sigcall subcalls */ + +#undef SOLARIS_signal +#define SOLARIS_sigcall 48 + +extern int solaris_signal(), solaris_sigset(), solaris_sighold(); +extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause(); + +#define SOLARIS_sigcall_subcall 310 +#define SOLARIS_signal (SOLARIS_sigcall_subcall + 0) +#define SOLARIS_sigset (SOLARIS_sigcall_subcall + 1) +#define SOLARIS_sighold (SOLARIS_sigcall_subcall + 2) +#define SOLARIS_sigrelse (SOLARIS_sigcall_subcall + 3) +#define SOLARIS_sigignore (SOLARIS_sigcall_subcall + 4) +#define SOLARIS_sigpause (SOLARIS_sigcall_subcall + 5) + +#define SOLARIS_sigcall_nsubcalls 6 + +/* msgsys subcalls */ + +extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd(); + +#define SOLARIS_msgsys_subcall 320 +#define SOLARIS_msgget (SOLARIS_msgsys_subcall + 0) +#define SOLARIS_msgctl (SOLARIS_msgsys_subcall + 1) +#define SOLARIS_msgrcv (SOLARIS_msgsys_subcall + 2) +#define SOLARIS_msgsnd (SOLARIS_msgsys_subcall + 3) + +#define SOLARIS_msgsys_nsubcalls 4 + +/* shmsys subcalls */ + +extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget(); + +#define SOLARIS_shmsys_subcall 330 +#define SOLARIS_shmat (SOLARIS_shmsys_subcall + 0) +#define SOLARIS_shmctl (SOLARIS_shmsys_subcall + 1) +#define SOLARIS_shmdt (SOLARIS_shmsys_subcall + 2) +#define SOLARIS_shmget (SOLARIS_shmsys_subcall + 3) + +#define SOLARIS_shmsys_nsubcalls 4 + +/* semsys subcalls */ + +extern int solaris_semctl(), solaris_semget(), solaris_semop(); + +#define SOLARIS_semsys_subcall 340 +#define SOLARIS_semctl (SOLARIS_semsys_subcall + 0) +#define SOLARIS_semget (SOLARIS_semsys_subcall + 1) +#define SOLARIS_semop (SOLARIS_semsys_subcall + 2) + +#define SOLARIS_semsys_nsubcalls 3 + +/* utssys subcalls */ + +extern int solaris_olduname(), solaris_ustat(), solaris_fusers(); + +#define SOLARIS_utssys_subcall 350 + +#define SOLARIS_olduname (SOLARIS_utssys_subcall + 0) + /* 1 is unused */ +#define SOLARIS_ustat (SOLARIS_utssys_subcall + 2) +#define SOLARIS_fusers (SOLARIS_utssys_subcall + 3) + +#define SOLARIS_utssys_nsubcalls 4 + +/* sysfs subcalls */ + +extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3(); + +#define SOLARIS_sysfs_subcall 360 + /* 0 is unused */ +#define SOLARIS_sysfs1 (SOLARIS_sysfs_subcall + 1) +#define SOLARIS_sysfs2 (SOLARIS_sysfs_subcall + 2) +#define SOLARIS_sysfs3 (SOLARIS_sysfs_subcall + 3) + +#define SOLARIS_sysfs_nsubcalls 4 + +/* solaris_spcall subcalls */ + +#undef SOLARIS_sigpending +#define SOLARIS_spcall 99 + +extern int solaris_sigpending(), solaris_sigfillset(); + +#define SOLARIS_spcall_subcall 370 + /* 0 is unused */ +#define SOLARIS_sigpending (SOLARIS_spcall_subcall + 1) +#define SOLARIS_sigfillset (SOLARIS_spcall_subcall + 2) + +#define SOLARIS_spcall_nsubcalls 3 + +/* solaris_context subcalls */ + +extern int solaris_getcontext(), solaris_setcontext(); + +#define SOLARIS_context_subcall 380 +#define SOLARIS_getcontext (SOLARIS_context_subcall + 0) +#define SOLARIS_setcontext (SOLARIS_context_subcall + 1) + +#define SOLARIS_context_nsubcalls 2 diff --git a/alice-strace/linux/sparc64/syscallent.h b/alice-strace/linux/sparc64/syscallent.h new file mode 100644 index 0000000..776b5f1 --- /dev/null +++ b/alice-strace/linux/sparc64/syscallent.h @@ -0,0 +1 @@ +#include "../sparc/syscallent.h" diff --git a/alice-strace/linux/sparc64/syscallent1.h b/alice-strace/linux/sparc64/syscallent1.h new file mode 100644 index 0000000..821d77c --- /dev/null +++ b/alice-strace/linux/sparc64/syscallent1.h @@ -0,0 +1 @@ +#include "../sparc/syscallent1.h" diff --git a/alice-strace/linux/sparc64/syscallent2.h b/alice-strace/linux/sparc64/syscallent2.h new file mode 100644 index 0000000..776b5f1 --- /dev/null +++ b/alice-strace/linux/sparc64/syscallent2.h @@ -0,0 +1 @@ +#include "../sparc/syscallent.h" diff --git a/alice-strace/linux/subcall.h b/alice-strace/linux/subcall.h new file mode 100644 index 0000000..54f7fca --- /dev/null +++ b/alice-strace/linux/subcall.h @@ -0,0 +1,6 @@ +#ifndef SYS_socket_subcall +# error SYS_socket_subcall is not defined +#endif +#define SYS_socket_nsubcalls 20 +#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls)) +#define SYS_ipc_nsubcalls 25 diff --git a/alice-strace/linux/syscall.h b/alice-strace/linux/syscall.h new file mode 100644 index 0000000..f6afcac --- /dev/null +++ b/alice-strace/linux/syscall.h @@ -0,0 +1,346 @@ +/* + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995 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 "dummy.h" + +/* common syscalls */ + +int sys_accept(); +int sys_accept4(); +int sys_access(); +int sys_adjtimex(); +int sys_arch_prctl(); +int sys_bind(); +int sys_brk(); +int sys_capget(); +int sys_capset(); +int sys_chdir(); +int sys_chmod(); +int sys_chown(); +int sys_clock_adjtime(); +int sys_clock_gettime(); +int sys_clock_nanosleep(); +int sys_clock_settime(); +int sys_clone(); +int sys_close(); +int sys_connect(); +int sys_creat(); +int sys_create_module(); +int sys_dup2(); +int sys_dup3(); +int sys_epoll_create(); +int sys_epoll_create1(); +int sys_epoll_ctl(); +int sys_epoll_pwait(); +int sys_epoll_wait(); +int sys_eventfd(); +int sys_eventfd2(); +int sys_execve(); +int sys_exit(); +int sys_faccessat(); +int sys_fadvise64(); +int sys_fadvise64_64(); +int sys_fallocate(); +int sys_fchmod(); +int sys_fchmodat(); +int sys_fchown(); +int sys_fchownat(); +int sys_fcntl(); +int sys_fgetxattr(); +int sys_flistxattr(); +int sys_flock(); +int sys_fork(); +int sys_fremovexattr(); +int sys_fsetxattr(); +int sys_fstat(); +int sys_fstat64(); +int sys_fstatfs(); +int sys_fstatfs64(); +int sys_ftruncate(); +int sys_ftruncate64(); +int sys_futex(); +int sys_futimesat(); +int sys_get_mempolicy(); +int sys_get_robust_list(); +int sys_get_thread_area(); +int sys_getcpu(); +int sys_getcwd(); +int sys_getdents(); +int sys_getdents64(); +int sys_getdtablesize(); +int sys_getgroups(); +int sys_getgroups32(); +int sys_gethostname(); +int sys_getitimer(); +int sys_getpeername(); +int sys_getpmsg(); /* TODO: non-Linux, remove? */ +int sys_getpriority(); +int sys_getresuid(); +int sys_getrlimit(); +int sys_getrusage(); +int sys_getsockname(); +int sys_getsockopt(); +int sys_gettimeofday(); +int sys_getuid(); +int sys_getxattr(); +int sys_init_module(); +int sys_inotify_add_watch(); +int sys_inotify_init1(); +int sys_inotify_rm_watch(); +int sys_io_cancel(); +int sys_io_destroy(); +int sys_io_getevents(); +int sys_io_setup(); +int sys_io_submit(); +int sys_ioctl(); +int sys_ipc(); +int sys_kill(); +int sys_link(); +int sys_linkat(); +int sys_listen(); +int sys_listxattr(); +int sys_llseek(); +int sys_lseek(); +int sys_madvise(); +int sys_mbind(); +int sys_migrate_pages(); +int sys_mincore(); +int sys_mkdir(); +int sys_mkdirat(); +int sys_mknod(); +int sys_mknodat(); +int sys_mlockall(); +int sys_mmap(); +int sys_mmap_pgoff(); +int sys_mmap_4koff(); +int sys_modify_ldt(); +int sys_mount(); +int sys_move_pages(); +int sys_mprotect(); +int sys_mq_getsetattr(); +int sys_mq_notify(); +int sys_mq_open(); +int sys_mq_timedreceive(); +int sys_mq_timedsend(); +int sys_mremap(); +int sys_msgctl(); +int sys_msgget(); +int sys_msgrcv(); +int sys_msgsnd(); +int sys_msync(); +int sys_munmap(); +int sys_nanosleep(); +int sys_newfstatat(); +int sys_old_mmap(); +int sys_old_mmap_pgoff(); +int sys_oldfstat(); +int sys_oldselect(); +int sys_oldstat(); +int sys_open(); +int sys_openat(); +int sys_perf_event_open(); +int sys_personality(); +int sys_pipe(); +int sys_pipe2(); +int sys_poll(); +int sys_poll(); +int sys_ppoll(); +int sys_prctl(); +int sys_pread(); +int sys_preadv(); +int sys_prlimit64(); +int sys_process_vm_readv(); +int sys_process_vm_writev(); +int sys_pselect6(); +int sys_ptrace(); +int sys_putpmsg(); /* TODO: non-Linux, remove? */ +int sys_pwrite(); +int sys_pwritev(); +int sys_query_module(); +int sys_quotactl(); +int sys_read(); +int sys_readahead(); +int sys_readdir(); +int sys_readlink(); +int sys_readlinkat(); +int sys_readv(); +int sys_reboot(); +int sys_recv(); +int sys_recvfrom(); +int sys_recvmmsg(); +int sys_recvmsg(); +int sys_remap_file_pages(); +int sys_removexattr(); +int sys_renameat(); +int sys_restart_syscall(); +int sys_rt_sigaction(); +int sys_rt_sigpending(); +int sys_rt_sigprocmask(); +int sys_rt_sigqueueinfo(); +int sys_rt_sigsuspend(); +int sys_rt_sigtimedwait(); +int sys_rt_tgsigqueueinfo(); +int sys_sched_get_priority_min(); +int sys_sched_getaffinity(); +int sys_sched_getparam(); +int sys_sched_getscheduler(); +int sys_sched_rr_get_interval(); +int sys_sched_setaffinity(); +int sys_sched_setparam(); +int sys_sched_setscheduler(); +int sys_select(); +int sys_semctl(); +int sys_semget(); +int sys_semop(); +int sys_semtimedop(); +int sys_send(); +int sys_sendfile(); +int sys_sendfile64(); +int sys_sendmmsg(); +int sys_sendmsg(); +int sys_sendto(); +int sys_set_mempolicy(); +int sys_set_thread_area(); +int sys_setdomainname(); +int sys_setfsuid(); +int sys_setgroups(); +int sys_setgroups32(); +int sys_sethostname(); +int sys_setitimer(); +int sys_setpriority(); +int sys_setresuid(); +int sys_setreuid(); +int sys_setrlimit(); +int sys_setsockopt(); +int sys_settimeofday(); +int sys_setuid(); +int sys_setxattr(); +int sys_shmat(); +int sys_shmctl(); +int sys_shmdt(); +int sys_shmget(); +int sys_shutdown(); +int sys_sigaction(); +int sys_sigaltstack(); +int sys_siggetmask(); +int sys_signal(); +int sys_signalfd(); +int sys_signalfd4(); +int sys_sigpending(); +int sys_sigprocmask(); +int sys_sigreturn(); +int sys_sigsetmask(); +int sys_sigsuspend(); +int sys_socket(); +int sys_socketcall(); +int sys_socketpair(); +int sys_splice(); +int sys_stat(); +int sys_stat64(); +int sys_statfs(); +int sys_statfs64(); +int sys_stime(); +int sys_swapon(); +int sys_symlinkat(); +int sys_sysctl(); +int sys_sysinfo(); +int sys_syslog(); +int sys_tee(); +int sys_tgkill(); +int sys_time(); +int sys_timer_create(); +int sys_timer_gettime(); +int sys_timer_settime(); +int sys_timerfd(); +int sys_timerfd_create(); +int sys_timerfd_gettime(); +int sys_timerfd_settime(); +int sys_times(); +int sys_truncate(); +int sys_truncate64(); +int sys_umask(); +int sys_umount2(); +int sys_uname(); +int sys_unlinkat(); +int sys_unshare(); +int sys_utime(); +int sys_utimensat(); +int sys_utimes(); +int sys_vfork(); +int sys_vmsplice(); +int sys_wait4(); +int sys_waitid(); +int sys_waitpid(); +int sys_write(); +int sys_writev(); + +/* architecture-specific calls */ +#ifdef ALPHA +int osf_statfs(); +int osf_fstatfs(); +int sys_osf_getitimer(); +int sys_osf_getrusage(); +int sys_osf_gettimeofday(); +int sys_osf_select(); +int sys_osf_setitimer(); +int sys_osf_settimeofday(); +int sys_osf_utimes(); +int sys_osf_wait4(); +#endif + +#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64) +int sys_getpagesize(); +#endif + +#ifdef MIPS +int sys_sysmips(); +#endif + +#if defined M68K || defined SH +int sys_cacheflush(); +#endif + +#if defined OR1K +int sys_or1k_atomic(); +#endif + +#ifdef POWERPC +int sys_subpage_prot(); +#endif + +#ifdef BFIN +int sys_cacheflush(); +int sys_sram_alloc(); +#endif + +#if defined SPARC || defined SPARC64 +#include "sparc/syscall1.h" +int sys_execv(); +int sys_getmsg(); +int sys_putmsg(); +#endif diff --git a/alice-strace/linux/tile/errnoent1.h b/alice-strace/linux/tile/errnoent1.h new file mode 100644 index 0000000..439ec5c --- /dev/null +++ b/alice-strace/linux/tile/errnoent1.h @@ -0,0 +1,2 @@ +/* tilegx32/tilepro */ +#include "../errnoent.h" diff --git a/alice-strace/linux/tile/ioctlent.h.in b/alice-strace/linux/tile/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/tile/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/tile/ioctlent1.h b/alice-strace/linux/tile/ioctlent1.h new file mode 100644 index 0000000..9057b32 --- /dev/null +++ b/alice-strace/linux/tile/ioctlent1.h @@ -0,0 +1,2 @@ +/* tilegx32/tilepro */ +#include "ioctlent.h" diff --git a/alice-strace/linux/tile/signalent1.h b/alice-strace/linux/tile/signalent1.h new file mode 100644 index 0000000..27a3e48 --- /dev/null +++ b/alice-strace/linux/tile/signalent1.h @@ -0,0 +1,2 @@ +/* tilegx32/tilepro */ +#include "../signalent.h" diff --git a/alice-strace/linux/tile/syscallent.h b/alice-strace/linux/tile/syscallent.h new file mode 100644 index 0000000..a069334 --- /dev/null +++ b/alice-strace/linux/tile/syscallent.h @@ -0,0 +1,274 @@ + { 2, 0, sys_io_setup, "io_setup" }, /* 0 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 2 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 8 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 11 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 14 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 17 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */ + { 1, TD, sys_dup, "dup" }, /* 23 */ + { 3, TD, sys_dup3, "dup3" }, /* 24 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 25 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 29 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */ + { 2, TD, sys_flock, "flock" }, /* 32 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */ + { 2, TF, sys_umount2, "umount2" }, /* 39 */ + { 5, TF, sys_mount, "mount" }, /* 40 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */ + { 2, TF, sys_statfs, "statfs" }, /* 43 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 44 */ + { 2, TF, sys_truncate, "truncate" }, /* 45 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 46 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 47 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */ + { 1, TF, sys_chdir, "chdir" }, /* 49 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 50 */ + { 1, TF, sys_chroot, "chroot" }, /* 51 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */ + { 3, TD, sys_fchown, "fchown" }, /* 55 */ + { 4, TD|TF, sys_openat, "openat" }, /* 56 */ + { 1, TD, sys_close, "close" }, /* 57 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 58 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 59 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 60 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 61 */ + { 3, TD, sys_lseek, "lseek" }, /* 62 */ + { 3, TD, sys_read, "read" }, /* 63 */ + { 3, TD, sys_write, "write" }, /* 64 */ + { 3, TD, sys_readv, "readv" }, /* 65 */ + { 3, TD, sys_writev, "writev" }, /* 66 */ + { 4, TD, sys_pread, "pread64" }, /* 67 */ + { 4, TD, sys_pwrite, "pwrite64" }, /* 68 */ + { 4, TD, sys_preadv, "preadv" }, /* 69 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 70 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 72 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 73 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */ + { 6, TD, sys_splice, "splice" }, /* 76 */ + { 4, TD, sys_tee, "tee" }, /* 77 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */ + { 4, TD|TF, sys_newfstatat, "fstatat" }, /* 79 */ + { 2, TD, sys_fstat, "fstat" }, /* 80 */ + { 0, 0, sys_sync, "sync" }, /* 81 */ + { 1, TD, sys_fsync, "fsync" }, /* 82 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */ + { 4, TD, sys_sync_file_range2, "sync_file_range2" }, /* 84 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */ + { 1, TF, sys_acct, "acct" }, /* 89 */ + { 2, 0, sys_capget, "capget" }, /* 90 */ + { 2, 0, sys_capset, "capset" }, /* 91 */ + { 1, 0, sys_personality, "personality" }, /* 92 */ + { 1, TP, sys_exit, "exit" }, /* 93 */ + { 1, TP, sys_exit, "exit_group" }, /* 94 */ + { 5, TP, sys_waitid, "waitid" }, /* 95 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */ + { 1, TP, sys_unshare, "unshare" }, /* 97 */ + { 6, 0, sys_futex, "futex" }, /* 98 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 102 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 103 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */ + { 3, 0, sys_init_module, "init_module" }, /* 105 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 106 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 107 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */ + { 3, 0, sys_syslog, "syslog" }, /* 116 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 117 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */ + { 2, TS, sys_kill, "kill" }, /* 129 */ + { 2, TS, sys_kill, "tkill" }, /* 130 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 131 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 140 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 141 */ + { 4, 0, sys_reboot, "reboot" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 1, 0, sys_setgid, "setgid" }, /* 144 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 145 */ + { 1, 0, sys_setuid, "setuid" }, /* 146 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 147 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 148 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 149 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 150 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */ + { 1, 0, sys_times, "times" }, /* 153 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 154 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 155 */ + { 1, 0, sys_getsid, "getsid" }, /* 156 */ + { 0, 0, sys_setsid, "setsid" }, /* 157 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 158 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 159 */ + { 1, 0, sys_uname, "uname" }, /* 160 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 161 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 165 */ + { 1, 0, sys_umask, "umask" }, /* 166 */ + { 5, 0, sys_prctl, "prctl" }, /* 167 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 168 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */ + { 0, 0, sys_getpid, "getpid" }, /* 172 */ + { 0, 0, sys_getppid, "getppid" }, /* 173 */ + { 0, NF, sys_getuid, "getuid" }, /* 174 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 175 */ + { 0, NF, sys_getgid, "getgid" }, /* 176 */ + { 0, NF, sys_getegid, "getegid" }, /* 177 */ + { 0, 0, sys_gettid, "gettid" }, /* 178 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 180 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */ + { 4, TI, sys_msgget, "msgget" }, /* 186 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 187 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */ + { 4, TI, sys_semget, "semget" }, /* 190 */ + { 4, TI, sys_semctl, "semctl" }, /* 191 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */ + { 4, TI, sys_semop, "semop" }, /* 193 */ + { 4, TI, sys_shmget, "shmget" }, /* 194 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 4, TI, sys_shmat, "shmat" }, /* 196 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 197 */ + { 3, TN, sys_socket, "socket" }, /* 198 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 199 */ + { 3, TN, sys_bind, "bind" }, /* 200 */ + { 2, TN, sys_listen, "listen" }, /* 201 */ + { 3, TN, sys_accept, "accept" }, /* 202 */ + { 3, TN, sys_connect, "connect" }, /* 203 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 204 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 205 */ + { 6, TN, sys_sendto, "sendto" }, /* 206 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 210 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */ + { 3, TD, sys_readahead, "readahead" }, /* 213 */ + { 1, TM, sys_brk, "brk" }, /* 214 */ + { 2, TM, sys_munmap, "munmap" }, /* 215 */ + { 5, TM, sys_mremap, "mremap" }, /* 216 */ + { 5, 0, sys_add_key, "add_key" }, /* 217 */ + { 4, 0, sys_request_key, "request_key" }, /* 218 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 219 */ + { 5, TP, sys_clone, "clone" }, /* 220 */ + { 3, TF|TP, sys_execve, "execve" }, /* 221 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */ + { 1, TF, sys_swapon, "swapon" }, /* 224 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ + { 3, TM, sys_msync, "msync" }, /* 227 */ + { 2, TM, sys_mlock, "mlock" }, /* 228 */ + { 2, TM, sys_munlock, "munlock" }, /* 229 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 230 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 231 */ + { 3, TM, sys_mincore, "mincore" }, /* 232 */ + { 3, TM, sys_madvise, "madvise" }, /* 233 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */ + { 6, TM, sys_mbind, "mbind" }, /* 235 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 239 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */ + { 4, TN, sys_accept4, "accept4" }, /* 242 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */ + { 0, 0, printargs, "arch_unimpl" }, /* 244 */ + { 3, 0, printargs, "cacheflush" }, /* 245 */ + { 1, 0, printargs, "set_dataplane" }, /* 246 */ + { 0, 0, printargs, "arch_unimpl" }, /* 247 */ + { 0, 0, printargs, "arch_unimpl" }, /* 248 */ + { 0, 0, printargs, "arch_unimpl" }, /* 249 */ + { 0, 0, printargs, "arch_unimpl" }, /* 250 */ + { 0, 0, printargs, "arch_unimpl" }, /* 251 */ + { 0, 0, printargs, "arch_unimpl" }, /* 252 */ + { 0, 0, printargs, "arch_unimpl" }, /* 253 */ + { 0, 0, printargs, "arch_unimpl" }, /* 254 */ + { 0, 0, printargs, "arch_unimpl" }, /* 255 */ + { 0, 0, printargs, "arch_unimpl" }, /* 256 */ + { 0, 0, printargs, "arch_unimpl" }, /* 257 */ + { 0, 0, printargs, "arch_unimpl" }, /* 258 */ + { 0, 0, printargs, "arch_unimpl" }, /* 259 */ + { 4, TP, sys_wait4, "wait4" }, /* 260 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 267 */ + { 2, TD, sys_setns, "setns" }, /* 268 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 272 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 273 */ diff --git a/alice-strace/linux/tile/syscallent1.h b/alice-strace/linux/tile/syscallent1.h new file mode 100644 index 0000000..9f20521 --- /dev/null +++ b/alice-strace/linux/tile/syscallent1.h @@ -0,0 +1,278 @@ + { 2, 0, sys_io_setup, "io_setup" }, /* 0 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 2 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 5 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 8 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 11 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 12 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 14 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 17 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */ + { 1, TD, sys_dup, "dup" }, /* 23 */ + { 3, TD, sys_dup3, "dup3" }, /* 24 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 25 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 29 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */ + { 2, TD, sys_flock, "flock" }, /* 32 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 37 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 38 */ + { 2, TF, sys_umount2, "umount2" }, /* 39 */ + { 5, TF, sys_mount, "mount" }, /* 40 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 43 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */ + { 4, TF, sys_truncate64, "truncate64" }, /* 45 */ + { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 47 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */ + { 1, TF, sys_chdir, "chdir" }, /* 49 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 50 */ + { 1, TF, sys_chroot, "chroot" }, /* 51 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */ + { 3, TD, sys_fchown, "fchown" }, /* 55 */ + { 4, TD|TF, sys_openat, "openat" }, /* 56 */ + { 1, TD, sys_close, "close" }, /* 57 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 58 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 59 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 60 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 61 */ + { 5, TD, sys_llseek, "llseek" }, /* 62 */ + { 3, TD, sys_read, "read" }, /* 63 */ + { 3, TD, sys_write, "write" }, /* 64 */ + { 3, TD, sys_readv, "readv" }, /* 65 */ + { 3, TD, sys_writev, "writev" }, /* 66 */ + { 6, TD, sys_pread, "pread64" }, /* 67 */ + { 6, TD, sys_pwrite, "pwrite64" }, /* 68 */ + { 5, TD, sys_preadv, "preadv" }, /* 69 */ + { 5, TD, sys_pwritev, "pwritev" }, /* 70 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 71 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 72 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 73 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */ + { 6, TD, sys_splice, "splice" }, /* 76 */ + { 4, TD, sys_tee, "tee" }, /* 77 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */ + { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 80 */ + { 0, 0, sys_sync, "sync" }, /* 81 */ + { 1, TD, sys_fsync, "fsync" }, /* 82 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */ + { 6, TD, sys_sync_file_range2, "sync_file_range2" }, /* 84 */ + { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */ + { 1, TF, sys_acct, "acct" }, /* 89 */ + { 2, 0, sys_capget, "capget" }, /* 90 */ + { 2, 0, sys_capset, "capset" }, /* 91 */ + { 1, 0, sys_personality, "personality" }, /* 92 */ + { 1, TP, sys_exit, "exit" }, /* 93 */ + { 1, TP, sys_exit, "exit_group" }, /* 94 */ + { 5, TP, sys_waitid, "waitid" }, /* 95 */ + { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */ + { 1, TP, sys_unshare, "unshare" }, /* 97 */ + { 6, 0, sys_futex, "futex" }, /* 98 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 102 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 103 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */ + { 3, 0, sys_init_module, "init_module" }, /* 105 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 106 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 107 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */ + { 3, 0, sys_syslog, "syslog" }, /* 116 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 117 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */ + { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */ + { 2, TS, sys_kill, "kill" }, /* 129 */ + { 2, TS, sys_kill, "tkill" }, /* 130 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 131 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 140 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 141 */ + { 4, 0, sys_reboot, "reboot" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 1, 0, sys_setgid, "setgid" }, /* 144 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 145 */ + { 1, 0, sys_setuid, "setuid" }, /* 146 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 147 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 148 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 149 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 150 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */ + { 1, 0, sys_times, "times" }, /* 153 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 154 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 155 */ + { 1, 0, sys_getsid, "getsid" }, /* 156 */ + { 0, 0, sys_setsid, "setsid" }, /* 157 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 158 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 159 */ + { 1, 0, sys_uname, "uname" }, /* 160 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 161 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 165 */ + { 1, 0, sys_umask, "umask" }, /* 166 */ + { 5, 0, sys_prctl, "prctl" }, /* 167 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 168 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */ + { 0, 0, sys_getpid, "getpid" }, /* 172 */ + { 0, 0, sys_getppid, "getppid" }, /* 173 */ + { 0, NF, sys_getuid, "getuid" }, /* 174 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 175 */ + { 0, NF, sys_getgid, "getgid" }, /* 176 */ + { 0, NF, sys_getegid, "getegid" }, /* 177 */ + { 0, 0, sys_gettid, "gettid" }, /* 178 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 180 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */ + { 4, TI, sys_msgget, "msgget" }, /* 186 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 187 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */ + { 4, TI, sys_semget, "semget" }, /* 190 */ + { 4, TI, sys_semctl, "semctl" }, /* 191 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */ + { 4, TI, sys_semop, "semop" }, /* 193 */ + { 4, TI, sys_shmget, "shmget" }, /* 194 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 195 */ + { 4, TI, sys_shmat, "shmat" }, /* 196 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 197 */ + { 3, TN, sys_socket, "socket" }, /* 198 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 199 */ + { 3, TN, sys_bind, "bind" }, /* 200 */ + { 2, TN, sys_listen, "listen" }, /* 201 */ + { 3, TN, sys_accept, "accept" }, /* 202 */ + { 3, TN, sys_connect, "connect" }, /* 203 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 204 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 205 */ + { 6, TN, sys_sendto, "sendto" }, /* 206 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 210 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */ + { 4, TD, sys_readahead, "readahead" }, /* 213 */ + { 1, TM, sys_brk, "brk" }, /* 214 */ + { 2, TM, sys_munmap, "munmap" }, /* 215 */ + { 5, TM, sys_mremap, "mremap" }, /* 216 */ + { 5, 0, sys_add_key, "add_key" }, /* 217 */ + { 4, 0, sys_request_key, "request_key" }, /* 218 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 219 */ + { 5, TP, sys_clone, "clone" }, /* 220 */ + { 3, TF|TP, sys_execve, "execve" }, /* 221 */ + { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 222 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 223 */ + { 1, TF, sys_swapon, "swapon" }, /* 224 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ + { 3, TM, sys_msync, "msync" }, /* 227 */ + { 2, TM, sys_mlock, "mlock" }, /* 228 */ + { 2, TM, sys_munlock, "munlock" }, /* 229 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 230 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 231 */ + { 3, TM, sys_mincore, "mincore" }, /* 232 */ + { 3, TM, sys_madvise, "madvise" }, /* 233 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 234 */ + { 6, TM, sys_mbind, "mbind" }, /* 235 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 239 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */ + { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */ + { 4, TN, sys_accept4, "accept4" }, /* 242 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */ +#ifdef __tilegx__ + { 0, 0, printargs, "arch_unimpl" }, /* 244 */ +#else + { 2, 0, printargs, "cmpxchg_badaddr" }, /* 244 */ +#endif + { 3, 0, printargs, "cacheflush" }, /* 245 */ + { 1, 0, printargs, "set_dataplane" }, /* 246 */ + { 0, 0, printargs, "arch_unimpl" }, /* 247 */ + { 0, 0, printargs, "arch_unimpl" }, /* 248 */ + { 0, 0, printargs, "arch_unimpl" }, /* 249 */ + { 0, 0, printargs, "arch_unimpl" }, /* 250 */ + { 0, 0, printargs, "arch_unimpl" }, /* 251 */ + { 0, 0, printargs, "arch_unimpl" }, /* 252 */ + { 0, 0, printargs, "arch_unimpl" }, /* 253 */ + { 0, 0, printargs, "arch_unimpl" }, /* 254 */ + { 0, 0, printargs, "arch_unimpl" }, /* 255 */ + { 0, 0, printargs, "arch_unimpl" }, /* 256 */ + { 0, 0, printargs, "arch_unimpl" }, /* 257 */ + { 0, 0, printargs, "arch_unimpl" }, /* 258 */ + { 0, 0, printargs, "arch_unimpl" }, /* 259 */ + { 4, TP, sys_wait4, "wait4" }, /* 260 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 267 */ + { 2, TD, sys_setns, "setns" }, /* 268 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 272 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 273 */ diff --git a/alice-strace/linux/ubi-user.h b/alice-strace/linux/ubi-user.h new file mode 100644 index 0000000..a12c884 --- /dev/null +++ b/alice-strace/linux/ubi-user.h @@ -0,0 +1,420 @@ +/* + * Copyright © International Business Machines Corp., 2006 + * + * 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 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Artem Bityutskiy (Битюцкий Артём) + */ + +#ifndef __UBI_USER_H__ +#define __UBI_USER_H__ + +#include + +/* + * UBI device creation (the same as MTD device attachment) + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI + * control device. The caller has to properly fill and pass + * &struct ubi_attach_req object - UBI will attach the MTD device specified in + * the request and return the newly created UBI device number as the ioctl + * return value. + * + * UBI device deletion (the same as MTD device detachment) + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI + * control device. + * + * UBI volume creation + * ~~~~~~~~~~~~~~~~~~~ + * + * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character + * device. A &struct ubi_mkvol_req object has to be properly filled and a + * pointer to it has to be passed to the ioctl. + * + * UBI volume deletion + * ~~~~~~~~~~~~~~~~~~~ + * + * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character + * device should be used. A pointer to the 32-bit volume ID hast to be passed + * to the ioctl. + * + * UBI volume re-size + * ~~~~~~~~~~~~~~~~~~ + * + * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character + * device should be used. A &struct ubi_rsvol_req object has to be properly + * filled and a pointer to it has to be passed to the ioctl. + * + * UBI volumes re-name + * ~~~~~~~~~~~~~~~~~~~ + * + * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command + * of the UBI character device should be used. A &struct ubi_rnvol_req object + * has to be properly filled and a pointer to it has to be passed to the ioctl. + * + * UBI volume update + * ~~~~~~~~~~~~~~~~~ + * + * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the + * corresponding UBI volume character device. A pointer to a 64-bit update + * size should be passed to the ioctl. After this, UBI expects user to write + * this number of bytes to the volume character device. The update is finished + * when the claimed number of bytes is passed. So, the volume update sequence + * is something like: + * + * fd = open("/dev/my_volume"); + * ioctl(fd, UBI_IOCVOLUP, &image_size); + * write(fd, buf, image_size); + * close(fd); + * + * Logical eraseblock erase + * ~~~~~~~~~~~~~~~~~~~~~~~~ + * + * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the + * corresponding UBI volume character device should be used. This command + * unmaps the requested logical eraseblock, makes sure the corresponding + * physical eraseblock is successfully erased, and returns. + * + * Atomic logical eraseblock change + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH + * ioctl command of the corresponding UBI volume character device. A pointer to + * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the + * user is expected to write the requested amount of bytes (similarly to what + * should be done in case of the "volume update" ioctl). + * + * Logical eraseblock map + * ~~~~~~~~~~~~~~~~~~~~~ + * + * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP + * ioctl command should be used. A pointer to a &struct ubi_map_req object is + * expected to be passed. The ioctl maps the requested logical eraseblock to + * a physical eraseblock and returns. Only non-mapped logical eraseblocks can + * be mapped. If the logical eraseblock specified in the request is already + * mapped to a physical eraseblock, the ioctl fails and returns error. + * + * Logical eraseblock unmap + * ~~~~~~~~~~~~~~~~~~~~~~~~ + * + * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP + * ioctl command should be used. The ioctl unmaps the logical eraseblocks, + * schedules corresponding physical eraseblock for erasure, and returns. Unlike + * the "LEB erase" command, it does not wait for the physical eraseblock being + * erased. Note, the side effect of this is that if an unclean reboot happens + * after the unmap ioctl returns, you may find the LEB mapped again to the same + * physical eraseblock after the UBI is run again. + * + * Check if logical eraseblock is mapped + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * To check if a logical eraseblock is mapped to a physical eraseblock, the + * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is + * not mapped, and %1 if it is mapped. + * + * Set an UBI volume property + * ~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be + * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be + * passed. The object describes which property should be set, and to which value + * it should be set. + */ + +/* + * When a new UBI volume or UBI device is created, users may either specify the + * volume/device number they want to create or to let UBI automatically assign + * the number using these constants. + */ +#define UBI_VOL_NUM_AUTO (-1) +#define UBI_DEV_NUM_AUTO (-1) + +/* Maximum volume name length */ +#define UBI_MAX_VOLUME_NAME 127 + +/* ioctl commands of UBI character devices */ + +#define UBI_IOC_MAGIC 'o' + +/* Create an UBI volume */ +#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) +/* Remove an UBI volume */ +#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) +/* Re-size an UBI volume */ +#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) +/* Re-name volumes */ +#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) + +/* ioctl commands of the UBI control character device */ + +#define UBI_CTRL_IOC_MAGIC 'o' + +/* Attach an MTD device */ +#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) +/* Detach an MTD device */ +#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) + +/* ioctl commands of UBI volume character devices */ + +#define UBI_VOL_IOC_MAGIC 'O' + +/* Start UBI volume update */ +#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) +/* LEB erasure command, used for debugging, disabled by default */ +#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) +/* Atomic LEB change command */ +#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) +/* Map LEB command */ +#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) +/* Unmap LEB command */ +#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) +/* Check if LEB is mapped command */ +#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) +/* Set an UBI volume property */ +#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ + struct ubi_set_vol_prop_req) + +/* Maximum MTD device name length supported by UBI */ +#define MAX_UBI_MTD_NAME_LEN 127 + +/* Maximum amount of UBI volumes that can be re-named at one go */ +#define UBI_MAX_RNVOL 32 + +/* + * UBI volume type constants. + * + * @UBI_DYNAMIC_VOLUME: dynamic volume + * @UBI_STATIC_VOLUME: static volume + */ +enum { + UBI_DYNAMIC_VOLUME = 3, + UBI_STATIC_VOLUME = 4, +}; + +/* + * UBI set volume property ioctl constants. + * + * @UBI_VOL_PROP_DIRECT_WRITE: allow (any non-zero value) or disallow (value 0) + * user to directly write and erase individual + * eraseblocks on dynamic volumes + */ +enum { + UBI_VOL_PROP_DIRECT_WRITE = 1, +}; + +/** + * struct ubi_attach_req - attach MTD device request. + * @ubi_num: UBI device number to create + * @mtd_num: MTD device number to attach + * @vid_hdr_offset: VID header offset (use defaults if %0) + * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEBs + * @padding: reserved for future, not used, has to be zeroed + * + * This data structure is used to specify MTD device UBI has to attach and the + * parameters it has to use. The number which should be assigned to the new UBI + * device is passed in @ubi_num. UBI may automatically assign the number if + * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in + * @ubi_num. + * + * Most applications should pass %0 in @vid_hdr_offset to make UBI use default + * offset of the VID header within physical eraseblocks. The default offset is + * the next min. I/O unit after the EC header. For example, it will be offset + * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or + * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. + * + * But in rare cases, if this optimizes things, the VID header may be placed to + * a different offset. For example, the boot-loader might do things faster if + * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. + * As the boot-loader would not normally need to read EC headers (unless it + * needs UBI in RW mode), it might be faster to calculate ECC. This is weird + * example, but it real-life example. So, in this example, @vid_hdr_offer would + * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes + * aligned, which is OK, as UBI is clever enough to realize this is 4th + * sub-page of the first page and add needed padding. + * + * The @max_beb_per1024 is the maximum amount of bad PEBs UBI expects on the + * UBI device per 1024 eraseblocks. This value is often given in an other form + * in the NAND datasheet (min NVB i.e. minimal number of valid blocks). The + * maximum expected bad eraseblocks per 1024 is then: + * 1024 * (1 - MinNVB / MaxNVB) + * Which gives 20 for most NAND devices. This limit is used in order to derive + * amount of eraseblock UBI reserves for handling new bad blocks. If the device + * has more bad eraseblocks than this limit, UBI does not reserve any physical + * eraseblocks for new bad eraseblocks, but attempts to use available + * eraseblocks (if any). The accepted range is 0-768. If 0 is given, the + * default kernel value of %CONFIG_MTD_UBI_BEB_LIMIT will be used. + */ +struct ubi_attach_req { + __s32 ubi_num; + __s32 mtd_num; + __s32 vid_hdr_offset; + __s16 max_beb_per1024; + __s8 padding[10]; +}; + +/** + * struct ubi_mkvol_req - volume description data structure used in + * volume creation requests. + * @vol_id: volume number + * @alignment: volume alignment + * @bytes: volume size in bytes + * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) + * @padding1: reserved for future, not used, has to be zeroed + * @name_len: volume name length + * @padding2: reserved for future, not used, has to be zeroed + * @name: volume name + * + * This structure is used by user-space programs when creating new volumes. The + * @used_bytes field is only necessary when creating static volumes. + * + * The @alignment field specifies the required alignment of the volume logical + * eraseblock. This means, that the size of logical eraseblocks will be aligned + * to this number, i.e., + * (UBI device logical eraseblock size) mod (@alignment) = 0. + * + * To put it differently, the logical eraseblock of this volume may be slightly + * shortened in order to make it properly aligned. The alignment has to be + * multiple of the flash minimal input/output unit, or %1 to utilize the entire + * available space of logical eraseblocks. + * + * The @alignment field may be useful, for example, when one wants to maintain + * a block device on top of an UBI volume. In this case, it is desirable to fit + * an integer number of blocks in logical eraseblocks of this UBI volume. With + * alignment it is possible to update this volume using plane UBI volume image + * BLOBs, without caring about how to properly align them. + */ +struct ubi_mkvol_req { + __s32 vol_id; + __s32 alignment; + __s64 bytes; + __s8 vol_type; + __s8 padding1; + __s16 name_len; + __s8 padding2[4]; + char name[UBI_MAX_VOLUME_NAME + 1]; +} __attribute__((packed)); + +/** + * struct ubi_rsvol_req - a data structure used in volume re-size requests. + * @vol_id: ID of the volume to re-size + * @bytes: new size of the volume in bytes + * + * Re-sizing is possible for both dynamic and static volumes. But while dynamic + * volumes may be re-sized arbitrarily, static volumes cannot be made to be + * smaller than the number of bytes they bear. To arbitrarily shrink a static + * volume, it must be wiped out first (by means of volume update operation with + * zero number of bytes). + */ +struct ubi_rsvol_req { + __s64 bytes; + __s32 vol_id; +} __attribute__((packed)); + +/** + * struct ubi_rnvol_req - volumes re-name request. + * @count: count of volumes to re-name + * @padding1: reserved for future, not used, has to be zeroed + * @vol_id: ID of the volume to re-name + * @name_len: name length + * @padding2: reserved for future, not used, has to be zeroed + * @name: new volume name + * + * UBI allows to re-name up to %32 volumes at one go. The count of volumes to + * re-name is specified in the @count field. The ID of the volumes to re-name + * and the new names are specified in the @vol_id and @name fields. + * + * The UBI volume re-name operation is atomic, which means that should power cut + * happen, the volumes will have either old name or new name. So the possible + * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes + * A and B one may create temporary volumes %A1 and %B1 with the new contents, + * then atomically re-name A1->A and B1->B, in which case old %A and %B will + * be removed. + * + * If it is not desirable to remove old A and B, the re-name request has to + * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 + * become A and B, and old A and B will become A1 and B1. + * + * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 + * and B1 become A and B, and old A and B become X and Y. + * + * In other words, in case of re-naming into an existing volume name, the + * existing volume is removed, unless it is re-named as well at the same + * re-name request. + */ +struct ubi_rnvol_req { + __s32 count; + __s8 padding1[12]; + struct { + __s32 vol_id; + __s16 name_len; + __s8 padding2[2]; + char name[UBI_MAX_VOLUME_NAME + 1]; + } ents[UBI_MAX_RNVOL]; +} __attribute__((packed)); + +/** + * struct ubi_leb_change_req - a data structure used in atomic LEB change + * requests. + * @lnum: logical eraseblock number to change + * @bytes: how many bytes will be written to the logical eraseblock + * @dtype: pass "3" for better compatibility with old kernels + * @padding: reserved for future, not used, has to be zeroed + * + * The @dtype field used to inform UBI about what kind of data will be written + * to the LEB: long term (value 1), short term (value 2), unknown (value 3). + * UBI tried to pick a PEB with lower erase counter for short term data and a + * PEB with higher erase counter for long term data. But this was not really + * used because users usually do not know this and could easily mislead UBI. We + * removed this feature in May 2012. UBI currently just ignores the @dtype + * field. But for better compatibility with older kernels it is recommended to + * set @dtype to 3 (unknown). + */ +struct ubi_leb_change_req { + __s32 lnum; + __s32 bytes; + __s8 dtype; /* obsolete, do not use! */ + __s8 padding[7]; +} __attribute__((packed)); + +/** + * struct ubi_map_req - a data structure used in map LEB requests. + * @dtype: pass "3" for better compatibility with old kernels + * @lnum: logical eraseblock number to unmap + * @padding: reserved for future, not used, has to be zeroed + */ +struct ubi_map_req { + __s32 lnum; + __s8 dtype; /* obsolete, do not use! */ + __s8 padding[3]; +} __attribute__((packed)); + + +/** + * struct ubi_set_vol_prop_req - a data structure used to set an UBI volume + * property. + * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE) + * @padding: reserved for future, not used, has to be zeroed + * @value: value to set + */ +struct ubi_set_vol_prop_req { + __u8 property; + __u8 padding[7]; + __u64 value; +} __attribute__((packed)); + +#endif /* __UBI_USER_H__ */ diff --git a/alice-strace/linux/x32/errnoent.h b/alice-strace/linux/x32/errnoent.h new file mode 100644 index 0000000..441c66b --- /dev/null +++ b/alice-strace/linux/x32/errnoent.h @@ -0,0 +1 @@ +#include "../errnoent.h" diff --git a/alice-strace/linux/x32/errnoent1.h b/alice-strace/linux/x32/errnoent1.h new file mode 100644 index 0000000..de1136c --- /dev/null +++ b/alice-strace/linux/x32/errnoent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "../errnoent.h" diff --git a/alice-strace/linux/x32/ioctlent.h.in b/alice-strace/linux/x32/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/x32/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/x32/ioctlent1.h b/alice-strace/linux/x32/ioctlent1.h new file mode 100644 index 0000000..4750671 --- /dev/null +++ b/alice-strace/linux/x32/ioctlent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "ioctlent.h" diff --git a/alice-strace/linux/x32/signalent.h b/alice-strace/linux/x32/signalent.h new file mode 100644 index 0000000..d31e6a4 --- /dev/null +++ b/alice-strace/linux/x32/signalent.h @@ -0,0 +1 @@ +#include "../signalent.h" diff --git a/alice-strace/linux/x32/signalent1.h b/alice-strace/linux/x32/signalent1.h new file mode 100644 index 0000000..c927d72 --- /dev/null +++ b/alice-strace/linux/x32/signalent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "../signalent.h" diff --git a/alice-strace/linux/x32/syscallent.h b/alice-strace/linux/x32/syscallent.h new file mode 100644 index 0000000..65df127 --- /dev/null +++ b/alice-strace/linux/x32/syscallent.h @@ -0,0 +1,348 @@ + { 3, TD, sys_read, "read" }, /* 0 */ + { 3, TD, sys_write, "write" }, /* 1 */ + { 3, TD|TF, sys_open, "open" }, /* 2 */ + { 1, TD, sys_close, "close" }, /* 3 */ + { 2, TF, sys_stat, "stat" }, /* 4 */ + { 2, TD, sys_fstat, "fstat" }, /* 5 */ + { 2, TF, sys_lstat, "lstat" }, /* 6 */ + { 3, TD, sys_poll, "poll" }, /* 7 */ + { 3, TD, sys_lseek, "lseek" }, /* 8 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 9 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 10 */ + { 2, TM, sys_munmap, "munmap" }, /* 11 */ + { 1, TM, sys_brk, "brk" }, /* 12 */ + { 4, TS, printargs, "64:rt_sigaction" }, /* 13 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 14 */ + { 0, TS, printargs, "64:rt_sigreturn" }, /* 15 */ + { 3, TD, printargs, "64:ioctl" }, /* 16 */ + { 4, TD, sys_pread, "pread" }, /* 17 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 18 */ + { 3, TD, printargs, "64:readv" }, /* 19 */ + { 3, TD, printargs, "64:writev" }, /* 20 */ + { 2, TF, sys_access, "access" }, /* 21 */ + { 1, TD, sys_pipe, "pipe" }, /* 22 */ + { 5, TD, sys_select, "select" }, /* 23 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 24 */ + { 5, TM, sys_mremap, "mremap" }, /* 25 */ + { 3, TM, sys_msync, "msync" }, /* 26 */ + { 3, TM, sys_mincore, "mincore" }, /* 27 */ + { 3, TM, sys_madvise, "madvise" }, /* 28 */ + { 4, TI, sys_shmget, "shmget" }, /* 29 */ + { 4, TI, sys_shmat, "shmat" }, /* 30 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 31 */ + { 1, TD, sys_dup, "dup" }, /* 32 */ + { 2, TD, sys_dup2, "dup2" }, /* 33 */ + { 0, TS, sys_pause, "pause" }, /* 34 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 35 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 36 */ + { 1, 0, sys_alarm, "alarm" }, /* 37 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 38 */ + { 0, 0, sys_getpid, "getpid" }, /* 39 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 40 */ + { 3, TN, sys_socket, "socket" }, /* 41 */ + { 3, TN, sys_connect, "connect" }, /* 42 */ + { 3, TN, sys_accept, "accept" }, /* 43 */ + { 6, TN, sys_sendto, "sendto" }, /* 44 */ + { 6, TN, printargs, "64:recvfrom" }, /* 45 */ + { 3, TN, printargs, "64:sendmsg" }, /* 46 */ + { 5, TN, printargs, "64:recvmsg" }, /* 47 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 48 */ + { 3, TN, sys_bind, "bind" }, /* 49 */ + { 2, TN, sys_listen, "listen" }, /* 50 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 51 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 52 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 53 */ + { 5, TN, printargs, "64:setsockopt" }, /* 54 */ + { 5, TN, printargs, "64:getsockopt" }, /* 55 */ + { 5, TP, sys_clone, "clone" }, /* 56 */ + { 0, TP, sys_fork, "fork" }, /* 57 */ + { 0, TP, sys_vfork, "vfork" }, /* 58 */ + { 3, TF|TP, printargs, "64:execve" }, /* 59 */ + { 1, TP, sys_exit, "_exit" }, /* 60 */ + { 4, TP, sys_wait4, "wait4" }, /* 61 */ + { 2, TS, sys_kill, "kill" }, /* 62 */ + { 1, 0, sys_uname, "uname" }, /* 63 */ + { 4, TI, sys_semget, "semget" }, /* 64 */ + { 4, TI, sys_semop, "semop" }, /* 65 */ + { 4, TI, sys_semctl, "semctl" }, /* 66 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 67 */ + { 4, TI, sys_msgget, "msgget" }, /* 68 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 69 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 70 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 71 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 72 */ + { 2, TD, sys_flock, "flock" }, /* 73 */ + { 1, TD, sys_fsync, "fsync" }, /* 74 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 75 */ + { 2, TF, sys_truncate64, "truncate" }, /* 76 */ + { 2, TD, sys_ftruncate64, "ftruncate" }, /* 77 */ + { 3, TD, sys_getdents, "getdents" }, /* 78 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 79 */ + { 1, TF, sys_chdir, "chdir" }, /* 80 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 81 */ + { 2, TF, sys_rename, "rename" }, /* 82 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 83 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 84 */ + { 2, TD|TF, sys_creat, "creat" }, /* 85 */ + { 2, TF, sys_link, "link" }, /* 86 */ + { 1, TF, sys_unlink, "unlink" }, /* 87 */ + { 2, TF, sys_symlink, "symlink" }, /* 88 */ + { 3, TF, sys_readlink, "readlink" }, /* 89 */ + { 2, TF, sys_chmod, "chmod" }, /* 90 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 91 */ + { 3, TF, sys_chown, "chown" }, /* 92 */ + { 3, TD, sys_fchown, "fchown" }, /* 93 */ + { 3, TF, sys_chown, "lchown" }, /* 94 */ + { 1, 0, sys_umask, "umask" }, /* 95 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 96 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 97 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 98 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 99 */ + { 1, 0, sys_times, "times" }, /* 100 */ + { 4, 0, printargs, "64:ptrace" }, /* 101 */ + { 0, NF, sys_getuid, "getuid" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 0, NF, sys_getgid, "getgid" }, /* 104 */ + { 1, 0, sys_setuid, "setuid" }, /* 105 */ + { 1, 0, sys_setgid, "setgid" }, /* 106 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 107 */ + { 0, NF, sys_getegid, "getegid" }, /* 108 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 109 */ + { 0, 0, sys_getppid, "getppid" }, /* 110 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 111 */ + { 0, 0, sys_setsid, "setsid" }, /* 112 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 113 */ + { 2, 0, sys_setregid, "setregid" }, /* 114 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 115 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 116 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 117 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 118 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 119 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 120 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 121 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 122 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 123 */ + { 1, 0, sys_getsid, "getsid" }, /* 124 */ + { 2, 0, sys_capget, "capget" }, /* 125 */ + { 2, 0, sys_capset, "capset" }, /* 126 */ + { 2, TS, printargs, "64:rt_sigpending" }, /* 127 */ + { 4, TS, printargs, "64:rt_sigtimedwait" }, /* 128 */ + { 3, TS, printargs, "64:rt_sigqueueinfo" }, /* 129 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 130 */ + { 2, TS, printargs, "64:sigaltstack"}, /* 131 */ + { 2, TF, sys_utime, "utime" }, /* 132 */ + { 3, TF, sys_mknod, "mknod" }, /* 133 */ + { 1, TF, printargs, "64:uselib" }, /* 134 */ + { 1, 0, sys_personality, "personality" }, /* 135 */ + { 2, 0, sys_ustat, "ustat" }, /* 136 */ + { 2, TF, sys_statfs, "statfs" }, /* 137 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 138 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 139 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 140 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 141 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 142 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 143 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 144 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 145 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 146 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 147 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 148 */ + { 2, TM, sys_mlock, "mlock" }, /* 149 */ + { 2, TM, sys_munlock, "munlock" }, /* 150 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 151 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 152 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 153 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 154 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 155 */ + { 1, 0, printargs, "64:_sysctl" }, /* 156 */ + { 5, 0, sys_prctl, "prctl" }, /* 157 */ + { 2, TP, sys_arch_prctl, "arch_prctl" }, /* 158 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 159 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 160 */ + { 1, TF, sys_chroot, "chroot" }, /* 161 */ + { 0, 0, sys_sync, "sync" }, /* 162 */ + { 1, TF, sys_acct, "acct" }, /* 163 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 164 */ + { 5, TF, sys_mount, "mount" }, /* 165 */ + { 2, TF, sys_umount2, "umount" }, /* 166 */ + { 2, TF, sys_swapon, "swapon" }, /* 167 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 168 */ + { 4, 0, sys_reboot, "reboot" }, /* 169 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 170 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */ + { 1, 0, sys_iopl, "iopl" }, /* 172 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 173 */ + { 2, 0, printargs, "64:create_module" }, /* 174 */ + { 3, 0, sys_init_module, "init_module" }, /* 175 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 176 */ + { 1, 0, printargs, "64:get_kernel_syms" }, /* 177 */ + { 5, 0, printargs, "64:query_module" }, /* 178 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 179 */ + { 3, 0, printargs, "64:nfsservctl" }, /* 180 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */ + { 3, 0, sys_tuxcall, "tuxcall" }, /* 184 */ + { 3, 0, sys_security, "security" }, /* 185 */ + { 0, 0, sys_gettid, "gettid" }, /* 186 */ + { 3, TD, sys_readahead, "readahead" }, /* 187 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 188 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 189 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 190 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 191 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 192 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 193 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 194 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 195 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 196 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 197 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 198 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 199 */ + { 2, TS, sys_kill, "tkill" }, /* 200 */ + { 1, 0, sys_time, "time" }, /* 201 */ + { 6, 0, sys_futex, "futex" }, /* 202 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 203 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 204 */ + { 1, 0, printargs, "64:set_thread_area" }, /* 205 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 206 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 207 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 208 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 209 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 210 */ + { 1, 0, printargs, "64:get_thread_area" }, /* 211 */ + { 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 212 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 213 */ + { 4, 0, printargs, "64:epoll_ctl_old" }, /* 214 */ + { 4, 0, printargs, "64:epoll_wait_old" }, /* 215 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 216 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 217 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 218 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 219 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 220 */ + { 4, TD, sys_fadvise64_64, "fadvise64" }, /* 221 */ + { 3, 0, printargs, "64:timer_create"}, /* 222 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 223 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 224 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 225 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 226 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 227 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 228 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 229 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 230 */ + { 1, TP, sys_exit, "exit_group" }, /* 231 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 232 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 233 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 234 */ + { 2, TF, sys_utimes, "utimes" }, /* 235 */ + { 5, 0, printargs, "64:vserver" }, /* 236 */ + { 6, TM, sys_mbind, "mbind" }, /* 237 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 238 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 239 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 240 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 241 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 242 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 243 */ + { 2, 0, printargs, "64:mq_notify" }, /* 244 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 245 */ + { 4, 0, printargs, "64:kexec_load" }, /* 246 */ + { 5, TP, printargs, "64:waitid" }, /* 247 */ + { 5, 0, sys_add_key, "add_key" }, /* 248 */ + { 4, 0, sys_request_key, "request_key" }, /* 249 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 250 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 251 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 252 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 253 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 254 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 255 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 256 */ + { 4, TD|TF, sys_openat, "openat" }, /* 257 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 258 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 259 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 260 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 261 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 262 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 263 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 264 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 265 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 266 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 267 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 268 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 269 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 270 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 271 */ + { 1, TP, sys_unshare, "unshare" }, /* 272 */ + { 2, 0, printargs, "64:set_robust_list" }, /* 273 */ + { 3, 0, printargs, "64:get_robust_list" }, /* 274 */ + { 6, TD, sys_splice, "splice" }, /* 275 */ + { 4, TD, sys_tee, "tee" }, /* 276 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 277 */ + { 4, TD, printargs, "64:vmsplice" }, /* 278 */ + { 6, TM, printargs, "64:move_pages" }, /* 279 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 280 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 281 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 282 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 283 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 284 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 285 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 286 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 287 */ + { 4, TN, sys_accept4, "accept4" }, /* 288 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 289 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 290 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 291 */ + { 3, TD, sys_dup3, "dup3" }, /* 292 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 293 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 294 */ + { 4, TD, printargs, "64:preadv" }, /* 295 */ + { 4, TD, printargs, "64:pwritev" }, /* 296 */ + { 4, TP|TS, printargs, "64:rt_tgsigqueueinfo"}, /* 297 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 298 */ + { 5, TN, printargs, "64:recvmmsg" }, /* 299 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 300 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 301 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 302 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 303 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 304 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 305 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 306 */ + { 4, TN, printargs, "64:sendmmsg" }, /* 307 */ + { 2, TD, sys_setns, "setns" }, /* 308 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 309 */ + { 6, 0, printargs, "64:process_vm_readv" }, /* 310 */ + { 6, 0, printargs, "64:process_vm_writev" }, /* 311 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 312 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 313 */ + + [314 ... 511] = {}, + + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 512 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 513 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 514 */ + { 3, TD, sys_readv, "readv" }, /* 515 */ + { 3, TD, sys_writev, "writev" }, /* 516 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 517 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 518 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 519 */ + { 3, TF|TP, sys_execve, "execve" }, /* 520 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 521 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 522 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 523 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 524 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 525 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 526 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 527 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 528 */ + { 5, TP, sys_waitid, "waitid" }, /* 529 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 530 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 531 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 532 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 533 */ + { 4, TD, sys_preadv, "preadv" }, /* 534 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 535 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 536 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 537 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 538 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 539 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 540 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 541 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 542 */ diff --git a/alice-strace/linux/x32/syscallent1.h b/alice-strace/linux/x32/syscallent1.h new file mode 100644 index 0000000..c9100de --- /dev/null +++ b/alice-strace/linux/x32/syscallent1.h @@ -0,0 +1,3 @@ +/* Our second set comes from the i386 files. */ + +#include "../i386/syscallent.h" diff --git a/alice-strace/linux/x86_64/errnoent1.h b/alice-strace/linux/x86_64/errnoent1.h new file mode 100644 index 0000000..de1136c --- /dev/null +++ b/alice-strace/linux/x86_64/errnoent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "../errnoent.h" diff --git a/alice-strace/linux/x86_64/errnoent2.h b/alice-strace/linux/x86_64/errnoent2.h new file mode 100644 index 0000000..0630919 --- /dev/null +++ b/alice-strace/linux/x86_64/errnoent2.h @@ -0,0 +1,2 @@ +/* x32 personality */ +#include "../errnoent.h" diff --git a/alice-strace/linux/x86_64/gentab.pl b/alice-strace/linux/x86_64/gentab.pl new file mode 100644 index 0000000..52f7aa9 --- /dev/null +++ b/alice-strace/linux/x86_64/gentab.pl @@ -0,0 +1,73 @@ +#!/usr/bin/perl -w +#generate syscall table from a template file (usually the master i386 syscall +#ent.h) and the x86_64 unistd.h +%conv = ( + "exit" => "_exit", +); + +%known = ( + "mmap" => "sys_mmap", + "sched_yield" => "printargs", +); + +# only used when the template file has no entry +%args = ( + "arch_prctl" => 2, + "tkill" => 2, + "gettid" => 0, + "readahead" => 3, + # should decode all these: + "setxattr" => 5, + "lsetxattr" => 5, + "fsetxattr" => 5, + "getxattr" => 4, + "lgetxattr" => 4, + "fgetxattr" => 4, + "listxattr" => 3, + "llistxattr" => 3, + "flistxattr" => 3, + "removexattr" => 2, + "lremovexattr" => 2, + "fremovexattr" => 2, + "mmap" => 6, + "sched_yield" => 0, +); + +open(F,$ARGV[0]) || die "cannot open template file $ARGV[0]\n"; + +while () { + next unless /{/; + s/\/\*.*\*\///; + ($name) = /"([^"]+)"/; + chomp; + $call{$name} = $_; +} + +open(SL, ">syscallnum.h") || die "cannot create syscallnum.h\n"; + +open(S,$ARGV[1]) || die "cannot open syscall file $ARGV[1]\n"; +while () { + $name = ""; + next unless (($name, $num) = /define\s+__NR_(\S+)\s+(\d+)/); + next if $name eq ""; + + $name = $conv{$name} if defined($conv{$name}); + + if (!defined($call{$name})) { + unless (defined($args{$name})) { + print STDERR "unknown call $name $num\n"; + $na = 3; + } else { + $na = $args{$name}; + } + if (defined($known{$name})) { + $func = $known{$name}; + } else { + $func = "printargs"; + } + print "\t{ $na,\t0,\t$func,\t\"$name\" }, /* $num */\n"; + } else { + print "$call{$name} /* $num */\n"; + } + print SL "#define SYS_$name $num\n" +} diff --git a/alice-strace/linux/x86_64/ioctlent.h.in b/alice-strace/linux/x86_64/ioctlent.h.in new file mode 100644 index 0000000..52ac99b --- /dev/null +++ b/alice-strace/linux/x86_64/ioctlent.h.in @@ -0,0 +1 @@ +#include "../i386/ioctlent.h.in" diff --git a/alice-strace/linux/x86_64/ioctlent1.h b/alice-strace/linux/x86_64/ioctlent1.h new file mode 100644 index 0000000..4750671 --- /dev/null +++ b/alice-strace/linux/x86_64/ioctlent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "ioctlent.h" diff --git a/alice-strace/linux/x86_64/ioctlent2.h b/alice-strace/linux/x86_64/ioctlent2.h new file mode 100644 index 0000000..fd4b94d --- /dev/null +++ b/alice-strace/linux/x86_64/ioctlent2.h @@ -0,0 +1,2 @@ +/* x32 personality */ +#include "ioctlent.h" diff --git a/alice-strace/linux/x86_64/signalent1.h b/alice-strace/linux/x86_64/signalent1.h new file mode 100644 index 0000000..c927d72 --- /dev/null +++ b/alice-strace/linux/x86_64/signalent1.h @@ -0,0 +1,2 @@ +/* i386 personality */ +#include "../signalent.h" diff --git a/alice-strace/linux/x86_64/signalent2.h b/alice-strace/linux/x86_64/signalent2.h new file mode 100644 index 0000000..c8f6824 --- /dev/null +++ b/alice-strace/linux/x86_64/signalent2.h @@ -0,0 +1,2 @@ +/* x32 personality */ +#include "../signalent.h" diff --git a/alice-strace/linux/x86_64/syscallent.h b/alice-strace/linux/x86_64/syscallent.h new file mode 100644 index 0000000..8e3a200 --- /dev/null +++ b/alice-strace/linux/x86_64/syscallent.h @@ -0,0 +1,314 @@ + { 3, TD, sys_read, "read" }, /* 0 */ + { 3, TD, sys_write, "write" }, /* 1 */ + { 3, TD|TF, sys_open, "open" }, /* 2 */ + { 1, TD, sys_close, "close" }, /* 3 */ + { 2, TF, sys_stat, "stat" }, /* 4 */ + { 2, TD, sys_fstat, "fstat" }, /* 5 */ + { 2, TF, sys_lstat, "lstat" }, /* 6 */ + { 3, TD, sys_poll, "poll" }, /* 7 */ + { 3, TD, sys_lseek, "lseek" }, /* 8 */ + { 6, TD|TM, sys_mmap, "mmap" }, /* 9 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 10 */ + { 2, TM, sys_munmap, "munmap" }, /* 11 */ + { 1, TM, sys_brk, "brk" }, /* 12 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 13 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 14 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 15 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 16 */ + { 4, TD, sys_pread, "pread" }, /* 17 */ + { 4, TD, sys_pwrite, "pwrite" }, /* 18 */ + { 3, TD, sys_readv, "readv" }, /* 19 */ + { 3, TD, sys_writev, "writev" }, /* 20 */ + { 2, TF, sys_access, "access" }, /* 21 */ + { 1, TD, sys_pipe, "pipe" }, /* 22 */ + { 5, TD, sys_select, "select" }, /* 23 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 24 */ + { 5, TM, sys_mremap, "mremap" }, /* 25 */ + { 3, TM, sys_msync, "msync" }, /* 26 */ + { 3, TM, sys_mincore, "mincore" }, /* 27 */ + { 3, TM, sys_madvise, "madvise" }, /* 28 */ + { 4, TI, sys_shmget, "shmget" }, /* 29 */ + { 4, TI, sys_shmat, "shmat" }, /* 30 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 31 */ + { 1, TD, sys_dup, "dup" }, /* 32 */ + { 2, TD, sys_dup2, "dup2" }, /* 33 */ + { 0, TS, sys_pause, "pause" }, /* 34 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 35 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 36 */ + { 1, 0, sys_alarm, "alarm" }, /* 37 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 38 */ + { 0, 0, sys_getpid, "getpid" }, /* 39 */ + { 4, TD|TN, sys_sendfile64, "sendfile" }, /* 40 */ + { 3, TN, sys_socket, "socket" }, /* 41 */ + { 3, TN, sys_connect, "connect" }, /* 42 */ + { 3, TN, sys_accept, "accept" }, /* 43 */ + { 6, TN, sys_sendto, "sendto" }, /* 44 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 45 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 46 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 47 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 48 */ + { 3, TN, sys_bind, "bind" }, /* 49 */ + { 2, TN, sys_listen, "listen" }, /* 50 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 51 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 52 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 53 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 54 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 55 */ + { 5, TP, sys_clone, "clone" }, /* 56 */ + { 0, TP, sys_fork, "fork" }, /* 57 */ + { 0, TP, sys_vfork, "vfork" }, /* 58 */ + { 3, TF|TP, sys_execve, "execve" }, /* 59 */ + { 1, TP, sys_exit, "_exit" }, /* 60 */ + { 4, TP, sys_wait4, "wait4" }, /* 61 */ + { 2, TS, sys_kill, "kill" }, /* 62 */ + { 1, 0, sys_uname, "uname" }, /* 63 */ + { 4, TI, sys_semget, "semget" }, /* 64 */ + { 4, TI, sys_semop, "semop" }, /* 65 */ + { 4, TI, sys_semctl, "semctl" }, /* 66 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 67 */ + { 4, TI, sys_msgget, "msgget" }, /* 68 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 69 */ + { 5, TI, sys_msgrcv, "msgrcv" }, /* 70 */ + { 3, TI, sys_msgctl, "msgctl" }, /* 71 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 72 */ + { 2, TD, sys_flock, "flock" }, /* 73 */ + { 1, TD, sys_fsync, "fsync" }, /* 74 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 75 */ + { 2, TF, sys_truncate, "truncate" }, /* 76 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 77 */ + { 3, TD, sys_getdents, "getdents" }, /* 78 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 79 */ + { 1, TF, sys_chdir, "chdir" }, /* 80 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 81 */ + { 2, TF, sys_rename, "rename" }, /* 82 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 83 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 84 */ + { 2, TD|TF, sys_creat, "creat" }, /* 85 */ + { 2, TF, sys_link, "link" }, /* 86 */ + { 1, TF, sys_unlink, "unlink" }, /* 87 */ + { 2, TF, sys_symlink, "symlink" }, /* 88 */ + { 3, TF, sys_readlink, "readlink" }, /* 89 */ + { 2, TF, sys_chmod, "chmod" }, /* 90 */ + { 2, TD, sys_fchmod, "fchmod" }, /* 91 */ + { 3, TF, sys_chown, "chown" }, /* 92 */ + { 3, TD, sys_fchown, "fchown" }, /* 93 */ + { 3, TF, sys_chown, "lchown" }, /* 94 */ + { 1, 0, sys_umask, "umask" }, /* 95 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 96 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 97 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 98 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 99 */ + { 1, 0, sys_times, "times" }, /* 100 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 101 */ + { 0, NF, sys_getuid, "getuid" }, /* 102 */ + { 3, 0, sys_syslog, "syslog" }, /* 103 */ + { 0, NF, sys_getgid, "getgid" }, /* 104 */ + { 1, 0, sys_setuid, "setuid" }, /* 105 */ + { 1, 0, sys_setgid, "setgid" }, /* 106 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 107 */ + { 0, NF, sys_getegid, "getegid" }, /* 108 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 109 */ + { 0, 0, sys_getppid, "getppid" }, /* 110 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 111 */ + { 0, 0, sys_setsid, "setsid" }, /* 112 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 113 */ + { 2, 0, sys_setregid, "setregid" }, /* 114 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 115 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 116 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 117 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 118 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 119 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 120 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 121 */ + { 1, NF, sys_setfsuid, "setfsuid" }, /* 122 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 123 */ + { 1, 0, sys_getsid, "getsid" }, /* 124 */ + { 2, 0, sys_capget, "capget" }, /* 125 */ + { 2, 0, sys_capset, "capset" }, /* 126 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 127 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 128 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 129 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 130 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 131 */ + { 2, TF, sys_utime, "utime" }, /* 132 */ + { 3, TF, sys_mknod, "mknod" }, /* 133 */ + { 1, TF, sys_uselib, "uselib" }, /* 134 */ + { 1, 0, sys_personality, "personality" }, /* 135 */ + { 2, 0, sys_ustat, "ustat" }, /* 136 */ + { 2, TF, sys_statfs, "statfs" }, /* 137 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 138 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 139 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 140 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 141 */ + { 0, 0, sys_sched_setparam, "sched_setparam" }, /* 142 */ + { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 143 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 144 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 145 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 146 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 147 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 148 */ + { 2, TM, sys_mlock, "mlock" }, /* 149 */ + { 2, TM, sys_munlock, "munlock" }, /* 150 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 151 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 152 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 153 */ + { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 154 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 155 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 156 */ + { 5, 0, sys_prctl, "prctl" }, /* 157 */ + { 2, TP, sys_arch_prctl, "arch_prctl" }, /* 158 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 159 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 160 */ + { 1, TF, sys_chroot, "chroot" }, /* 161 */ + { 0, 0, sys_sync, "sync" }, /* 162 */ + { 1, TF, sys_acct, "acct" }, /* 163 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 164 */ + { 5, TF, sys_mount, "mount" }, /* 165 */ + { 2, TF, sys_umount2, "umount" }, /* 166 */ + { 2, TF, sys_swapon, "swapon" }, /* 167 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 168 */ + { 4, 0, sys_reboot, "reboot" }, /* 169 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 170 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 171 */ + { 1, 0, sys_iopl, "iopl" }, /* 172 */ + { 3, 0, sys_ioperm, "ioperm" }, /* 173 */ + { 2, 0, sys_create_module, "create_module" }, /* 174 */ + { 3, 0, sys_init_module, "init_module" }, /* 175 */ + { 2, 0, sys_delete_module, "delete_module" }, /* 176 */ + { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 177 */ + { 5, 0, sys_query_module, "query_module" }, /* 178 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 179 */ + { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 180 */ + { 5, 0, sys_getpmsg, "getpmsg" }, /* 181 */ + { 5, 0, sys_putpmsg, "putpmsg" }, /* 182 */ + { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 183 */ + { 3, 0, sys_tuxcall, "tuxcall" }, /* 184 */ + { 3, 0, sys_security, "security" }, /* 185 */ + { 0, 0, sys_gettid, "gettid" }, /* 186 */ + { 3, TD, sys_readahead, "readahead" }, /* 187 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 188 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 189 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 190 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 191 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 192 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 193 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 194 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 195 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 196 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 197 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 198 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 199 */ + { 2, TS, sys_kill, "tkill" }, /* 200 */ + { 1, 0, sys_time, "time" }, /* 201 */ + { 6, 0, sys_futex, "futex" }, /* 202 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 203 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 204 */ + { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 205 */ + { 2, 0, sys_io_setup, "io_setup" }, /* 206 */ + { 1, 0, sys_io_destroy, "io_destroy" }, /* 207 */ + { 5, 0, sys_io_getevents, "io_getevents" }, /* 208 */ + { 3, 0, sys_io_submit, "io_submit" }, /* 209 */ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 210 */ + { 1, 0, sys_get_thread_area, "get_thread_area" }, /* 211 */ + { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 212 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 213 */ + { 4, 0, printargs, "epoll_ctl_old" }, /* 214 */ + { 4, 0, printargs, "epoll_wait_old"}, /* 215 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 216 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 217 */ + { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 218 */ + { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 219 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 220 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 221 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 222 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 223 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 224 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 225 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 226 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 227 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 228 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 229 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 230 */ + { 1, TP, sys_exit, "exit_group" }, /* 231 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 232 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 233 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 234 */ + { 2, TF, sys_utimes, "utimes" }, /* 235 */ + { 5, 0, sys_vserver, "vserver" }, /* 236 */ + { 6, TM, sys_mbind, "mbind" }, /* 237 */ + { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 238 */ + { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 239 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 240 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 241 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 242 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 243 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 244 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 245 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 246 */ + { 5, TP, sys_waitid, "waitid" }, /* 247 */ + { 5, 0, sys_add_key, "add_key" }, /* 248 */ + { 4, 0, sys_request_key, "request_key" }, /* 249 */ + { 5, 0, sys_keyctl, "keyctl" }, /* 250 */ + { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 251 */ + { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 252 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 253 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 254 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 255 */ + { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 256 */ + { 4, TD|TF, sys_openat, "openat" }, /* 257 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 258 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 259 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 260 */ + { 3, TD|TF, sys_futimesat, "futimesat" }, /* 261 */ + { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 262 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 263 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 264 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 265 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 266 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 267 */ + { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 268 */ + { 3, TD|TF, sys_faccessat, "faccessat" }, /* 269 */ + { 6, TD, sys_pselect6, "pselect6" }, /* 270 */ + { 5, TD, sys_ppoll, "ppoll" }, /* 271 */ + { 1, TP, sys_unshare, "unshare" }, /* 272 */ + { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 273 */ + { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 274 */ + { 6, TD, sys_splice, "splice" }, /* 275 */ + { 4, TD, sys_tee, "tee" }, /* 276 */ + { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 277 */ + { 4, TD, sys_vmsplice, "vmsplice" }, /* 278 */ + { 6, TM, sys_move_pages, "move_pages" }, /* 279 */ + { 4, TD|TF, sys_utimensat, "utimensat" }, /* 280 */ + { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 281 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 282 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 283 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 284 */ + { 4, TD, sys_fallocate, "fallocate" }, /* 285 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 286 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 287 */ + { 4, TN, sys_accept4, "accept4" }, /* 288 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 289 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 290 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 291 */ + { 3, TD, sys_dup3, "dup3" }, /* 292 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 293 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 294 */ + { 4, TD, sys_preadv, "preadv" }, /* 295 */ + { 4, TD, sys_pwritev, "pwritev" }, /* 296 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 297 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 298 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 299 */ + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 300 */ + { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 301 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 302 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 303 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 304 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 305 */ + { 1, TD, sys_syncfs, "syncfs" }, /* 306 */ + { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 307 */ + { 2, TD, sys_setns, "setns" }, /* 308 */ + { 3, 0, sys_getcpu, "getcpu" }, /* 309 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 310 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 311 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 312 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 313 */ diff --git a/alice-strace/linux/x86_64/syscallent1.h b/alice-strace/linux/x86_64/syscallent1.h new file mode 100644 index 0000000..c9100de --- /dev/null +++ b/alice-strace/linux/x86_64/syscallent1.h @@ -0,0 +1,3 @@ +/* Our second set comes from the i386 files. */ + +#include "../i386/syscallent.h" diff --git a/alice-strace/linux/x86_64/syscallent2.h b/alice-strace/linux/x86_64/syscallent2.h new file mode 100644 index 0000000..5e0df53 --- /dev/null +++ b/alice-strace/linux/x86_64/syscallent2.h @@ -0,0 +1,2 @@ +/* x32 personality */ +#include "../x32/syscallent.h" diff --git a/alice-strace/linux/xtensa/ioctlent.h.in b/alice-strace/linux/xtensa/ioctlent.h.in new file mode 100644 index 0000000..a9eae81 --- /dev/null +++ b/alice-strace/linux/xtensa/ioctlent.h.in @@ -0,0 +1 @@ +/* intentionally empty */ diff --git a/alice-strace/linux/xtensa/syscallent.h b/alice-strace/linux/xtensa/syscallent.h new file mode 100644 index 0000000..62cb40d --- /dev/null +++ b/alice-strace/linux/xtensa/syscallent.h @@ -0,0 +1,326 @@ + { 0, 0, printargs, "spill" }, /* 0 */ + { 0, 0, printargs, "xtensa" }, /* 1 */ + [2 ... 7] = { }, + { 3, TD|TF, sys_open, "open" }, /* 8 */ + { 1, TD, sys_close, "close" }, /* 9 */ + { 1, TD, sys_dup, "dup" }, /* 10 */ + { 2, TD, sys_dup2, "dup2" }, /* 11 */ + { 3, TD, sys_read, "read" }, /* 12 */ + { 3, TD, sys_write, "write" }, /* 13 */ + { 5, TD, sys_select, "select" }, /* 14 */ + { 3, TD, sys_lseek, "lseek" }, /* 15 */ + { 3, TD, sys_poll, "poll" }, /* 16 */ + { 5, TD, sys_llseek, "_llseek" }, /* 17 */ + { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 18 */ + { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 19 */ + { 1, TD, sys_epoll_create, "epoll_create" }, /* 20 */ + { 2, TD|TF, sys_creat, "creat" }, /* 21 */ + { 2, TF, sys_truncate, "truncate" }, /* 22 */ + { 2, TD, sys_ftruncate, "ftruncate" }, /* 23 */ + { 3, TD, sys_readv, "readv" }, /* 24 */ + { 3, TD, sys_writev, "writev" }, /* 25 */ + { 1, TD, sys_fsync, "fsync" }, /* 26 */ + { 1, TD, sys_fdatasync, "fdatasync" }, /* 27 */ + { 4, TF, sys_truncate64, "truncate64" }, /* 28 */ + { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 29 */ + { 6, TD, sys_pread, "pread64" }, /* 30 */ + { 6, TD, sys_pwrite, "pwrite64" }, /* 31 */ + { 2, TF, sys_link, "link" }, /* 32 */ + { 2, TF, sys_rename, "rename" }, /* 33 */ + { 2, TF, sys_symlink, "symlink" }, /* 34 */ + { 3, TF, sys_readlink, "readlink" }, /* 35 */ + { 3, TF, sys_mknod, "mknod" }, /* 36 */ + { 1, TD, sys_pipe, "pipe" }, /* 37 */ + { 1, TF, sys_unlink, "unlink" }, /* 38 */ + { 1, TF, sys_rmdir, "rmdir" }, /* 39 */ + { 2, TF, sys_mkdir, "mkdir" }, /* 40 */ + { 1, TF, sys_chdir, "chdir" }, /* 41 */ + { 1, TD, sys_fchdir, "fchdir" }, /* 42 */ + { 2, TF, sys_getcwd, "getcwd" }, /* 43 */ + { 2, TF, sys_chmod, "chmod" }, /* 44 */ + { 3, TF, sys_chown, "chown" }, /* 45 */ + { 2, TF, sys_stat, "stat" }, /* 46 */ + { 2, TF, sys_stat64, "stat64" }, /* 47 */ + { 3, TF, sys_chown, "lchown" }, /* 48 */ + { 2, TF, sys_lstat, "lstat" }, /* 49 */ + { 2, TF, sys_lstat64, "lstat64" }, /* 50 */ + [51] = { }, + { 2, TD, sys_fchmod, "fchmod" }, /* 52 */ + { 3, TD, sys_fchown, "fchown" }, /* 53 */ + { 2, TD, sys_fstat, "fstat" }, /* 54 */ + { 2, TD, sys_fstat64, "fstat64" }, /* 55 */ + { 2, TD, sys_flock, "flock" }, /* 56 */ + { 2, TF, sys_access, "access" }, /* 57 */ + { 1, 0, sys_umask, "umask" }, /* 58 */ + { 3, TD, sys_getdents, "getdents" }, /* 59 */ + { 3, TD, sys_getdents64, "getdents64" }, /* 60 */ + { 3, TD, sys_fcntl, "fcntl64" }, /* 61 */ + { 6, TD, sys_fallocate, "fallocate" }, /* 62 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 63 */ + { 2, TF, sys_utime, "utime" }, /* 64 */ + { 2, TF, sys_utimes, "utimes" }, /* 65 */ + { 3, TD, sys_ioctl, "ioctl" }, /* 66 */ + { 3, TD, sys_fcntl, "fcntl" }, /* 67 */ + { 5, TF, sys_setxattr, "setxattr" }, /* 68 */ + { 4, TF, sys_getxattr, "getxattr" }, /* 69 */ + { 3, TF, sys_listxattr, "listxattr" }, /* 70 */ + { 2, TF, sys_removexattr, "removexattr" }, /* 71 */ + { 5, TF, sys_setxattr, "lsetxattr" }, /* 72 */ + { 4, TF, sys_getxattr, "lgetxattr" }, /* 73 */ + { 3, TF, sys_listxattr, "llistxattr" }, /* 74 */ + { 2, TF, sys_removexattr, "lremovexattr" }, /* 75 */ + { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 76 */ + { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 77 */ + { 3, TD, sys_flistxattr, "flistxattr" }, /* 78 */ + { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 79 */ + { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 80 */ + { 2, TM, sys_munmap, "munmap" }, /* 81 */ + { 3, TM, sys_mprotect, "mprotect" }, /* 82 */ + { 1, TM, sys_brk, "brk" }, /* 83 */ + { 2, TM, sys_mlock, "mlock" }, /* 84 */ + { 2, TM, sys_munlock, "munlock" }, /* 85 */ + { 1, TM, sys_mlockall, "mlockall" }, /* 86 */ + { 0, TM, sys_munlockall, "munlockall" }, /* 87 */ + { 4, TM, sys_mremap, "mremap" }, /* 88 */ + { 3, TM, sys_msync, "msync" }, /* 89 */ + { 3, TM, sys_mincore, "mincore" }, /* 90 */ + { 3, TM, sys_madvise, "madvise" }, /* 91 */ + { 4, TI, sys_shmget, "shmget" }, /* 92 */ + { 4, TI, sys_shmat, "shmat" }, /* 93 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 94 */ + { 4, TI, sys_shmdt, "shmdt" }, /* 95 */ + { 3, TN, sys_socket, "socket" }, /* 96 */ + { 5, TN, sys_setsockopt, "setsockopt" }, /* 97 */ + { 5, TN, sys_getsockopt, "getsockopt" }, /* 98 */ + { 2, TN, sys_shutdown, "shutdown" }, /* 99 */ + { 3, TN, sys_bind, "bind" }, /* 100 */ + { 3, TN, sys_connect, "connect" }, /* 101 */ + { 2, TN, sys_listen, "listen" }, /* 102 */ + { 3, TN, sys_accept, "accept" }, /* 103 */ + { 3, TN, sys_getsockname, "getsockname" }, /* 104 */ + { 3, TN, sys_getpeername, "getpeername" }, /* 105 */ + { 3, TN, sys_sendmsg, "sendmsg" }, /* 106 */ + { 3, TN, sys_recvmsg, "recvmsg" }, /* 107 */ + { 4, TN, sys_send, "send" }, /* 108 */ + { 4, TN, sys_recv, "recv" }, /* 109 */ + { 6, TN, sys_sendto, "sendto" }, /* 110 */ + { 6, TN, sys_recvfrom, "recvfrom" }, /* 111 */ + { 4, TN, sys_socketpair, "socketpair" }, /* 112 */ + { 4, TD|TN, sys_sendfile, "sendfile" }, /* 113 */ + { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 114 */ + { 4, TN, sys_sendmsg, "sendmsg" }, /* 115 */ + { 5, TP, sys_clone, "clone" }, /* 116 */ + { 3, TF|TP, sys_execve, "execve" }, /* 117 */ + { 1, TP, sys_exit, "exit" }, /* 118 */ + { 1, TP, sys_exit, "exit_group" }, /* 119 */ + { 0, 0, sys_getpid, "getpid" }, /* 120 */ + { 4, TP, sys_wait4, "wait4" }, /* 121 */ + { 5, TP, sys_waitid, "waitid" }, /* 122 */ + { 2, TS, sys_kill, "kill" }, /* 123 */ + { 2, TS, sys_kill, "tkill" }, /* 124 */ + { 3, TS, sys_tgkill, "tgkill" }, /* 125 */ + { 1, 0, printargs, "set_tid_address"}, /* 126 */ + { 0, 0, printargs, "gettid" }, /* 127 */ + { 0, 0, sys_setsid, "setsid" }, /* 128 */ + { 1, 0, sys_getsid, "getsid" }, /* 129 */ + { 5, 0, sys_prctl, "prctl" }, /* 130 */ + { 1, 0, sys_personality, "personality" }, /* 131 */ + { 2, 0, sys_getpriority, "getpriority" }, /* 132 */ + { 3, 0, sys_setpriority, "setpriority" }, /* 133 */ + { 3, 0, sys_setitimer, "setitimer" }, /* 134 */ + { 2, 0, sys_getitimer, "getitimer" }, /* 135 */ + { 1, 0, sys_setuid, "setuid" }, /* 136 */ + { 0, NF, sys_getuid, "getuid" }, /* 137 */ + { 1, 0, sys_setgid, "setgid" }, /* 138 */ + { 0, NF, sys_getgid, "getgid" }, /* 139 */ + { 0, NF, sys_geteuid, "geteuid" }, /* 140 */ + { 0, NF, sys_getegid, "getegid" }, /* 141 */ + { 2, 0, sys_setreuid, "setreuid" }, /* 142 */ + { 2, 0, sys_setregid, "setregid" }, /* 143 */ + { 3, 0, sys_setresuid, "setresuid" }, /* 144 */ + { 3, 0, sys_getresuid, "getresuid" }, /* 145 */ + { 3, 0, sys_setresgid, "setresgid" }, /* 146 */ + { 3, 0, sys_getresgid, "getresgid" }, /* 147 */ + { 2, 0, sys_setpgid, "setpgid" }, /* 148 */ + { 1, 0, sys_getpgid, "getpgid" }, /* 149 */ + { 0, 0, sys_getppid, "getppid" }, /* 150 */ + { 0, 0, sys_getpgrp, "getpgrp" }, /* 151 */ + [152 ... 153] = { }, + { 1, 0, sys_times, "times" }, /* 154 */ + { 1, TF, sys_acct, "acct" }, /* 155 */ + { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 156 */ + { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 157 */ + { 2, 0, sys_capget, "capget" }, /* 158 */ + { 2, 0, sys_capset, "capset" }, /* 159 */ + { 4, 0, sys_ptrace, "ptrace" }, /* 160 */ + { 5, TI, sys_semtimedop, "semtimedop" }, /* 161 */ + { 4, TI, sys_semget, "semget" }, /* 162 */ + { 4, TI, sys_semop, "semop" }, /* 163 */ + { 4, TI, sys_semctl, "semctl" }, /* 164 */ + [165] = { }, + { 4, TI, sys_msgget, "msgget" }, /* 166 */ + { 4, TI, sys_msgsnd, "msgsnd" }, /* 167 */ + { 4, TI, sys_msgrcv, "msgrcv" }, /* 168 */ + { 4, TI, sys_msgctl, "msgctl" }, /* 169 */ + [170] = { }, + { 2, TF, sys_umount2, "umount2" }, /* 171 */ + { 5, TF, sys_mount, "mount" }, /* 172 */ + { 2, TF, sys_swapon, "swapon" }, /* 173 */ + { 1, TF, sys_chroot, "chroot" }, /* 174 */ + { 2, TF, sys_pivotroot, "pivot_root" }, /* 175 */ + { 2, TF, sys_umount, "umount" }, /* 176 */ + { 1, TF, sys_swapoff, "swapoff" }, /* 177 */ + { 0, 0, sys_sync, "sync" }, /* 178 */ + [179] = { }, + { 1, NF, sys_setfsuid, "setfsuid" }, /* 180 */ + { 1, NF, sys_setfsgid, "setfsgid" }, /* 181 */ + { 3, 0, sys_sysfs, "sysfs" }, /* 182 */ + { 2, 0, sys_ustat, "ustat" }, /* 183 */ + { 2, TF, sys_statfs, "statfs" }, /* 184 */ + { 2, TD, sys_fstatfs, "fstatfs" }, /* 185 */ + { 3, TF, sys_statfs64, "statfs64" }, /* 186 */ + { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 187 */ + { 2, 0, sys_setrlimit, "setrlimit" }, /* 188 */ + { 2, 0, sys_getrlimit, "getrlimit" }, /* 189 */ + { 2, 0, sys_getrusage, "getrusage" }, /* 190 */ + { 5, 0, sys_futex, "futex" }, /* 191 */ + { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 192 */ + { 2, 0, sys_settimeofday, "settimeofday" }, /* 193 */ + { 1, 0, sys_adjtimex, "adjtimex" }, /* 194 */ + { 2, 0, sys_nanosleep, "nanosleep" }, /* 195 */ + { 2, 0, sys_getgroups, "getgroups" }, /* 196 */ + { 2, 0, sys_setgroups, "setgroups" }, /* 197 */ + { 2, 0, sys_sethostname, "sethostname" }, /* 198 */ + { 2, 0, sys_setdomainname, "setdomainname" }, /* 199 */ + { 3, 0, sys_syslog, "syslog" }, /* 200 */ + { 0, 0, sys_vhangup, "vhangup" }, /* 201 */ + { 1, TF, sys_uselib, "uselib" }, /* 202 */ + { 3, 0, sys_reboot, "reboot" }, /* 203 */ + { 4, TF, sys_quotactl, "quotactl" }, /* 204 */ + { 0, 0, printargs, "nfsservctl" }, /* 205 */ + { 1, 0, sys_sysctl, "_sysctl" }, /* 206 */ + { 2, 0, sys_bdflush, "bdflush" }, /* 207 */ + { 1, 0, sys_uname, "uname" }, /* 208 */ + { 1, 0, sys_sysinfo, "sysinfo" }, /* 209 */ + { 2, 0, sys_init_module, "init_module" }, /* 210 */ + { 1, 0, sys_delete_module, "delete_module" }, /* 211 */ + { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 212 */ + { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 213 */ + { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 214 */ + { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 215 */ + { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 216 */ + { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 217 */ + { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval"}, /* 218 */ + { 0, 0, sys_sched_yield, "sched_yield" }, /* 219 */ + [220 ... 222] = { }, + { 0, 0, printargs, "restart_syscall"}, /* 223 */ + { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 224 */ + { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 225 */ + { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 226 */ + { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 227 */ + { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 228 */ + { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 229 */ + { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 230 */ + { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 231 */ + { 4, 0, sys_mq_open, "mq_open" }, /* 232 */ + { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 233 */ + { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 234 */ + { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 235 */ + { 2, 0, sys_mq_notify, "mq_notify" }, /* 236 */ + { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 237 */ + [238] = { }, + { 2, 0, printargs, "io_setup" }, /* 239 */ + { 1, 0, printargs, "io_destroy" }, /* 240 */ + { 3, 0, printargs, "io_submit" }, /* 241 */ + { 5, 0, printargs, "io_getevents" }, /* 242 */ + { 3, 0, printargs, "io_cancel" }, /* 243 */ + { 2, 0, sys_clock_settime, "clock_settime" }, /* 244 */ + { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 245 */ + { 2, 0, sys_clock_getres, "clock_getres" }, /* 246 */ + { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 247 */ + { 3, 0, sys_timer_create, "timer_create" }, /* 248 */ + { 1, 0, sys_timer_delete, "timer_delete" }, /* 249 */ + { 4, 0, sys_timer_settime, "timer_settime" }, /* 250 */ + { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 251 */ + { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 252 */ + [253] = { }, + { 4, 0, printargs, "lookup_dcookie"}, /* 254 */ + [255] = { }, + { 5, 0, printargs, "add_key" }, /* 256 */ + { 5, 0, printargs, "request_key" }, /* 257 */ + { 5, 0, printargs, "keyctl" }, /* 258 */ + [259] = { }, + { 5, TD, sys_readahead, "readahead" }, /* 260 */ + { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 261 */ + { 5, TM, sys_migrate_pages, "migrate_pages" }, /* 262 */ + { 0, TM, sys_mbind, "mbind" }, /* 263 */ + { 6, TM, sys_get_mempolicy, "get_mempolicy" }, /* 264 */ + { 5, TM, sys_set_mempolicy, "set_mempolicy" }, /* 265 */ + { 3, TP, sys_unshare, "unshare" }, /* 266 */ + { 1, TM, sys_move_pages, "move_pages" }, /* 267 */ + { 0, TD, sys_splice, "splice" }, /* 268 */ + { 0, TD, sys_tee, "tee" }, /* 269 */ + { 0, TD, sys_vmsplice, "vmsplice" }, /* 270 */ + { 0, 0, printargs, "SYS_271" }, /* 271 */ + { 0, TD, sys_pselect6, "pselect6" }, /* 272 */ + { 0, TD, sys_ppoll, "ppoll" }, /* 273 */ + { 0, TD, sys_epoll_pwait, "epoll_pwait" }, /* 274 */ + { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 275 */ + { 0, TD, sys_inotify_init, "inotify_init" }, /* 276 */ + { 3, TD, sys_inotify_add_watch, "inotify_add_watch"}, /* 277 */ + { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch"}, /* 278 */ + { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 279 */ + { 0, 0, sys_getcpu, "getcpu" }, /* 280 */ + { 4, 0, sys_kexec_load, "kexec_load" }, /* 281 */ + { 2, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */ + { 3, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */ + { 3, 0, sys_set_robust_list, "set_robust_list"}, /* 284 */ + { 3, 0, sys_get_robust_list, "get_robust_list"}, /* 285 */ + { 0, 0, printargs, "SYS_286" }, /* 286 */ + { 0, 0, printargs, "SYS_287" }, /* 287 */ + { 4, TD|TF, sys_openat, "openat" }, /* 288 */ + { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */ + { 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */ + { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 291 */ + { 4, TD|TF, sys_renameat, "renameat" }, /* 292 */ + { 5, TD|TF, sys_linkat, "linkat" }, /* 293 */ + { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 294 */ + { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 295 */ + { 0, TD|TF, sys_utimensat, "utimensat" }, /* 296 */ + { 5, TD|TF, sys_fchownat, "fchownat" }, /* 297 */ + { 4, TD|TF, sys_futimesat, "futimesat" }, /* 298 */ + { 0, TD|TF, sys_newfstatat, "fstatat64" }, /* 299 */ + { 4, TD|TF, sys_fchmodat, "fchmodat" }, /* 300 */ + { 4, TD|TF, sys_faccessat, "faccessat" }, /* 301 */ + { 0, 0, printargs, "SYS_302" }, /* 302 */ + { 0, 0, printargs, "SYS_303" }, /* 303 */ + { 3, TD|TS, sys_signalfd, "signalfd" }, /* 304 */ + { 0, 0, printargs, "SYS_305" }, /* 305 */ + { 1, TD, sys_eventfd, "eventfd" }, /* 306 */ + { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 307 */ + { 2, TD, sys_setns, "setns" }, /* 308 */ + { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 309 */ + { 3, TD, sys_dup3, "dup3" }, /* 310 */ + { 2, TD, sys_pipe2, "pipe2" }, /* 311 */ + { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 312 */ + { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 313 */ + { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 314 */ + { 0, 0, printargs, "SYS_315" }, /* 315 */ + { 2, TD, sys_eventfd2, "eventfd2" }, /* 316 */ + { 6, TD, sys_preadv, "preadv" }, /* 317 */ + { 6, TD, sys_pwritev, "pwritev" }, /* 318 */ + [319] = { }, + { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 320 */ + { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 321 */ + { 6, 0, sys_process_vm_readv, "process_vm_readv"}, /* 322 */ + { 6, 0, sys_process_vm_writev, "process_vm_writev"}, /* 323 */ + { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 324 */ + { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 325 */ + { 6, TD, sys_sync_file_range2, "sync_file_range2"}, /* 326 */ + { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 327 */ + { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 328 */ + { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 329 */ + { 4, 0, sys_prlimit64, "prlimit64" }, /* 330 */ + { 5, 0, sys_kcmp, "kcmp" }, /* 331 */ + { 3, TD, sys_finit_module, "finit_module" }, /* 332 */ + { 4, TN, sys_accept4, "accept4" }, /* 333 */ diff --git a/alice-strace/loop.c b/alice-strace/loop.c new file mode 100644 index 0000000..a3f89e0 --- /dev/null +++ b/alice-strace/loop.c @@ -0,0 +1,191 @@ +/* + * 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 + +static const struct xlat loop_flags_options[] = { + { LO_FLAGS_READ_ONLY, "LO_FLAGS_READ_ONLY" }, +#if HAVE_DECL_LO_FLAGS_AUTOCLEAR + { LO_FLAGS_AUTOCLEAR, "LO_FLAGS_AUTOCLEAR" }, +#endif +#if HAVE_DECL_LO_FLAGS_PARTSCAN + { LO_FLAGS_PARTSCAN, "LO_FLAGS_PARTSCAN" }, +#endif + { 0, NULL }, +}; + +static const struct xlat loop_crypt_type_options[] = { + { LO_CRYPT_NONE, "LO_CRYPT_NONE" }, + { LO_CRYPT_XOR, "LO_CRYPT_XOR" }, + { LO_CRYPT_DES, "LO_CRYPT_DES" }, + { LO_CRYPT_FISH2, "LO_CRYPT_FISH2" }, + { LO_CRYPT_BLOW, "LO_CRYPT_BLOW" }, + { LO_CRYPT_CAST128, "LO_CRYPT_CAST128" }, + { LO_CRYPT_IDEA, "LO_CRYPT_IDEA" }, + { LO_CRYPT_DUMMY, "LO_CRYPT_DUMMY" }, + { LO_CRYPT_SKIPJACK, "LO_CRYPT_SKIPJACK" }, + { LO_CRYPT_CRYPTOAPI, "LO_CRYPT_CRYPTOAPI" }, + { 0, NULL }, +}; + +int loop_ioctl(struct tcb *tcp, long code, long arg) +{ + struct loop_info info; + struct loop_info64 info64; + char *s = alloca((LO_NAME_SIZE + LO_KEY_SIZE) * 4); + + if (entering(tcp)) + return 0; + + switch (code) { + + case LOOP_SET_STATUS: + case LOOP_GET_STATUS: + if (!verbose(tcp) || umove(tcp, arg, &info) < 0) + return 0; + + tprintf(", {number=%d", info.lo_number); + + if (!abbrev(tcp)) { + tprintf(", device=%#lx, inode=%lu, rdevice=%#lx", + (unsigned long) info.lo_device, + info.lo_inode, + (unsigned long) info.lo_rdevice); + } + + tprintf(", offset=%#x", info.lo_offset); + + if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) { + tprints(", encrypt_type="); + printxval(loop_crypt_type_options, info.lo_encrypt_type, + "LO_CRYPT_???"); + tprintf(", encrypt_key_size=%d", info.lo_encrypt_key_size); + } + + tprints(", flags="); + printflags(loop_flags_options, info.lo_flags, "LO_FLAGS_???"); + + string_quote(info.lo_name, s, -1, LO_NAME_SIZE); + tprintf(", name=%s", s); + + if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) { + string_quote((void *) info.lo_encrypt_key, s, 0, LO_KEY_SIZE); + tprintf(", encrypt_key=%s", s); + } + + if (!abbrev(tcp)) + tprintf(", init={%#lx, %#lx}" + ", reserved={%#x, %#x, %#x, %#x}}", + info.lo_init[0], info.lo_init[1], + info.reserved[0], info.reserved[1], + info.reserved[2], info.reserved[3]); + else + tprints(", ...}"); + + return 1; + + case LOOP_SET_STATUS64: + case LOOP_GET_STATUS64: + if (!verbose(tcp) || umove(tcp, arg, &info64) < 0) + return 0; + + tprints(", {"); + + if (!abbrev(tcp)) { + tprintf("device=%" PRIu64 ", inode=%" PRIu64 ", " + "rdevice=%" PRIu64 ", offset=%#" PRIx64 ", " + "sizelimit=%" PRIu64 ", number=%" PRIu32, + (uint64_t) info64.lo_device, + (uint64_t) info64.lo_inode, + (uint64_t) info64.lo_rdevice, + (uint64_t) info64.lo_offset, + (uint64_t) info64.lo_sizelimit, + (uint32_t) info64.lo_number); + } else { + tprintf("offset=%#" PRIx64 ", number=%" PRIu32, + (uint64_t) info64.lo_offset, + (uint32_t) info64.lo_number); + } + + if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) { + tprints(", encrypt_type="); + printxval(loop_crypt_type_options, info64.lo_encrypt_type, + "LO_CRYPT_???"); + tprintf(", encrypt_key_size=%" PRIu32, + info64.lo_encrypt_key_size); + } + + tprints(", flags="); + printflags(loop_flags_options, info64.lo_flags, "LO_FLAGS_???"); + + string_quote((void *) info64.lo_file_name, s, -1, LO_NAME_SIZE); + tprintf(", file_name=%s", s); + + if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) { + string_quote((void *) info64.lo_crypt_name, s, -1, LO_NAME_SIZE); + tprintf(", crypt_name=%s", s); + string_quote((void *) info64.lo_encrypt_key, s, 0, LO_KEY_SIZE); + tprintf(", encrypt_key=%s", s); + } + + if (!abbrev(tcp)) + tprintf(", init={%#" PRIx64 ", %#" PRIx64 "}}", + (uint64_t) info64.lo_init[0], + (uint64_t) info64.lo_init[1]); + else + tprints(", ...}"); + + return 1; + + 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 */ + return 1; + + case LOOP_SET_FD: + case LOOP_CHANGE_FD: +#ifdef LOOP_CTL_ADD + /* newer loop-control stuff */ + case LOOP_CTL_ADD: + case LOOP_CTL_REMOVE: +#endif + /* These take simple args, so let default printer handle it */ + + default: + return 0; + } +} diff --git a/alice-strace/m4/includedir.m4 b/alice-strace/m4/includedir.m4 new file mode 100644 index 0000000..dd859bb --- /dev/null +++ b/alice-strace/m4/includedir.m4 @@ -0,0 +1,23 @@ +dnl ### A macro to find the include directory, useful for cross-compiling. +AC_DEFUN([AC_INCLUDEDIR], +[AC_REQUIRE([AC_PROG_AWK])dnl +AC_SUBST(includedir) +AC_MSG_CHECKING(for primary include directory) +includedir=/usr/include +if test -n "$GCC" +then + >conftest.c + new_includedir=` + $CC -v -E conftest.c 2>&1 | $AWK ' + /^End of search list/ { print last; exit } + { last = [$]1 } + ' + ` + rm -f conftest.c + if test -n "$new_includedir" && test -d "$new_includedir" + then + includedir=$new_includedir + fi +fi +AC_MSG_RESULT($includedir) +]) diff --git a/alice-strace/m4/long_long.m4 b/alice-strace/m4/long_long.m4 new file mode 100644 index 0000000..7d9aac0 --- /dev/null +++ b/alice-strace/m4/long_long.m4 @@ -0,0 +1,44 @@ +dnl ### A macro to determine if off_t is a long long +AC_DEFUN([AC_OFF_T_IS_LONG_LONG], +[AC_MSG_CHECKING(for long long off_t) +AC_CACHE_VAL(ac_cv_have_long_long_off_t, +[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include +char a[(sizeof (off_t) == sizeof (long long) && + sizeof (off_t) > sizeof (long)) - 1]; +]])],[ac_cv_have_long_long_off_t=yes],[ac_cv_have_long_long_off_t=no])]) +AC_MSG_RESULT($ac_cv_have_long_long_off_t) +if test "$ac_cv_have_long_long_off_t" = yes +then + AC_DEFINE([HAVE_LONG_LONG_OFF_T], 1, [Define if off_t is a long long.]) +fi +]) + +dnl ### A macro to determine endianness of long long +AC_DEFUN([AC_LITTLE_ENDIAN_LONG_LONG], +[AC_MSG_CHECKING(for little endian long long) +AC_CACHE_VAL(ac_cv_have_little_endian_long_long, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ +int main () { + union { + long long ll; + int l [2]; + } u; + u.ll = 0x12345678; + if (u.l[0] == 0x12345678) + return 0; + return 1; +} +]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[ +if test "x$ac_cv_c_bigendian" = "xyes"; then + ac_cv_have_little_endian_long_long=no +else + ac_cv_have_little_endian_long_long=yes +fi +])]) +AC_MSG_RESULT($ac_cv_have_little_endian_long_long) +if test "$ac_cv_have_little_endian_long_long" = yes +then + AC_DEFINE([HAVE_LITTLE_ENDIAN_LONG_LONG], 1, +[Define if long long is little-endian.]) +fi +]) diff --git a/alice-strace/m4/stat.m4 b/alice-strace/m4/stat.m4 new file mode 100644 index 0000000..bf0e480 --- /dev/null +++ b/alice-strace/m4/stat.m4 @@ -0,0 +1,16 @@ +dnl ### A macro to determine whether stat64 is defined. +AC_DEFUN([AC_STAT64], +[AC_MSG_CHECKING(for stat64 in (asm|sys)/stat.h) +AC_CACHE_VAL(ac_cv_type_stat64, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include +]], [[struct stat64 st;]])],[ac_cv_type_stat64=yes],[ac_cv_type_stat64=no])]) +AC_MSG_RESULT($ac_cv_type_stat64) +if test "$ac_cv_type_stat64" = yes +then + AC_DEFINE([HAVE_STAT64], 1, +[Define if stat64 is available in asm/stat.h.]) +fi +]) diff --git a/alice-strace/m4/statfs.m4 b/alice-strace/m4/statfs.m4 new file mode 100644 index 0000000..1a2f971 --- /dev/null +++ b/alice-strace/m4/statfs.m4 @@ -0,0 +1,15 @@ +dnl ### A macro to determine whether statfs64 is defined. +AC_DEFUN([AC_STATFS64], +[AC_MSG_CHECKING(for statfs64 in sys/vfs.h) +AC_CACHE_VAL(ac_cv_type_statfs64, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])]) +AC_MSG_RESULT($ac_cv_type_statfs64) +if test "$ac_cv_type_statfs64" = yes +then + AC_DEFINE([HAVE_STATFS64], 1, +[Define if statfs64 is available in sys/vfs.h.]) +fi +]) diff --git a/alice-strace/m4/warnings.m4 b/alice-strace/m4/warnings.m4 new file mode 100644 index 0000000..dad5c1f --- /dev/null +++ b/alice-strace/m4/warnings.m4 @@ -0,0 +1,36 @@ +# warnings.m4 serial 2 +dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_AS_VAR_APPEND(VAR, VALUE) +# ---------------------------- +# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. +m4_ifdef([AS_VAR_APPEND], +[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], +[m4_define([gl_AS_VAR_APPEND], +[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) + +# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS]) +# ------------------------------------------------ +# Adds parameter to WARN_CFLAGS if the compiler supports it. For example, +# gl_WARN_ADD([-Wparentheses]). +AC_DEFUN([gl_WARN_ADD], +[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl +AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [ + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="${CPPFLAGS} $1" + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])], + [AS_VAR_SET([gl_Warn], [yes])], + [AS_VAR_SET([gl_Warn], [no])]) + CPPFLAGS="$save_CPPFLAGS" +]) +AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl +AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])]) +AS_VAR_POPDEF([gl_Flags])dnl +AS_VAR_POPDEF([gl_Warn])dnl +m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl +]) diff --git a/alice-strace/mem.c b/alice-strace/mem.c new file mode 100644 index 0000000..a86172f --- /dev/null +++ b/alice-strace/mem.c @@ -0,0 +1,982 @@ +/* + * 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) 2000 PocketPenguins Inc. Linux for Hitachi SuperH + * port by Greg Banks + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 +#if defined(I386) +# include +# ifdef HAVE_STRUCT_USER_DESC +# define modify_ldt_ldt_s user_desc +# endif +#endif + +static unsigned long +get_pagesize() +{ + static unsigned long pagesize; + + if (!pagesize) + pagesize = sysconf(_SC_PAGESIZE); + return pagesize; +} + +int +sys_brk(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx", tcp->u_arg[0]); + } + return RVAL_HEX; +} + +static const struct xlat mmap_prot[] = { + { PROT_NONE, "PROT_NONE", }, + { PROT_READ, "PROT_READ" }, + { PROT_WRITE, "PROT_WRITE" }, + { PROT_EXEC, "PROT_EXEC" }, +#ifdef PROT_SEM + { PROT_SEM, "PROT_SEM" }, +#endif +#ifdef PROT_GROWSDOWN + { PROT_GROWSDOWN,"PROT_GROWSDOWN"}, +#endif +#ifdef PROT_GROWSUP + { PROT_GROWSUP, "PROT_GROWSUP" }, +#endif +#ifdef PROT_SAO + { PROT_SAO, "PROT_SAO" }, +#endif + { 0, NULL }, +}; + +static const struct xlat mmap_flags[] = { + { MAP_SHARED, "MAP_SHARED" }, + { MAP_PRIVATE, "MAP_PRIVATE" }, + { MAP_FIXED, "MAP_FIXED" }, +#ifdef MAP_ANONYMOUS + { MAP_ANONYMOUS,"MAP_ANONYMOUS" }, +#endif +#ifdef MAP_32BIT + { MAP_32BIT, "MAP_32BIT" }, +#endif +#ifdef MAP_RENAME + { MAP_RENAME, "MAP_RENAME" }, +#endif +#ifdef MAP_NORESERVE + { MAP_NORESERVE,"MAP_NORESERVE" }, +#endif +#ifdef MAP_POPULATE + { MAP_POPULATE, "MAP_POPULATE" }, +#endif +#ifdef MAP_NONBLOCK + { MAP_NONBLOCK, "MAP_NONBLOCK" }, +#endif + /* + * XXX - this was introduced in SunOS 4.x to distinguish between + * the old pre-4.x "mmap()", which: + * + * only let you map devices with an "mmap" routine (e.g., + * frame buffers) in; + * + * required you to specify the mapping address; + * + * returned 0 on success and -1 on failure; + * + * memory and which, and the 4.x "mmap()" which: + * + * can map plain files; + * + * can be asked to pick where to map the file; + * + * returns the address where it mapped the file on success + * and -1 on failure. + * + * It's not actually used in source code that calls "mmap()"; the + * "mmap()" routine adds it for you. + * + * It'd be nice to come up with some way of eliminating it from + * the flags, e.g. reporting calls *without* it as "old_mmap()" + * and calls with it as "mmap()". + */ +#ifdef _MAP_NEW + { _MAP_NEW, "_MAP_NEW" }, +#endif +#ifdef MAP_GROWSDOWN + { MAP_GROWSDOWN,"MAP_GROWSDOWN" }, +#endif +#ifdef MAP_DENYWRITE + { MAP_DENYWRITE,"MAP_DENYWRITE" }, +#endif +#ifdef MAP_EXECUTABLE + { MAP_EXECUTABLE,"MAP_EXECUTABLE"}, +#endif +#ifdef MAP_INHERIT + { MAP_INHERIT, "MAP_INHERIT" }, +#endif +#ifdef MAP_FILE + { MAP_FILE, "MAP_FILE" }, +#endif +#ifdef MAP_LOCKED + { MAP_LOCKED, "MAP_LOCKED" }, +#endif + /* FreeBSD ones */ +#if defined(MAP_ANON) && (!defined(MAP_ANONYMOUS) || MAP_ANON != MAP_ANONYMOUS) + { MAP_ANON, "MAP_ANON" }, +#endif +#ifdef MAP_HASSEMAPHORE + { MAP_HASSEMAPHORE,"MAP_HASSEMAPHORE"}, +#endif +#ifdef MAP_STACK + { MAP_STACK, "MAP_STACK" }, +#endif +#if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED > 0 + { MAP_UNINITIALIZED,"MAP_UNINITIALIZED"}, +#endif +#ifdef MAP_NOSYNC + { MAP_NOSYNC, "MAP_NOSYNC" }, +#endif +#ifdef MAP_NOCORE + { MAP_NOCORE, "MAP_NOCORE" }, +#endif +#ifdef TILE + { MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" }, + { MAP_CACHE_NO_L2, "MAP_CACHE_NO_L2" }, + { MAP_CACHE_NO_L1, "MAP_CACHE_NO_L1" }, +#endif + { 0, NULL }, +}; + +#ifdef TILE +static int +addtileflags(long flags) +{ + long home = flags & _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK); + flags &= ~_MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK); + + if (flags & _MAP_CACHE_INCOHERENT) { + flags &= ~_MAP_CACHE_INCOHERENT; + if (home == MAP_CACHE_HOME_NONE) { + tprints("|MAP_CACHE_INCOHERENT"); + return flags; + } + tprints("|_MAP_CACHE_INCOHERENT"); + } + + switch (home) { + case 0: break; + case MAP_CACHE_HOME_HERE: tprints("|MAP_CACHE_HOME_HERE"); break; + case MAP_CACHE_HOME_NONE: tprints("|MAP_CACHE_HOME_NONE"); break; + case MAP_CACHE_HOME_SINGLE: tprints("|MAP_CACHE_HOME_SINGLE"); break; + case MAP_CACHE_HOME_TASK: tprints("|MAP_CACHE_HOME_TASK"); break; + case MAP_CACHE_HOME_HASH: tprints("|MAP_CACHE_HOME_HASH"); break; + default: + tprintf("|MAP_CACHE_HOME(%ld)", + (home >> _MAP_CACHE_HOME_SHIFT) ); + break; + } + + return flags; +} +#endif + +static int +print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset) +{ + if (entering(tcp)) { + /* addr */ + if (!u_arg[0]) + tprints("NULL, "); + else + tprintf("%#lx, ", u_arg[0]); + /* len */ + tprintf("%lu, ", u_arg[1]); + /* prot */ + printflags(mmap_prot, u_arg[2], "PROT_???"); + tprints(", "); + /* flags */ +#ifdef MAP_TYPE + printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???"); +# ifdef TILE + addflags(mmap_flags, addtileflags(u_arg[3] & ~MAP_TYPE)); +# else + addflags(mmap_flags, u_arg[3] & ~MAP_TYPE); +# endif +#else + printflags(mmap_flags, u_arg[3], "MAP_???"); +#endif + tprints(", "); + /* fd */ + printfd(tcp, u_arg[4]); + /* offset */ + tprintf(", %#llx", offset); + } + return RVAL_HEX; +} + +/* Syscall name<->function correspondence is messed up on many arches. + * For example: + * i386 has __NR_mmap == 90, and it is "old mmap", and + * also it has __NR_mmap2 == 192, which is a "new mmap with page offsets". + * But x86_64 has just one __NR_mmap == 9, a "new mmap with byte offsets". + * Confused? Me too! + */ + +/* Params are pointed to by u_arg[0], offset is in bytes */ +int +sys_old_mmap(struct tcb *tcp) +{ + long u_arg[6]; +#if defined(IA64) + /* + * IA64 processes never call this routine, they only use the + * new 'sys_mmap' interface. Only IA32 processes come here. + */ + int i; + unsigned narrow_arg[6]; + if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), (char *) narrow_arg) == -1) + return 0; + for (i = 0; i < 6; i++) + u_arg[i] = (unsigned long) narrow_arg[i]; +#elif defined(X86_64) + /* We are here only in personality 1 (i386) */ + int i; + unsigned narrow_arg[6]; + if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), (char *) narrow_arg) == -1) + return 0; + for (i = 0; i < 6; ++i) + u_arg[i] = (unsigned long) narrow_arg[i]; +#else + if (umoven(tcp, tcp->u_arg[0], sizeof(u_arg), (char *) u_arg) == -1) + return 0; +#endif + return print_mmap(tcp, u_arg, (unsigned long) u_arg[5]); +} + +#if defined(S390) +/* Params are pointed to by u_arg[0], offset is in pages */ +int +sys_old_mmap_pgoff(struct tcb *tcp) +{ + long u_arg[5]; + int i; + unsigned narrow_arg[6]; + unsigned long long offset; + if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), (char *) narrow_arg) == -1) + return 0; + for (i = 0; i < 5; i++) + u_arg[i] = (unsigned long) narrow_arg[i]; + offset = narrow_arg[5]; + offset *= get_pagesize(); + return print_mmap(tcp, u_arg, offset); +} +#endif + +/* Params are passed directly, offset is in bytes */ +int +sys_mmap(struct tcb *tcp) +{ + unsigned long long offset = (unsigned long) tcp->u_arg[5]; +#if defined(LINUX_MIPSN32) || defined(X32) + /* Try test/x32_mmap.c */ + offset = tcp->ext_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. + */ + int ret = print_mmap(tcp, tcp->u_arg, offset); + + if (!entering(tcp)) { + delete_mmap_cache(tcp); + } + + return ret; +} + +/* Params are passed directly, offset is in pages */ +int +sys_mmap_pgoff(struct tcb *tcp) +{ + /* Try test/mmap_offset_decode.c */ + unsigned long long offset; + offset = (unsigned long) tcp->u_arg[5]; + offset *= get_pagesize(); + return print_mmap(tcp, tcp->u_arg, offset); +} + +/* Params are passed directly, offset is in 4k units */ +int +sys_mmap_4koff(struct tcb *tcp) +{ + unsigned long long offset; + offset = (unsigned long) tcp->u_arg[5]; + offset <<= 12; + return print_mmap(tcp, tcp->u_arg, offset); +} + +int +sys_munmap(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu", + tcp->u_arg[0], tcp->u_arg[1]); + } + + if (!entering(tcp)) { + delete_mmap_cache(tcp); + } + + return 0; +} + +int +sys_mprotect(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", + tcp->u_arg[0], tcp->u_arg[1]); + printflags(mmap_prot, tcp->u_arg[2], "PROT_???"); + } + + if (!entering(tcp)) { + delete_mmap_cache(tcp); + } + + return 0; +} + +static const struct xlat mremap_flags[] = { + { MREMAP_MAYMOVE, "MREMAP_MAYMOVE" }, +#ifdef MREMAP_FIXED + { MREMAP_FIXED, "MREMAP_FIXED" }, +#endif + { 0, NULL } +}; + +int +sys_mremap(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1], + tcp->u_arg[2]); + printflags(mremap_flags, tcp->u_arg[3], "MREMAP_???"); +#ifdef MREMAP_FIXED + if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) == + (MREMAP_MAYMOVE | MREMAP_FIXED)) + tprintf(", %#lx", tcp->u_arg[4]); +#endif + } + return RVAL_HEX; +} + +static const struct xlat madvise_cmds[] = { +#ifdef MADV_NORMAL + { MADV_NORMAL, "MADV_NORMAL" }, +#endif +#ifdef MADV_RANDOM + { MADV_RANDOM, "MADV_RANDOM" }, +#endif +#ifdef MADV_SEQUENTIAL + { MADV_SEQUENTIAL, "MADV_SEQUENTIAL" }, +#endif +#ifdef MADV_WILLNEED + { MADV_WILLNEED, "MADV_WILLNEED" }, +#endif +#ifdef MADV_DONTNEED + { MADV_DONTNEED, "MADV_DONTNEED" }, +#endif +#ifdef MADV_REMOVE + { MADV_REMOVE, "MADV_REMOVE" }, +#endif +#ifdef MADV_DONTFORK + { MADV_DONTFORK, "MADV_DONTFORK" }, +#endif +#ifdef MADV_DOFORK + { MADV_DOFORK, "MADV_DOFORK" }, +#endif +#ifdef MADV_HWPOISON + { MADV_HWPOISON, "MADV_HWPOISON" }, +#endif +#ifdef MADV_SOFT_OFFLINE + { MADV_SOFT_OFFLINE, "MADV_SOFT_OFFLINE" }, +#endif +#ifdef MADV_MERGEABLE + { MADV_MERGEABLE, "MADV_MERGEABLE" }, +#endif +#ifdef MADV_UNMERGEABLE + { MADV_UNMERGEABLE, "MADV_UNMERGEABLE" }, +#endif +#ifdef MADV_HUGEPAGE + { MADV_HUGEPAGE, "MADV_HUGEPAGE" }, +#endif +#ifdef MADV_NOHUGEPAGE + { MADV_NOHUGEPAGE, "MADV_NOHUGEPAGE" }, +#endif +#ifdef MADV_DONTDUMP + { MADV_DONTDUMP, "MADV_DONTDUMP" }, +#endif +#ifdef MADV_DODUMP + { MADV_DODUMP, "MADV_DODUMP" }, +#endif + { 0, NULL }, +}; + +int +sys_madvise(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + printxval(madvise_cmds, tcp->u_arg[2], "MADV_???"); + } + return 0; +} + +static const struct xlat mlockall_flags[] = { +#ifdef MCL_CURRENT + { MCL_CURRENT, "MCL_CURRENT" }, +#endif +#ifdef MCL_FUTURE + { MCL_FUTURE, "MCL_FUTURE" }, +#endif + { 0, NULL} +}; + +int +sys_mlockall(struct tcb *tcp) +{ + if (entering(tcp)) { + printflags(mlockall_flags, tcp->u_arg[0], "MCL_???"); + } + return 0; +} + +#ifdef MS_ASYNC + +static const struct xlat mctl_sync[] = { +#ifdef MS_SYNC + { MS_SYNC, "MS_SYNC" }, +#endif + { MS_ASYNC, "MS_ASYNC" }, + { MS_INVALIDATE,"MS_INVALIDATE" }, + { 0, NULL }, +}; + +int +sys_msync(struct tcb *tcp) +{ + if (entering(tcp)) { + /* addr */ + tprintf("%#lx", tcp->u_arg[0]); + /* len */ + tprintf(", %lu, ", tcp->u_arg[1]); + /* flags */ + printflags(mctl_sync, tcp->u_arg[2], "MS_???"); + } + return 0; +} + +#endif /* MS_ASYNC */ + +#ifdef MC_SYNC + +static const struct xlat mctl_funcs[] = { + { MC_LOCK, "MC_LOCK" }, + { MC_LOCKAS, "MC_LOCKAS" }, + { MC_SYNC, "MC_SYNC" }, + { MC_UNLOCK, "MC_UNLOCK" }, + { MC_UNLOCKAS, "MC_UNLOCKAS" }, + { 0, NULL }, +}; + +static const struct xlat mctl_lockas[] = { + { MCL_CURRENT, "MCL_CURRENT" }, + { MCL_FUTURE, "MCL_FUTURE" }, + { 0, NULL }, +}; + +int +sys_mctl(struct tcb *tcp) +{ + int arg, function; + + if (entering(tcp)) { + /* addr */ + tprintf("%#lx", tcp->u_arg[0]); + /* len */ + tprintf(", %lu, ", tcp->u_arg[1]); + /* function */ + function = tcp->u_arg[2]; + printflags(mctl_funcs, function, "MC_???"); + /* arg */ + arg = tcp->u_arg[3]; + tprints(", "); + switch (function) { + case MC_SYNC: + printflags(mctl_sync, arg, "MS_???"); + break; + case MC_LOCKAS: + printflags(mctl_lockas, arg, "MCL_???"); + break; + default: + tprintf("%#x", arg); + break; + } + } + return 0; +} + +#endif /* MC_SYNC */ + +int +sys_mincore(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + } else { + unsigned long i, len; + char *vec = NULL; + + len = tcp->u_arg[1]; + if (syserror(tcp) || tcp->u_arg[2] == 0 || + (vec = malloc(len)) == NULL || + umoven(tcp, tcp->u_arg[2], len, vec) < 0) + tprintf("%#lx", tcp->u_arg[2]); + else { + tprints("["); + for (i = 0; i < len; i++) { + if (abbrev(tcp) && i >= max_strlen) { + tprints("..."); + break; + } + tprints((vec[i] & 1) ? "1" : "0"); + } + tprints("]"); + } + free(vec); + } + return 0; +} + +#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64) +int +sys_getpagesize(struct tcb *tcp) +{ + if (exiting(tcp)) + return RVAL_HEX; + return 0; +} +#endif + +#if defined(I386) +void +print_ldt_entry(struct modify_ldt_ldt_s *ldt_entry) +{ + tprintf("base_addr:%#08lx, " + "limit:%d, " + "seg_32bit:%d, " + "contents:%d, " + "read_exec_only:%d, " + "limit_in_pages:%d, " + "seg_not_present:%d, " + "useable:%d}", + (long) ldt_entry->base_addr, + ldt_entry->limit, + ldt_entry->seg_32bit, + ldt_entry->contents, + ldt_entry->read_exec_only, + ldt_entry->limit_in_pages, + ldt_entry->seg_not_present, + ldt_entry->useable); +} + +int +sys_modify_ldt(struct tcb *tcp) +{ + if (entering(tcp)) { + struct modify_ldt_ldt_s copy; + tprintf("%ld", tcp->u_arg[0]); + if (tcp->u_arg[1] == 0 + || tcp->u_arg[2] != sizeof(struct modify_ldt_ldt_s) + || umove(tcp, tcp->u_arg[1], ©) == -1) + tprintf(", %lx", tcp->u_arg[1]); + else { + tprintf(", {entry_number:%d, ", copy.entry_number); + if (!verbose(tcp)) + tprints("...}"); + else { + print_ldt_entry(©); + } + } + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +int +sys_set_thread_area(struct tcb *tcp) +{ + struct modify_ldt_ldt_s copy; + if (entering(tcp)) { + if (umove(tcp, tcp->u_arg[0], ©) != -1) { + if (copy.entry_number == -1) + tprintf("{entry_number:%d -> ", + copy.entry_number); + else + tprints("{entry_number:"); + } + } else { + if (umove(tcp, tcp->u_arg[0], ©) != -1) { + tprintf("%d, ", copy.entry_number); + if (!verbose(tcp)) + tprints("...}"); + else { + print_ldt_entry(©); + } + } else { + tprintf("%lx", tcp->u_arg[0]); + } + } + return 0; + +} + +int +sys_get_thread_area(struct tcb *tcp) +{ + struct modify_ldt_ldt_s copy; + if (exiting(tcp)) { + if (umove(tcp, tcp->u_arg[0], ©) != -1) { + tprintf("{entry_number:%d, ", copy.entry_number); + if (!verbose(tcp)) + tprints("...}"); + else { + print_ldt_entry(©); + } + } else { + tprintf("%lx", tcp->u_arg[0]); + } + } + return 0; + +} +#endif /* I386 */ + +#if defined(M68K) +int +sys_set_thread_area(struct tcb *tcp) +{ + if (entering(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + return 0; + +} + +int +sys_get_thread_area(struct tcb *tcp) +{ + return RVAL_HEX; +} +#endif + +int +sys_remap_file_pages(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + printflags(mmap_prot, tcp->u_arg[2], "PROT_???"); + tprintf(", %lu, ", tcp->u_arg[3]); +#ifdef MAP_TYPE + printxval(mmap_flags, tcp->u_arg[4] & MAP_TYPE, "MAP_???"); + addflags(mmap_flags, tcp->u_arg[4] & ~MAP_TYPE); +#else + printflags(mmap_flags, tcp->u_arg[4], "MAP_???"); +#endif + } + return 0; +} + +#define MPOL_DEFAULT 0 +#define MPOL_PREFERRED 1 +#define MPOL_BIND 2 +#define MPOL_INTERLEAVE 3 + +#define MPOL_F_NODE (1<<0) +#define MPOL_F_ADDR (1<<1) + +#define MPOL_MF_STRICT (1<<0) +#define MPOL_MF_MOVE (1<<1) +#define MPOL_MF_MOVE_ALL (1<<2) + +static const struct xlat policies[] = { + { MPOL_DEFAULT, "MPOL_DEFAULT" }, + { MPOL_PREFERRED, "MPOL_PREFERRED" }, + { MPOL_BIND, "MPOL_BIND" }, + { MPOL_INTERLEAVE, "MPOL_INTERLEAVE" }, + { 0, NULL } +}; + +static const struct xlat mbindflags[] = { + { MPOL_MF_STRICT, "MPOL_MF_STRICT" }, + { MPOL_MF_MOVE, "MPOL_MF_MOVE" }, + { MPOL_MF_MOVE_ALL, "MPOL_MF_MOVE_ALL" }, + { 0, NULL } +}; + +static const struct xlat mempolicyflags[] = { + { MPOL_F_NODE, "MPOL_F_NODE" }, + { MPOL_F_ADDR, "MPOL_F_ADDR" }, + { 0, NULL } +}; + +static const struct xlat move_pages_flags[] = { + { MPOL_MF_MOVE, "MPOL_MF_MOVE" }, + { MPOL_MF_MOVE_ALL, "MPOL_MF_MOVE_ALL" }, + { 0, NULL } +}; + +static void +get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err) +{ + unsigned long nlongs, size, end; + + nlongs = (maxnodes + 8 * sizeof(long) - 1) / (8 * sizeof(long)); + size = nlongs * sizeof(long); + end = ptr + size; + if (nlongs == 0 || ((err || verbose(tcp)) && (size * 8 == maxnodes) + && (end > ptr))) { + unsigned long n, cur, abbrev_end; + int failed = 0; + + if (abbrev(tcp)) { + abbrev_end = ptr + max_strlen * sizeof(long); + if (abbrev_end < ptr) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints(", {"); + for (cur = ptr; cur < end; cur += sizeof(long)) { + if (cur > ptr) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof(n), (char *) &n) < 0) { + tprints("?"); + failed = 1; + break; + } + tprintf("%#0*lx", (int) sizeof(long) * 2 + 2, n); + } + tprints("}"); + if (failed) + tprintf(" %#lx", ptr); + } else + tprintf(", %#lx", ptr); + tprintf(", %lu", maxnodes); +} + +int +sys_mbind(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + printxval(policies, tcp->u_arg[2], "MPOL_???"); + get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0); + tprints(", "); + printflags(mbindflags, tcp->u_arg[5], "MPOL_???"); + } + return 0; +} + +int +sys_set_mempolicy(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(policies, tcp->u_arg[0], "MPOL_???"); + get_nodes(tcp, tcp->u_arg[1], tcp->u_arg[2], 0); + } + return 0; +} + +int +sys_get_mempolicy(struct tcb *tcp) +{ + if (exiting(tcp)) { + int pol; + if (tcp->u_arg[0] == 0) + tprints("NULL"); + else if (syserror(tcp) || umove(tcp, tcp->u_arg[0], &pol) < 0) + tprintf("%#lx", tcp->u_arg[0]); + else + printxval(policies, pol, "MPOL_???"); + get_nodes(tcp, tcp->u_arg[1], tcp->u_arg[2], syserror(tcp)); + tprintf(", %#lx, ", tcp->u_arg[3]); + printflags(mempolicyflags, tcp->u_arg[4], "MPOL_???"); + } + return 0; +} + +int +sys_migrate_pages(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); + get_nodes(tcp, tcp->u_arg[2], tcp->u_arg[1], 0); + tprints(", "); + get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[1], 0); + } + return 0; +} + +int +sys_move_pages(struct tcb *tcp) +{ + if (entering(tcp)) { + unsigned long npages = tcp->u_arg[1]; + tprintf("%ld, %lu, ", tcp->u_arg[0], npages); + if (tcp->u_arg[2] == 0) + tprints("NULL, "); + else { + int i; + long puser = tcp->u_arg[2]; + tprints("{"); + for (i = 0; i < npages; ++i) { + void *p; + if (i > 0) + tprints(", "); + if (umove(tcp, puser, &p) < 0) { + tprints("???"); + break; + } + tprintf("%p", p); + puser += sizeof(void *); + } + tprints("}, "); + } + if (tcp->u_arg[3] == 0) + tprints("NULL, "); + else { + int i; + long nodeuser = tcp->u_arg[3]; + tprints("{"); + for (i = 0; i < npages; ++i) { + int node; + if (i > 0) + tprints(", "); + if (umove(tcp, nodeuser, &node) < 0) { + tprints("???"); + break; + } + tprintf("%#x", node); + nodeuser += sizeof(int); + } + tprints("}, "); + } + } + if (exiting(tcp)) { + unsigned long npages = tcp->u_arg[1]; + if (tcp->u_arg[4] == 0) + tprints("NULL, "); + else { + int i; + long statususer = tcp->u_arg[4]; + tprints("{"); + for (i = 0; i < npages; ++i) { + int status; + if (i > 0) + tprints(", "); + if (umove(tcp, statususer, &status) < 0) { + tprints("???"); + break; + } + tprintf("%#x", status); + statususer += sizeof(int); + } + tprints("}, "); + } + printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???"); + } + return 0; +} + +#if defined(POWERPC) +int +sys_subpage_prot(struct tcb *tcp) +{ + if (entering(tcp)) { + unsigned long cur, end, abbrev_end, entries; + unsigned int entry; + + tprintf("%#lx, %#lx, ", tcp->u_arg[0], tcp->u_arg[1]); + entries = tcp->u_arg[1] >> 16; + if (!entries || !tcp->u_arg[2]) { + tprints("{}"); + return 0; + } + cur = tcp->u_arg[2]; + end = cur + (sizeof(int) * entries); + if (!verbose(tcp) || end < tcp->u_arg[2]) { + tprintf("%#lx", tcp->u_arg[2]); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = cur + (sizeof(int) * max_strlen); + if (abbrev_end > end) + abbrev_end = end; + } + else + abbrev_end = end; + tprints("{"); + for (; cur < end; cur += sizeof(int)) { + if (cur > tcp->u_arg[2]) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umove(tcp, cur, &entry) < 0) { + tprintf("??? [%#lx]", cur); + break; + } + else + tprintf("%#08x", entry); + } + tprints("}"); + } + + return 0; +} +#endif diff --git a/alice-strace/missing b/alice-strace/missing new file mode 100755 index 0000000..86a8fc3 --- /dev/null +++ b/alice-strace/missing @@ -0,0 +1,331 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2012-01-06.13; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Originally 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 + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +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 + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# 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/alice-strace/mtd.c b/alice-strace/mtd.c new file mode 100644 index 0000000..5385147 --- /dev/null +++ b/alice-strace/mtd.c @@ -0,0 +1,408 @@ +/* + * 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 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) +# include "ubi-user.h" +#else +# include +#endif + +static const struct xlat mtd_mode_options[] = { + { MTD_OPS_PLACE_OOB, "MTD_OPS_PLACE_OOB" }, + { MTD_OPS_AUTO_OOB, "MTD_OPS_AUTO_OOB" }, + { MTD_OPS_RAW, "MTD_OPS_RAW" }, + { 0, NULL }, +}; + +static const struct xlat mtd_type_options[] = { + { MTD_ABSENT, "MTD_ABSENT" }, + { MTD_RAM, "MTD_RAM" }, + { MTD_ROM, "MTD_ROM" }, + { MTD_NORFLASH, "MTD_NORFLASH" }, + { MTD_NANDFLASH, "MTD_NANDFLASH" }, + { MTD_DATAFLASH, "MTD_DATAFLASH" }, + { MTD_UBIVOLUME, "MTD_UBIVOLUME" }, + { MTD_MLCNANDFLASH, "MTD_MLCNANDFLASH" }, + { 0, NULL }, +}; + +static const struct xlat mtd_flags_options[] = { + { MTD_WRITEABLE, "MTD_WRITEABLE" }, + { MTD_BIT_WRITEABLE, "MTD_BIT_WRITEABLE" }, + { MTD_NO_ERASE, "MTD_NO_ERASE" }, + { MTD_POWERUP_LOCK, "MTD_POWERUP_LOCK" }, + { 0, NULL }, +}; + +static const struct xlat mtd_otp_options[] = { + { MTD_OTP_OFF, "MTD_OTP_OFF" }, + { MTD_OTP_FACTORY, "MTD_OTP_FACTORY" }, + { MTD_OTP_USER, "MTD_OTP_USER" }, + { 0, NULL }, +}; + +static const struct xlat mtd_nandecc_options[] = { + { MTD_NANDECC_OFF, "MTD_NANDECC_OFF" }, + { MTD_NANDECC_PLACE, "MTD_NANDECC_PLACE" }, + { MTD_NANDECC_AUTOPLACE, "MTD_NANDECC_AUTOPLACE" }, + { MTD_NANDECC_PLACEONLY, "MTD_NANDECC_PLACEONLY" }, + { MTD_NANDECC_AUTOPL_USR, "MTD_NANDECC_AUTOPL_USR" }, + { 0, NULL }, +}; + +int mtd_ioctl(struct tcb *tcp, long code, long arg) +{ + struct mtd_info_user minfo; + struct erase_info_user einfo; + struct erase_info_user64 einfo64; + struct mtd_oob_buf mbuf; + struct mtd_oob_buf64 mbuf64; + struct region_info_user rinfo; + struct otp_info oinfo; + struct mtd_ecc_stats estat; + struct mtd_write_req mreq; + struct nand_oobinfo ninfo; + struct nand_ecclayout_user nlay; + int i, j; + + if (entering(tcp)) + return 0; + + switch (code) { + + case MEMGETINFO: + if (!verbose(tcp) || umove(tcp, arg, &minfo) < 0) + return 0; + + tprints(", {type="); + printxval(mtd_type_options, minfo.type, "MTD_???"); + tprints(", flags="); + printflags(mtd_flags_options, minfo.flags, "MTD_???"); + tprintf(", size=%#" PRIx32 ", erasesize=%#" PRIx32, + minfo.size, minfo.erasesize); + tprintf(", writesize=%#" PRIx32 ", oobsize=%#" PRIx32, + minfo.writesize, minfo.oobsize); + tprintf(", padding=%#" PRIx64 "}", + (uint64_t) minfo.padding); + return 1; + + case MEMERASE: + case MEMLOCK: + case MEMUNLOCK: + case MEMISLOCKED: + if (!verbose(tcp) || umove(tcp, arg, &einfo) < 0) + return 0; + + tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 "}", + einfo.start, einfo.length); + return 1; + + case MEMERASE64: + if (!verbose(tcp) || umove(tcp, arg, &einfo64) < 0) + return 0; + + tprintf(", {start=%#" PRIx64 ", length=%#" PRIx64 "}", + (uint64_t) einfo64.start, (uint64_t) einfo64.length); + return 1; + + case MEMWRITEOOB: + case MEMREADOOB: + if (!verbose(tcp) || umove(tcp, arg, &mbuf) < 0) + return 0; + + tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 ", ptr=...}", + mbuf.start, mbuf.length); + return 1; + + case MEMWRITEOOB64: + case MEMREADOOB64: + if (!verbose(tcp) || umove(tcp, arg, &mbuf64) < 0) + return 0; + + tprintf(", {start=%#" PRIx64 ", length=%#" PRIx64 ", ptr=...}", + (uint64_t) mbuf64.start, (uint64_t) mbuf64.length); + return 1; + + case MEMGETREGIONINFO: + if (!verbose(tcp) || umove(tcp, arg, &rinfo) < 0) + return 0; + + tprintf(", {offset=%#" PRIx32 ", erasesize=%#" PRIx32, + rinfo.offset, rinfo.erasesize); + tprintf(", numblocks=%#" PRIx32 ", regionindex=%#" PRIx32 "}", + rinfo.numblocks, rinfo.regionindex); + return 1; + + case MEMGETOOBSEL: + if (!verbose(tcp) || umove(tcp, arg, &ninfo) < 0) + return 0; + + tprints(", {useecc="); + printxval(mtd_nandecc_options, ninfo.useecc, "MTD_NANDECC_???"); + tprintf(", eccbytes=%#" PRIx32, ninfo.eccbytes); + + tprints(", oobfree={"); + for (i = 0; i < ARRAY_SIZE(ninfo.oobfree); ++i) { + if (i) + tprints("}, "); + tprints("{"); + for (j = 0; j < ARRAY_SIZE(ninfo.oobfree[0]); ++j) { + if (j) + tprints(", "); + tprintf("%#" PRIx32, ninfo.oobfree[i][j]); + } + } + + tprints("}}, eccpos={"); + for (i = 0; i < ARRAY_SIZE(ninfo.eccpos); ++i) { + if (i) + tprints(", "); + tprintf("%#" PRIx32, ninfo.eccpos[i]); + } + + tprints("}"); + return 1; + + case OTPGETREGIONINFO: + case OTPLOCK: + if (!verbose(tcp) || umove(tcp, arg, &oinfo) < 0) + return 0; + + tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 ", locked=%" PRIu32 "}", + oinfo.start, oinfo.length, oinfo.locked); + return 1; + + case ECCGETLAYOUT: + if (!verbose(tcp) || umove(tcp, arg, &nlay) < 0) + return 0; + + tprintf(", {eccbytes=%#" PRIx32 ", eccpos={", nlay.eccbytes); + for (i = 0; i < ARRAY_SIZE(nlay.eccpos); ++i) { + if (i) + tprints(", "); + tprintf("%#" PRIx32, nlay.eccpos[i]); + } + tprintf("}, oobavail=%#" PRIx32 ", oobfree={", nlay.oobavail); + for (i = 0; i < ARRAY_SIZE(nlay.oobfree); ++i) { + if (i) + tprints(", "); + tprintf("{offset=%#" PRIx32 ", length=%#" PRIx32 "}", + nlay.oobfree[i].offset, nlay.oobfree[i].length); + } + tprints("}"); + return 1; + + case ECCGETSTATS: + if (!verbose(tcp) || umove(tcp, arg, &estat) < 0) + return 0; + + tprintf(", {corrected=%#" PRIx32 ", failed=%#" PRIx32, + estat.corrected, estat.failed); + tprintf(", badblocks=%#" PRIx32 ", bbtblocks=%#" PRIx32 "}", + estat.badblocks, estat.bbtblocks); + return 1; + + case MEMWRITE: + if (!verbose(tcp) || umove(tcp, arg, &mreq) < 0) + return 0; + + tprintf(", {start=%#" PRIx64 ", len=%#" PRIx64, + (uint64_t) mreq.start, (uint64_t) mreq.len); + tprintf(", ooblen=%#" PRIx64 ", usr_data=%#" PRIx64, + (uint64_t) mreq.ooblen, (uint64_t) mreq.usr_data); + tprintf(", usr_oob=%#" PRIx64 ", mode=", + (uint64_t) mreq.usr_oob); + printxval(mtd_mode_options, mreq.mode, "MTD_OPS_???"); + tprints(", padding=...}"); + return 1; + + case OTPSELECT: + if (!verbose(tcp) || umove(tcp, arg, &i) < 0) + return 0; + + tprints(", ["); + printxval(mtd_otp_options, i, "MTD_OTP_???"); + tprints("]"); + return 1; + + case MEMGETBADBLOCK: + case MEMSETBADBLOCK: + if (!verbose(tcp)) + return 0; + + tprints(", "); + print_loff_t(tcp, arg); + return 1; + + case OTPGETREGIONCOUNT: + if (!verbose(tcp) || umove(tcp, arg, &i) < 0) + return 0; + + tprintf(", [%d]", i); + return 1; + + case MTDFILEMODE: + /* XXX: process return value as enum mtd_file_modes */ + + case MEMGETREGIONCOUNT: + /* These ones take simple args, so let default printer handle it */ + + default: + return 0; + } +} + +static const struct xlat ubi_volume_types[] = { + { UBI_DYNAMIC_VOLUME, "UBI_DYNAMIC_VOLUME" }, + { UBI_STATIC_VOLUME, "UBI_STATIC_VOLUME" }, + { 0, NULL }, +}; + +static const struct xlat ubi_volume_props[] = { + { UBI_VOL_PROP_DIRECT_WRITE, "UBI_VOL_PROP_DIRECT_WRITE" }, + { 0, NULL }, +}; + +int ubi_ioctl(struct tcb *tcp, long code, long arg) +{ + struct ubi_mkvol_req mkvol; + struct ubi_rsvol_req rsvol; + struct ubi_rnvol_req rnvol; + struct ubi_attach_req attach; + struct ubi_map_req map; + struct ubi_set_vol_prop_req prop; + /* 4*(n-1) + 3 for quotes and NUL */ + char vol_name[(UBI_MAX_VOLUME_NAME + 1) * 4]; + int ret; + + if (entering(tcp)) + return 0; + + switch (code) { + case UBI_IOCMKVOL: + if (!verbose(tcp) || umove(tcp, arg, &mkvol) < 0) + return 0; + + tprintf(", {vol_id=%" PRIi32 ", alignment=%" PRIi32 + ", bytes=%" PRIi64 ", vol_type=", mkvol.vol_id, + mkvol.alignment, (int64_t)mkvol.bytes); + printxval(ubi_volume_types, mkvol.vol_type, "UBI_???_VOLUME"); + ret = string_quote(mkvol.name, vol_name, -1, + CLAMP(mkvol.name_len, 0, UBI_MAX_VOLUME_NAME)); + tprintf(", name_len=%" PRIi16 ", name=%s%s", + mkvol.name_len, vol_name, ret ? "..." : ""); + tprints("}"); + return 1; + + case UBI_IOCRSVOL: + if (!verbose(tcp) || umove(tcp, arg, &rsvol) < 0) + return 0; + + tprintf(", {vol_id=%" PRIi32 ", bytes=%" PRIi64 "}", + rsvol.vol_id, (int64_t)rsvol.bytes); + return 1; + + case UBI_IOCRNVOL: { + __s32 c; + + if (!verbose(tcp) || umove(tcp, arg, &rnvol) < 0) + return 0; + + tprintf(", {count=%" PRIi32 ", ents=[", rnvol.count); + for (c = 0; c < CLAMP(rnvol.count, 0, UBI_MAX_RNVOL); ++c) { + if (c) + tprints(", "); + ret = string_quote(rnvol.ents[c].name, vol_name, -1, + CLAMP(rnvol.ents[c].name_len, 0, UBI_MAX_VOLUME_NAME)); + tprintf("{vol_id=%" PRIi32 ", name_len=%" PRIi16 + ", name=%s%s}", rnvol.ents[c].vol_id, + rnvol.ents[c].name_len, vol_name, ret ? "..." : ""); + } + tprints("]}"); + return 1; + } + + case UBI_IOCVOLUP: { + __s64 bytes; + + if (!verbose(tcp) || umove(tcp, arg, &bytes) < 0) + return 0; + + tprintf(", %" PRIi64, (int64_t)bytes); + return 1; + } + + case UBI_IOCATT: + if (!verbose(tcp) || umove(tcp, arg, &attach) < 0) + return 0; + + tprintf(", {ubi_num=%" PRIi32 ", mtd_num=%" PRIi32 + ", vid_hdr_offset=%" PRIi32 + ", max_beb_per1024=%" PRIi16 "}", + attach.ubi_num, attach.mtd_num, + attach.vid_hdr_offset, attach.max_beb_per1024); + return 1; + + case UBI_IOCEBMAP: + if (!verbose(tcp) || umove(tcp, arg, &map) < 0) + return 0; + + tprintf(", {lnum=%" PRIi32 ", dtype=%" PRIi8 "}", + map.lnum, map.dtype); + return 1; + + case UBI_IOCSETVOLPROP: + if (!verbose(tcp) || umove(tcp, arg, &prop) < 0) + return 0; + + tprints(", {property="); + printxval(ubi_volume_props, prop.property, "UBI_VOL_PROP_???"); + tprintf(", value=%#" PRIx64 "}", (uint64_t)prop.value); + return 1; + + case UBI_IOCRMVOL: + case UBI_IOCDET: + case UBI_IOCEBER: + case UBI_IOCEBCH: + case UBI_IOCEBUNMAP: + case UBI_IOCEBISMAP: + /* These ones take simple args, so let default printer handle it */ + + default: + return 0; + } +} diff --git a/alice-strace/net.c b/alice-strace/net.c new file mode 100644 index 0000000..9ae783a --- /dev/null +++ b/alice-strace/net.c @@ -0,0 +1,2335 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-2000 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 +#include +#include +#if defined(HAVE_SIN6_SCOPE_ID_LINUX) +# define in6_addr in6_addr_libc +# define ipv6_mreq ipv6_mreq_libc +# define sockaddr_in6 sockaddr_in6_libc +#endif +#include +#ifdef HAVE_NETINET_TCP_H +# include +#endif +#ifdef HAVE_NETINET_UDP_H +# include +#endif +#ifdef HAVE_NETINET_SCTP_H +# include +#endif +#include +#include +#include +#if defined(__GLIBC__) +# include +#else +# include +#endif + +#if defined(__GLIBC__) && defined(HAVE_SIN6_SCOPE_ID_LINUX) +# if defined(HAVE_LINUX_IN6_H) +# if defined(HAVE_SIN6_SCOPE_ID_LINUX) +# undef in6_addr +# undef ipv6_mreq +# undef sockaddr_in6 +# define in6_addr in6_addr_kernel +# define ipv6_mreq ipv6_mreq_kernel +# define sockaddr_in6 sockaddr_in6_kernel +# endif +# include +# if defined(HAVE_SIN6_SCOPE_ID_LINUX) +# undef in6_addr +# undef ipv6_mreq +# undef sockaddr_in6 +# define in6_addr in6_addr_libc +# define ipv6_mreq ipv6_mreq_libc +# define sockaddr_in6 sockaddr_in6_kernel +# endif +# endif +#endif + +#if defined(HAVE_SYS_UIO_H) +# include +#endif +#if defined(HAVE_LINUX_NETLINK_H) +# include +#endif +#if defined(HAVE_LINUX_IF_PACKET_H) +# include +#endif +#if defined(HAVE_LINUX_ICMP_H) +# include +#endif +#ifndef PF_UNSPEC +# define PF_UNSPEC AF_UNSPEC +#endif + +/* Under Linux these are enums so we can't test for them with ifdef. */ +#define IPPROTO_EGP IPPROTO_EGP +#define IPPROTO_PUP IPPROTO_PUP +#define IPPROTO_IDP IPPROTO_IDP +#define IPPROTO_IGMP IPPROTO_IGMP +#define IPPROTO_RAW IPPROTO_RAW +#define IPPROTO_MAX IPPROTO_MAX + +static const struct xlat domains[] = { +#ifdef PF_UNSPEC + { PF_UNSPEC, "PF_UNSPEC" }, +#endif +#ifdef PF_LOCAL + { PF_LOCAL, "PF_LOCAL" }, +#endif +#ifdef PF_UNIX + { PF_UNIX, "PF_UNIX" }, +#endif +#ifdef PF_INET + { PF_INET, "PF_INET" }, +#endif +#ifdef PF_AX25 + { PF_AX25, "PF_AX25" }, +#endif +#ifdef PF_IPX + { PF_IPX, "PF_IPX" }, +#endif +#ifdef PF_APPLETALK + { PF_APPLETALK, "PF_APPLETALK" }, +#endif +#ifdef PF_NETROM + { PF_NETROM, "PF_NETROM" }, +#endif +#ifdef PF_BRIDGE + { PF_BRIDGE, "PF_BRIDGE" }, +#endif +#ifdef PF_ATMPVC + { PF_ATMPVC, "PF_ATMPVC" }, +#endif +#ifdef PF_X25 + { PF_X25, "PF_X25" }, +#endif +#ifdef PF_INET6 + { PF_INET6, "PF_INET6" }, +#endif +#ifdef PF_ROSE + { PF_ROSE, "PF_ROSE" }, +#endif +#ifdef PF_DECnet + { PF_DECnet, "PF_DECnet" }, +#endif +#ifdef PF_NETBEUI + { PF_NETBEUI, "PF_NETBEUI" }, +#endif +#ifdef PF_SECURITY + { PF_SECURITY, "PF_SECURITY" }, +#endif +#ifdef PF_KEY + { PF_KEY, "PF_KEY" }, +#endif +#ifdef PF_NETLINK + { PF_NETLINK, "PF_NETLINK" }, +#endif +#ifdef PF_ROUTE + { PF_ROUTE, "PF_ROUTE" }, +#endif +#ifdef PF_PACKET + { PF_PACKET, "PF_PACKET" }, +#endif +#ifdef PF_ASH + { PF_ASH, "PF_ASH" }, +#endif +#ifdef PF_ECONET + { PF_ECONET, "PF_ECONET" }, +#endif +#ifdef PF_ATMSVC + { PF_ATMSVC, "PF_ATMSVC" }, +#endif +#ifdef PF_RDS + { PF_RDS, "PF_RDS" }, +#endif +#ifdef PF_SNA + { PF_SNA, "PF_SNA" }, +#endif +#ifdef PF_IRDA + { PF_IRDA, "PF_IRDA" }, +#endif +#ifdef PF_PPPOX + { PF_PPPOX, "PF_PPPOX" }, +#endif +#ifdef PF_WANPIPE + { PF_WANPIPE, "PF_WANPIPE" }, +#endif +#ifdef PF_LLC + { PF_LLC, "PF_LLC" }, +#endif +#ifdef PF_CAN + { PF_CAN, "PF_CAN" }, +#endif +#ifdef PF_TIPC + { PF_TIPC, "PF_TIPC" }, +#endif +#ifdef PF_BLUETOOTH + { PF_BLUETOOTH, "PF_BLUETOOTH" }, +#endif +#ifdef PF_IUCV + { PF_IUCV, "PF_IUCV" }, +#endif +#ifdef PF_RXRPC + { PF_RXRPC, "PF_RXRPC" }, +#endif +#ifdef PF_ISDN + { PF_ISDN, "PF_ISDN" }, +#endif +#ifdef PF_PHONET + { PF_PHONET, "PF_PHONET" }, +#endif +#ifdef PF_IEEE802154 + { PF_IEEE802154,"PF_IEEE802154" }, +#endif +#ifdef PF_CAIF + { PF_CAIF, "PF_CAIF" }, +#endif +#ifdef PF_ALG + { PF_ALG, "PF_ALG" }, +#endif +#ifdef PF_NFC + { PF_NFC, "PF_NFC" }, +#endif +#ifdef PF_VSOCK + { PF_VSOCK, "PF_VSOCK" }, +#endif + { 0, NULL }, +}; +const struct xlat addrfams[] = { +#ifdef AF_UNSPEC + { AF_UNSPEC, "AF_UNSPEC" }, +#endif +#ifdef AF_LOCAL + { AF_LOCAL, "AF_LOCAL" }, +#endif +#ifdef AF_UNIX + { AF_UNIX, "AF_UNIX" }, +#endif +#ifdef AF_INET + { AF_INET, "AF_INET" }, +#endif +#ifdef AF_AX25 + { AF_AX25, "AF_AX25" }, +#endif +#ifdef AF_IPX + { AF_IPX, "AF_IPX" }, +#endif +#ifdef AF_APPLETALK + { AF_APPLETALK, "AF_APPLETALK" }, +#endif +#ifdef AF_NETROM + { AF_NETROM, "AF_NETROM" }, +#endif +#ifdef AF_BRIDGE + { AF_BRIDGE, "AF_BRIDGE" }, +#endif +#ifdef AF_ATMPVC + { AF_ATMPVC, "AF_ATMPVC" }, +#endif +#ifdef AF_X25 + { AF_X25, "AF_X25" }, +#endif +#ifdef AF_INET6 + { AF_INET6, "AF_INET6" }, +#endif +#ifdef AF_ROSE + { AF_ROSE, "AF_ROSE" }, +#endif +#ifdef AF_DECnet + { AF_DECnet, "AF_DECnet" }, +#endif +#ifdef AF_NETBEUI + { AF_NETBEUI, "AF_NETBEUI" }, +#endif +#ifdef AF_SECURITY + { AF_SECURITY, "AF_SECURITY" }, +#endif +#ifdef AF_KEY + { AF_KEY, "AF_KEY" }, +#endif +#ifdef AF_NETLINK + { AF_NETLINK, "AF_NETLINK" }, +#endif +#ifdef AF_ROUTE + { AF_ROUTE, "AF_ROUTE" }, +#endif +#ifdef AF_PACKET + { AF_PACKET, "AF_PACKET" }, +#endif +#ifdef AF_ASH + { AF_ASH, "AF_ASH" }, +#endif +#ifdef AF_ECONET + { AF_ECONET, "AF_ECONET" }, +#endif +#ifdef AF_ATMSVC + { AF_ATMSVC, "AF_ATMSVC" }, +#endif +#ifdef AF_RDS + { AF_RDS, "AF_RDS" }, +#endif +#ifdef AF_SNA + { AF_SNA, "AF_SNA" }, +#endif +#ifdef AF_IRDA + { AF_IRDA, "AF_IRDA" }, +#endif +#ifdef AF_PPPOX + { AF_PPPOX, "AF_PPPOX" }, +#endif +#ifdef AF_WANPIPE + { AF_WANPIPE, "AF_WANPIPE" }, +#endif +#ifdef AF_LLC + { AF_LLC, "AF_LLC" }, +#endif +#ifdef AF_CAN + { AF_CAN, "AF_CAN" }, +#endif +#ifdef AF_TIPC + { AF_TIPC, "AF_TIPC" }, +#endif +#ifdef AF_BLUETOOTH + { AF_BLUETOOTH, "AF_BLUETOOTH" }, +#endif +#ifdef AF_IUCV + { AF_IUCV, "AF_IUCV" }, +#endif +#ifdef AF_RXRPC + { AF_RXRPC, "AF_RXRPC" }, +#endif +#ifdef AF_ISDN + { AF_ISDN, "AF_ISDN" }, +#endif +#ifdef AF_PHONET + { AF_PHONET, "AF_PHONET" }, +#endif +#ifdef AF_IEEE802154 + { AF_IEEE802154,"AF_IEEE802154" }, +#endif +#ifdef AF_CAIF + { AF_CAIF, "AF_CAIF" }, +#endif +#ifdef AF_ALG + { AF_ALG, "AF_ALG" }, +#endif +#ifdef AF_NFC + { AF_NFC, "AF_NFC" }, +#endif +#ifdef AF_VSOCK + { AF_VSOCK, "AF_VSOCK" }, +#endif + { 0, NULL }, +}; +static const struct xlat socktypes[] = { + { SOCK_STREAM, "SOCK_STREAM" }, + { SOCK_DGRAM, "SOCK_DGRAM" }, +#ifdef SOCK_RAW + { SOCK_RAW, "SOCK_RAW" }, +#endif +#ifdef SOCK_RDM + { SOCK_RDM, "SOCK_RDM" }, +#endif +#ifdef SOCK_SEQPACKET + { SOCK_SEQPACKET,"SOCK_SEQPACKET"}, +#endif +#ifdef SOCK_DCCP + { SOCK_DCCP, "SOCK_DCCP" }, +#endif +#ifdef SOCK_PACKET + { SOCK_PACKET, "SOCK_PACKET" }, +#endif + { 0, NULL }, +}; +static const struct xlat sock_type_flags[] = { +#ifdef SOCK_CLOEXEC + { SOCK_CLOEXEC, "SOCK_CLOEXEC" }, +#endif +#ifdef SOCK_NONBLOCK + { SOCK_NONBLOCK,"SOCK_NONBLOCK" }, +#endif + { 0, NULL }, +}; +#ifndef SOCK_TYPE_MASK +# define SOCK_TYPE_MASK 0xf +#endif +static const struct xlat socketlayers[] = { +#if defined(SOL_IP) + { SOL_IP, "SOL_IP" }, +#endif +#if defined(SOL_ICMP) + { SOL_ICMP, "SOL_ICMP" }, +#endif +#if defined(SOL_TCP) + { SOL_TCP, "SOL_TCP" }, +#endif +#if defined(SOL_UDP) + { SOL_UDP, "SOL_UDP" }, +#endif +#if defined(SOL_IPV6) + { SOL_IPV6, "SOL_IPV6" }, +#endif +#if defined(SOL_ICMPV6) + { SOL_ICMPV6, "SOL_ICMPV6" }, +#endif +#if defined(SOL_SCTP) + { SOL_SCTP, "SOL_SCTP" }, +#endif +#if defined(SOL_UDPLITE) + { SOL_UDPLITE, "SOL_UDPLITE" }, +#endif +#if defined(SOL_RAW) + { SOL_RAW, "SOL_RAW" }, +#endif +#if defined(SOL_IPX) + { SOL_IPX, "SOL_IPX" }, +#endif +#if defined(SOL_AX25) + { SOL_AX25, "SOL_AX25" }, +#endif +#if defined(SOL_ATALK) + { SOL_ATALK, "SOL_ATALK" }, +#endif +#if defined(SOL_NETROM) + { SOL_NETROM, "SOL_NETROM" }, +#endif +#if defined(SOL_ROSE) + { SOL_ROSE, "SOL_ROSE" }, +#endif +#if defined(SOL_DECNET) + { SOL_DECNET, "SOL_DECNET" }, +#endif +#if defined(SOL_X25) + { SOL_X25, "SOL_X25" }, +#endif +#if defined(SOL_PACKET) + { SOL_PACKET, "SOL_PACKET" }, +#endif +#if defined(SOL_ATM) + { SOL_ATM, "SOL_ATM" }, +#endif +#if defined(SOL_AAL) + { SOL_AAL, "SOL_AAL" }, +#endif +#if defined(SOL_IRDA) + { SOL_IRDA, "SOL_IRDA" }, +#endif +#if defined(SOL_NETBEUI) + { SOL_NETBEUI, "SOL_NETBEUI" }, +#endif +#if defined(SOL_LLC) + { SOL_LLC, "SOL_LLC" }, +#endif +#if defined(SOL_DCCP) + { SOL_DCCP, "SOL_DCCP" }, +#endif +#if defined(SOL_NETLINK) + { SOL_NETLINK, "SOL_NETLINK" }, +#endif +#if defined(SOL_TIPC) + { SOL_TIPC, "SOL_TIPC" }, +#endif +#if defined(SOL_RXRPC) + { SOL_RXRPC, "SOL_RXRPC" }, +#endif +#if defined(SOL_PPPOL2TP) + { SOL_PPPOL2TP, "SOL_PPPOL2TP" }, +#endif +#if defined(SOL_BLUETOOTH) + { SOL_BLUETOOTH,"SOL_BLUETOOTH" }, +#endif +#if defined(SOL_PNPIPE) + { SOL_PNPIPE, "SOL_PNPIPE" }, +#endif +#if defined(SOL_RDS) + { SOL_RDS, "SOL_RDS" }, +#endif +#if defined(SOL_IUVC) + { SOL_IUCV, "SOL_IUCV" }, +#endif +#if defined(SOL_CAIF) + { SOL_CAIF, "SOL_CAIF" }, +#endif + { SOL_SOCKET, "SOL_SOCKET" }, /* Never used! */ + /* The SOL_* array should remain not NULL-terminated. */ +}; +/*** WARNING: DANGER WILL ROBINSON: NOTE "socketlayers" array above + falls into "protocols" array below!!!! This is intended!!! ***/ +static const struct xlat protocols[] = { + { IPPROTO_IP, "IPPROTO_IP" }, + { IPPROTO_ICMP, "IPPROTO_ICMP" }, + { IPPROTO_TCP, "IPPROTO_TCP" }, + { IPPROTO_UDP, "IPPROTO_UDP" }, +#ifdef IPPROTO_IGMP + { IPPROTO_IGMP, "IPPROTO_IGMP" }, +#endif +#ifdef IPPROTO_GGP + { IPPROTO_GGP, "IPPROTO_GGP" }, +#endif +#ifdef IPPROTO_IPIP + { IPPROTO_IPIP, "IPPROTO_IPIP" }, +#endif +#ifdef IPPROTO_EGP + { IPPROTO_EGP, "IPPROTO_EGP" }, +#endif +#ifdef IPPROTO_PUP + { IPPROTO_PUP, "IPPROTO_PUP" }, +#endif +#ifdef IPPROTO_IDP + { IPPROTO_IDP, "IPPROTO_IDP" }, +#endif +#ifdef IPPROTO_TP + { IPPROTO_TP, "IPPROTO_TP" }, +#endif +#ifdef IPPROTO_DCCP + { IPPROTO_DCCP, "IPPROTO_DCCP" }, +#endif +#ifdef IPPROTO_IPV6 + { IPPROTO_IPV6, "IPPROTO_IPV6" }, +#endif +#ifdef IPPROTO_ROUTING + { IPPROTO_ROUTING, "IPPROTO_ROUTING" }, +#endif +#ifdef IPPROTO_FRAGMENT + { IPPROTO_FRAGMENT, "IPPROTO_FRAGMENT" }, +#endif +#ifdef IPPROTO_RSVP + { IPPROTO_RSVP, "IPPROTO_RSVP" }, +#endif +#ifdef IPPROTO_GRE + { IPPROTO_GRE, "IPPROTO_GRE" }, +#endif +#ifdef IPPROTO_ESP + { IPPROTO_ESP, "IPPROTO_ESP" }, +#endif +#ifdef IPPROTO_AH + { IPPROTO_AH, "IPPROTO_AH" }, +#endif +#ifdef IPPROTO_ICMPV6 + { IPPROTO_ICMPV6, "IPPROTO_ICMPV6" }, +#endif +#ifdef IPPROTO_NONE + { IPPROTO_NONE, "IPPROTO_NONE" }, +#endif +#ifdef IPPROTO_DSTOPTS + { IPPROTO_DSTOPTS, "IPPROTO_DSTOPTS" }, +#endif +#ifdef IPPROTO_HELLO + { IPPROTO_HELLO, "IPPROTO_HELLO" }, +#endif +#ifdef IPPROTO_ND + { IPPROTO_ND, "IPPROTO_ND" }, +#endif +#ifdef IPPROTO_MTP + { IPPROTO_MTP, "IPPROTO_MTP" }, +#endif +#ifdef IPPROTO_ENCAP + { IPPROTO_ENCAP, "IPPROTO_ENCAP" }, +#endif +#ifdef IPPROTO_PIM + { IPPROTO_PIM, "IPPROTO_PIM" }, +#endif +#ifdef IPPROTO_COMP + { IPPROTO_COMP, "IPPROTO_COMP" }, +#endif +#ifdef IPPROTO_SCTP + { IPPROTO_SCTP, "IPPROTO_SCTP" }, +#endif +#ifdef IPPROTO_UDPLITE + { IPPROTO_UDPLITE, "IPPROTO_UDPLITE" }, +#endif +#ifdef IPPROTO_RAW + { IPPROTO_RAW, "IPPROTO_RAW" }, +#endif +#ifdef IPPROTO_MAX + { IPPROTO_MAX, "IPPROTO_MAX" }, +#endif + { 0, NULL }, +}; +static const struct xlat msg_flags[] = { + { MSG_OOB, "MSG_OOB" }, +#ifdef MSG_PEEK + { MSG_PEEK, "MSG_PEEK" }, +#endif +#ifdef MSG_DONTROUTE + { MSG_DONTROUTE, "MSG_DONTROUTE" }, +#endif +#ifdef MSG_CTRUNC + { MSG_CTRUNC, "MSG_CTRUNC" }, +#endif +#ifdef MSG_PROBE + { MSG_PROBE, "MSG_PROBE" }, +#endif +#ifdef MSG_TRUNC + { MSG_TRUNC, "MSG_TRUNC" }, +#endif +#ifdef MSG_DONTWAIT + { MSG_DONTWAIT, "MSG_DONTWAIT" }, +#endif +#ifdef MSG_EOR + { MSG_EOR, "MSG_EOR" }, +#endif +#ifdef MSG_WAITALL + { MSG_WAITALL, "MSG_WAITALL" }, +#endif +#ifdef MSG_FIN + { MSG_FIN, "MSG_FIN" }, +#endif +#ifdef MSG_SYN + { MSG_SYN, "MSG_SYN" }, +#endif +#ifdef MSG_CONFIRM + { MSG_CONFIRM, "MSG_CONFIRM" }, +#endif +#ifdef MSG_RST + { MSG_RST, "MSG_RST" }, +#endif +#ifdef MSG_ERRQUEUE + { MSG_ERRQUEUE, "MSG_ERRQUEUE" }, +#endif +#ifdef MSG_NOSIGNAL + { MSG_NOSIGNAL, "MSG_NOSIGNAL" }, +#endif +#ifdef MSG_MORE + { MSG_MORE, "MSG_MORE" }, +#endif +#ifdef MSG_WAITFORONE + { MSG_WAITFORONE, "MSG_WAITFORONE" }, +#endif +#ifdef MSG_EOF + { MSG_EOF, "MSG_EOF" }, +#endif +#ifdef MSG_FASTOPEN + { MSG_FASTOPEN, "MSG_FASTOPEN" }, +#endif +#ifdef MSG_CMSG_CLOEXEC + { MSG_CMSG_CLOEXEC, "MSG_CMSG_CLOEXEC" }, +#endif + { 0, NULL }, +}; + +static const struct xlat sockoptions[] = { +#ifdef SO_ACCEPTCONN + { SO_ACCEPTCONN, "SO_ACCEPTCONN" }, +#endif +#ifdef SO_ALLRAW + { SO_ALLRAW, "SO_ALLRAW" }, +#endif +#ifdef SO_ATTACH_FILTER + { SO_ATTACH_FILTER, "SO_ATTACH_FILTER" }, +#endif +#ifdef SO_BINDTODEVICE + { SO_BINDTODEVICE, "SO_BINDTODEVICE" }, +#endif +#ifdef SO_BROADCAST + { SO_BROADCAST, "SO_BROADCAST" }, +#endif +#ifdef SO_BSDCOMPAT + { SO_BSDCOMPAT, "SO_BSDCOMPAT" }, +#endif +#ifdef SO_DEBUG + { SO_DEBUG, "SO_DEBUG" }, +#endif +#ifdef SO_DETACH_FILTER + { SO_DETACH_FILTER, "SO_DETACH_FILTER" }, +#endif +#ifdef SO_DONTROUTE + { SO_DONTROUTE, "SO_DONTROUTE" }, +#endif +#ifdef SO_ERROR + { SO_ERROR, "SO_ERROR" }, +#endif +#ifdef SO_ICS + { SO_ICS, "SO_ICS" }, +#endif +#ifdef SO_IMASOCKET + { SO_IMASOCKET, "SO_IMASOCKET" }, +#endif +#ifdef SO_KEEPALIVE + { SO_KEEPALIVE, "SO_KEEPALIVE" }, +#endif +#ifdef SO_LINGER + { SO_LINGER, "SO_LINGER" }, +#endif +#ifdef SO_LISTENING + { SO_LISTENING, "SO_LISTENING" }, +#endif +#ifdef SO_MGMT + { SO_MGMT, "SO_MGMT" }, +#endif +#ifdef SO_NO_CHECK + { SO_NO_CHECK, "SO_NO_CHECK" }, +#endif +#ifdef SO_OOBINLINE + { SO_OOBINLINE, "SO_OOBINLINE" }, +#endif +#ifdef SO_ORDREL + { SO_ORDREL, "SO_ORDREL" }, +#endif +#ifdef SO_PARALLELSVR + { SO_PARALLELSVR, "SO_PARALLELSVR" }, +#endif +#ifdef SO_PASSCRED + { SO_PASSCRED, "SO_PASSCRED" }, +#endif +#ifdef SO_PEERCRED + { SO_PEERCRED, "SO_PEERCRED" }, +#endif +#ifdef SO_PEERNAME + { SO_PEERNAME, "SO_PEERNAME" }, +#endif +#ifdef SO_PEERSEC + { SO_PEERSEC, "SO_PEERSEC" }, +#endif +#ifdef SO_PRIORITY + { SO_PRIORITY, "SO_PRIORITY" }, +#endif +#ifdef SO_PROTOTYPE + { SO_PROTOTYPE, "SO_PROTOTYPE" }, +#endif +#ifdef SO_RCVBUF + { SO_RCVBUF, "SO_RCVBUF" }, +#endif +#ifdef SO_RCVLOWAT + { SO_RCVLOWAT, "SO_RCVLOWAT" }, +#endif +#ifdef SO_RCVTIMEO + { SO_RCVTIMEO, "SO_RCVTIMEO" }, +#endif +#ifdef SO_RDWR + { SO_RDWR, "SO_RDWR" }, +#endif +#ifdef SO_REUSEADDR + { SO_REUSEADDR, "SO_REUSEADDR" }, +#endif +#ifdef SO_REUSEPORT + { SO_REUSEPORT, "SO_REUSEPORT" }, +#endif +#ifdef SO_SECURITY_AUTHENTICATION + { SO_SECURITY_AUTHENTICATION,"SO_SECURITY_AUTHENTICATION"}, +#endif +#ifdef SO_SECURITY_ENCRYPTION_NETWORK + { SO_SECURITY_ENCRYPTION_NETWORK,"SO_SECURITY_ENCRYPTION_NETWORK"}, +#endif +#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT + { SO_SECURITY_ENCRYPTION_TRANSPORT,"SO_SECURITY_ENCRYPTION_TRANSPORT"}, +#endif +#ifdef SO_SEMA + { SO_SEMA, "SO_SEMA" }, +#endif +#ifdef SO_SNDBUF + { SO_SNDBUF, "SO_SNDBUF" }, +#endif +#ifdef SO_SNDLOWAT + { SO_SNDLOWAT, "SO_SNDLOWAT" }, +#endif +#ifdef SO_SNDTIMEO + { SO_SNDTIMEO, "SO_SNDTIMEO" }, +#endif +#ifdef SO_TIMESTAMP + { SO_TIMESTAMP, "SO_TIMESTAMP" }, +#endif +#ifdef SO_TYPE + { SO_TYPE, "SO_TYPE" }, +#endif +#ifdef SO_USELOOPBACK + { SO_USELOOPBACK, "SO_USELOOPBACK" }, +#endif + { 0, NULL }, +}; + +#if !defined(SOL_IP) && defined(IPPROTO_IP) +#define SOL_IP IPPROTO_IP +#endif + +#ifdef SOL_IP +static const struct xlat sockipoptions[] = { +#ifdef IP_TOS + { IP_TOS, "IP_TOS" }, +#endif +#ifdef IP_TTL + { IP_TTL, "IP_TTL" }, +#endif +#ifdef IP_HDRINCL + { IP_HDRINCL, "IP_HDRINCL" }, +#endif +#ifdef IP_OPTIONS + { IP_OPTIONS, "IP_OPTIONS" }, +#endif +#ifdef IP_ROUTER_ALERT + { IP_ROUTER_ALERT, "IP_ROUTER_ALERT" }, +#endif +#ifdef IP_RECVOPTIONS + { IP_RECVOPTIONS, "IP_RECVOPTIONS" }, +#endif +#ifdef IP_RECVOPTS + { IP_RECVOPTS, "IP_RECVOPTS" }, +#endif +#ifdef IP_RECVRETOPTS + { IP_RECVRETOPTS, "IP_RECVRETOPTS" }, +#endif +#ifdef IP_RECVDSTADDR + { IP_RECVDSTADDR, "IP_RECVDSTADDR" }, +#endif +#ifdef IP_RETOPTS + { IP_RETOPTS, "IP_RETOPTS" }, +#endif +#ifdef IP_PKTINFO + { IP_PKTINFO, "IP_PKTINFO" }, +#endif +#ifdef IP_PKTOPTIONS + { IP_PKTOPTIONS, "IP_PKTOPTIONS" }, +#endif +#ifdef IP_MTU_DISCOVER + { IP_MTU_DISCOVER, "IP_MTU_DISCOVER" }, +#endif +#ifdef IP_RECVERR + { IP_RECVERR, "IP_RECVERR" }, +#endif +#ifdef IP_RECVTTL + { IP_RECVTTL, "IP_RECVTTL" }, +#endif +#ifdef IP_RECVTOS + { IP_RECVTOS, "IP_RECVTOS" }, +#endif +#ifdef IP_MTU + { IP_MTU, "IP_MTU" }, +#endif +#ifdef IP_MULTICAST_IF + { IP_MULTICAST_IF, "IP_MULTICAST_IF" }, +#endif +#ifdef IP_MULTICAST_TTL + { IP_MULTICAST_TTL, "IP_MULTICAST_TTL" }, +#endif +#ifdef IP_MULTICAST_LOOP + { IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP" }, +#endif +#ifdef IP_ADD_MEMBERSHIP + { IP_ADD_MEMBERSHIP, "IP_ADD_MEMBERSHIP" }, +#endif +#ifdef IP_DROP_MEMBERSHIP + { IP_DROP_MEMBERSHIP, "IP_DROP_MEMBERSHIP" }, +#endif +#ifdef IP_BROADCAST_IF + { IP_BROADCAST_IF, "IP_BROADCAST_IF" }, +#endif +#ifdef IP_RECVIFINDEX + { IP_RECVIFINDEX, "IP_RECVIFINDEX" }, +#endif +#ifdef IP_MSFILTER + { IP_MSFILTER, "IP_MSFILTER" }, +#endif +#ifdef MCAST_MSFILTER + { MCAST_MSFILTER, "MCAST_MSFILTER" }, +#endif +#ifdef IP_FREEBIND + { IP_FREEBIND, "IP_FREEBIND" }, +#endif + { 0, NULL }, +}; +#endif /* SOL_IP */ + +#ifdef SOL_IPV6 +static const struct xlat sockipv6options[] = { +#ifdef IPV6_ADDRFORM + { IPV6_ADDRFORM, "IPV6_ADDRFORM" }, +#endif +#ifdef MCAST_FILTER + { MCAST_FILTER, "MCAST_FILTER" }, +#endif +#ifdef IPV6_PKTOPTIONS + { IPV6_PKTOPTIONS, "IPV6_PKTOPTIONS" }, +#endif +#ifdef IPV6_MTU + { IPV6_MTU, "IPV6_MTU" }, +#endif +#ifdef IPV6_V6ONLY + { IPV6_V6ONLY, "IPV6_V6ONLY" }, +#endif +#ifdef IPV6_PKTINFO + { IPV6_PKTINFO, "IPV6_PKTINFO" }, +#endif +#ifdef IPV6_HOPLIMIT + { IPV6_HOPLIMIT, "IPV6_HOPLIMIT" }, +#endif +#ifdef IPV6_RTHDR + { IPV6_RTHDR, "IPV6_RTHDR" }, +#endif +#ifdef IPV6_HOPOPTS + { IPV6_HOPOPTS, "IPV6_HOPOPTS" }, +#endif +#ifdef IPV6_DSTOPTS + { IPV6_DSTOPTS, "IPV6_DSTOPTS" }, +#endif +#ifdef IPV6_FLOWINFO + { IPV6_FLOWINFO, "IPV6_FLOWINFO" }, +#endif +#ifdef IPV6_UNICAST_HOPS + { IPV6_UNICAST_HOPS, "IPV6_UNICAST_HOPS" }, +#endif +#ifdef IPV6_MULTICAST_HOPS + { IPV6_MULTICAST_HOPS, "IPV6_MULTICAST_HOPS" }, +#endif +#ifdef IPV6_MULTICAST_LOOP + { IPV6_MULTICAST_LOOP, "IPV6_MULTICAST_LOOP" }, +#endif +#ifdef IPV6_MULTICAST_IF + { IPV6_MULTICAST_IF, "IPV6_MULTICAST_IF" }, +#endif +#ifdef IPV6_MTU_DISCOVER + { IPV6_MTU_DISCOVER, "IPV6_MTU_DISCOVER" }, +#endif +#ifdef IPV6_RECVERR + { IPV6_RECVERR, "IPV6_RECVERR" }, +#endif +#ifdef IPV6_FLOWINFO_SEND + { IPV6_FLOWINFO_SEND, "IPV6_FLOWINFO_SEND" }, +#endif +#ifdef IPV6_ADD_MEMBERSHIP + { IPV6_ADD_MEMBERSHIP, "IPV6_ADD_MEMBERSHIP" }, +#endif +#ifdef IPV6_DROP_MEMBERSHIP + { IPV6_DROP_MEMBERSHIP, "IPV6_DROP_MEMBERSHIP" }, +#endif +#ifdef IPV6_ROUTER_ALERT + { IPV6_ROUTER_ALERT, "IPV6_ROUTER_ALERT" }, +#endif + { 0, NULL }, +}; +#endif /* SOL_IPV6 */ + +#ifdef SOL_IPX +static const struct xlat sockipxoptions[] = { + { IPX_TYPE, "IPX_TYPE" }, + { 0, NULL }, +}; +#endif /* SOL_IPX */ + +#ifdef SOL_RAW +static const struct xlat sockrawoptions[] = { +#if defined(ICMP_FILTER) + { ICMP_FILTER, "ICMP_FILTER" }, +#endif + { 0, NULL }, +}; +#endif /* SOL_RAW */ + +#ifdef SOL_PACKET +static const struct xlat sockpacketoptions[] = { +#ifdef PACKET_ADD_MEMBERSHIP + { PACKET_ADD_MEMBERSHIP, "PACKET_ADD_MEMBERSHIP" }, +#endif +#ifdef PACKET_DROP_MEMBERSHIP + { PACKET_DROP_MEMBERSHIP, "PACKET_DROP_MEMBERSHIP"}, +#endif +#if defined(PACKET_RECV_OUTPUT) + { PACKET_RECV_OUTPUT, "PACKET_RECV_OUTPUT" }, +#endif +#if defined(PACKET_RX_RING) + { PACKET_RX_RING, "PACKET_RX_RING" }, +#endif +#if defined(PACKET_STATISTICS) + { PACKET_STATISTICS, "PACKET_STATISTICS" }, +#endif +#if defined(PACKET_COPY_THRESH) + { PACKET_COPY_THRESH, "PACKET_COPY_THRESH" }, +#endif +#if defined(PACKET_AUXDATA) + { PACKET_AUXDATA, "PACKET_AUXDATA" }, +#endif +#if defined(PACKET_ORIGDEV) + { PACKET_ORIGDEV, "PACKET_ORIGDEV" }, +#endif +#if defined(PACKET_VERSION) + { PACKET_VERSION, "PACKET_VERSION" }, +#endif +#if defined(PACKET_HDRLEN) + { PACKET_HDRLEN, "PACKET_HDRLEN" }, +#endif +#if defined(PACKET_RESERVE) + { PACKET_RESERVE, "PACKET_RESERVE" }, +#endif +#if defined(PACKET_TX_RING) + { PACKET_TX_RING, "PACKET_TX_RING" }, +#endif +#if defined(PACKET_LOSS) + { PACKET_LOSS, "PACKET_LOSS" }, +#endif + { 0, NULL }, +}; +#endif /* SOL_PACKET */ + +#ifdef SOL_SCTP +static const struct xlat socksctpoptions[] = { +#if defined(SCTP_RTOINFO) + { SCTP_RTOINFO, "SCTP_RTOINFO" }, +#endif +#if defined(SCTP_ASSOCINFO) + { SCTP_ASSOCINFO, "SCTP_ASSOCINFO"}, +#endif +#if defined(SCTP_INITMSG) + { SCTP_INITMSG, "SCTP_INITMSG" }, +#endif +#if defined(SCTP_NODELAY) + { SCTP_NODELAY, "SCTP_NODELAY" }, +#endif +#if defined(SCTP_AUTOCLOSE) + { SCTP_AUTOCLOSE, "SCTP_AUTOCLOSE"}, +#endif +#if defined(SCTP_SET_PEER_PRIMARY_ADDR) + { SCTP_SET_PEER_PRIMARY_ADDR, "SCTP_SET_PEER_PRIMARY_ADDR"}, +#endif +#if defined(SCTP_PRIMARY_ADDR) + { SCTP_PRIMARY_ADDR, "SCTP_PRIMARY_ADDR" }, +#endif +#if defined(SCTP_ADAPTATION_LAYER) + { SCTP_ADAPTATION_LAYER, "SCTP_ADAPTATION_LAYER" }, +#endif +#if defined(SCTP_DISABLE_FRAGMENTS) + { SCTP_DISABLE_FRAGMENTS, "SCTP_DISABLE_FRAGMENTS"}, +#endif +#if defined(SCTP_PEER_ADDR_PARAMS) + { SCTP_PEER_ADDR_PARAMS, "SCTP_PEER_ADDR_PARAMS" }, +#endif +#if defined(SCTP_DEFAULT_SEND_PARAM) + { SCTP_DEFAULT_SEND_PARAM, "SCTP_DEFAULT_SEND_PARAM"}, +#endif +#if defined(SCTP_EVENTS) + { SCTP_EVENTS, "SCTP_EVENTS" }, +#endif +#if defined(SCTP_I_WANT_MAPPED_V4_ADDR) + { SCTP_I_WANT_MAPPED_V4_ADDR, "SCTP_I_WANT_MAPPED_V4_ADDR"}, +#endif +#if defined(SCTP_MAXSEG) + { SCTP_MAXSEG, "SCTP_MAXSEG" }, +#endif +#if defined(SCTP_STATUS) + { SCTP_STATUS, "SCTP_STATUS" }, +#endif +#if defined(SCTP_GET_PEER_ADDR_INFO) + { SCTP_GET_PEER_ADDR_INFO, "SCTP_GET_PEER_ADDR_INFO"}, +#endif +#if defined(SCTP_DELAYED_ACK) + { SCTP_DELAYED_ACK, "SCTP_DELAYED_ACK" }, +#endif +#if defined(SCTP_CONTEXT) + { SCTP_CONTEXT, "SCTP_CONTEXT" }, +#endif +#if defined(SCTP_FRAGMENT_INTERLEAVE) + { SCTP_FRAGMENT_INTERLEAVE, "SCTP_FRAGMENT_INTERLEAVE"}, +#endif +#if defined(SCTP_PARTIAL_DELIVERY_POINT) + { SCTP_PARTIAL_DELIVERY_POINT, "SCTP_PARTIAL_DELIVERY_POINT"}, +#endif +#if defined(SCTP_MAX_BURST) + { SCTP_MAX_BURST, "SCTP_MAX_BURST" }, +#endif +#if defined(SCTP_AUTH_CHUNK) + { SCTP_AUTH_CHUNK, "SCTP_AUTH_CHUNK" }, +#endif +#if defined(SCTP_HMAC_IDENT) + { SCTP_HMAC_IDENT, "SCTP_HMAC_IDENT" }, +#endif +#if defined(SCTP_AUTH_KEY) + { SCTP_AUTH_KEY, "SCTP_AUTH_KEY" }, +#endif +#if defined(SCTP_AUTH_ACTIVE_KEY) + { SCTP_AUTH_ACTIVE_KEY, "SCTP_AUTH_ACTIVE_KEY" }, +#endif +#if defined(SCTP_AUTH_DELETE_KEY) + { SCTP_AUTH_DELETE_KEY, "SCTP_AUTH_DELETE_KEY" }, +#endif +#if defined(SCTP_PEER_AUTH_CHUNKS) + { SCTP_PEER_AUTH_CHUNKS, "SCTP_PEER_AUTH_CHUNKS" }, +#endif +#if defined(SCTP_LOCAL_AUTH_CHUNKS) + { SCTP_LOCAL_AUTH_CHUNKS, "SCTP_LOCAL_AUTH_CHUNKS"}, +#endif +#if defined(SCTP_GET_ASSOC_NUMBER) + { SCTP_GET_ASSOC_NUMBER, "SCTP_GET_ASSOC_NUMBER" }, +#endif + + /* linux specific things */ +#if defined(SCTP_SOCKOPT_BINDX_ADD) + { SCTP_SOCKOPT_BINDX_ADD, "SCTP_SOCKOPT_BINDX_ADD" }, +#endif +#if defined(SCTP_SOCKOPT_BINDX_REM) + { SCTP_SOCKOPT_BINDX_REM, "SCTP_SOCKOPT_BINDX_REM" }, +#endif +#if defined(SCTP_SOCKOPT_PEELOFF) + { SCTP_SOCKOPT_PEELOFF, "SCTP_SOCKOPT_PEELOFF" }, +#endif +#if defined(SCTP_GET_PEER_ADDRS_NUM_OLD) + { SCTP_GET_PEER_ADDRS_NUM_OLD, "SCTP_GET_PEER_ADDRS_NUM_OLD" }, +#endif +#if defined(SCTP_GET_PEER_ADDRS_OLD) + { SCTP_GET_PEER_ADDRS_OLD, "SCTP_GET_PEER_ADDRS_OLD" }, +#endif +#if defined(SCTP_GET_LOCAL_ADDRS_NUM_OLD) + { SCTP_GET_LOCAL_ADDRS_NUM_OLD, "SCTP_GET_LOCAL_ADDRS_NUM_OLD" }, +#endif +#if defined(SCTP_GET_LOCAL_ADDRS_OLD) + { SCTP_GET_LOCAL_ADDRS_OLD, "SCTP_GET_LOCAL_ADDRS_OLD" }, +#endif +#if defined(SCTP_SOCKOPT_CONNECTX_OLD) + { SCTP_SOCKOPT_CONNECTX_OLD, "SCTP_SOCKOPT_CONNECTX_OLD" }, +#endif +#if defined(SCTP_GET_PEER_ADDRS) + { SCTP_GET_PEER_ADDRS, "SCTP_GET_PEER_ADDRS" }, +#endif +#if defined(SCTP_GET_LOCAL_ADDRS) + { SCTP_GET_LOCAL_ADDRS, "SCTP_GET_LOCAL_ADDRS" }, +#endif + + { 0, NULL }, +}; +#endif + +#if !defined(SOL_TCP) && defined(IPPROTO_TCP) +#define SOL_TCP IPPROTO_TCP +#endif + +#ifdef SOL_TCP +static const struct xlat socktcpoptions[] = { + { TCP_NODELAY, "TCP_NODELAY" }, + { TCP_MAXSEG, "TCP_MAXSEG" }, +#ifdef TCP_CORK + { TCP_CORK, "TCP_CORK" }, +#endif +#ifdef TCP_KEEPIDLE + { TCP_KEEPIDLE, "TCP_KEEPIDLE" }, +#endif +#ifdef TCP_KEEPINTVL + { TCP_KEEPINTVL, "TCP_KEEPINTVL" }, +#endif +#ifdef TCP_KEEPCNT + { TCP_KEEPCNT, "TCP_KEEPCNT" }, +#endif +#ifdef TCP_SYNCNT + { TCP_SYNCNT, "TCP_SYNCNT" }, +#endif +#ifdef TCP_LINGER2 + { TCP_LINGER2, "TCP_LINGER2" }, +#endif +#ifdef TCP_DEFER_ACCEPT + { TCP_DEFER_ACCEPT, "TCP_DEFER_ACCEPT" }, +#endif +#ifdef TCP_WINDOW_CLAMP + { TCP_WINDOW_CLAMP, "TCP_WINDOW_CLAMP" }, +#endif +#ifdef TCP_INFO + { TCP_INFO, "TCP_INFO" }, +#endif +#ifdef TCP_QUICKACK + { TCP_QUICKACK, "TCP_QUICKACK" }, +#endif +#ifdef TCP_CONGESTION + { TCP_CONGESTION, "TCP_CONGESTION" }, +#endif +#ifdef TCP_MD5SIG + { TCP_MD5SIG, "TCP_MD5SIG" }, +#endif +#ifdef TCP_COOKIE_TRANSACTIONS + { TCP_COOKIE_TRANSACTIONS, "TCP_COOKIE_TRANSACTIONS" }, +#endif +#ifdef TCP_THIN_LINEAR_TIMEOUTS + { TCP_THIN_LINEAR_TIMEOUTS, "TCP_THIN_LINEAR_TIMEOUTS" }, +#endif +#ifdef TCP_THIN_DUPACK + { TCP_THIN_DUPACK, "TCP_THIN_DUPACK" }, +#endif +#ifdef TCP_USER_TIMEOUT + { TCP_USER_TIMEOUT, "TCP_USER_TIMEOUT" }, +#endif +#ifdef TCP_REPAIR + { TCP_REPAIR, "TCP_REPAIR" }, +#endif +#ifdef TCP_REPAIR_QUEUE + { TCP_REPAIR_QUEUE, "TCP_REPAIR_QUEUE" }, +#endif +#ifdef TCP_QUEUE_SEQ + { TCP_QUEUE_SEQ, "TCP_QUEUE_SEQ" }, +#endif +#ifdef TCP_REPAIR_OPTIONS + { TCP_REPAIR_OPTIONS, "TCP_REPAIR_OPTIONS" }, +#endif +#ifdef TCP_FASTOPEN + { TCP_FASTOPEN, "TCP_FASTOPEN" }, +#endif +#ifdef TCP_TIMESTAMP + { TCP_TIMESTAMP, "TCP_TIMESTAMP" }, +#endif + { 0, NULL }, +}; +#endif /* SOL_TCP */ + +#ifdef SOL_RAW +static const struct xlat icmpfilterflags[] = { +#if defined(ICMP_ECHOREPLY) + { (1< sizeof(addrbuf)) + addrlen = sizeof(addrbuf); + + memset(&addrbuf, 0, sizeof(addrbuf)); + if (umoven(tcp, addr, addrlen, addrbuf.pad) < 0) { + tprints("{...}"); + return; + } + addrbuf.pad[sizeof(addrbuf.pad) - 1] = '\0'; + + tprints("{sa_family="); + printxval(addrfams, addrbuf.sa.sa_family, "AF_???"); + tprints(", "); + + switch (addrbuf.sa.sa_family) { + case AF_UNIX: + if (addrlen == 2) { + tprints("NULL"); + } else if (addrbuf.sau.sun_path[0]) { + tprints("sun_path="); + printpathn(tcp, addr + 2, strlen(addrbuf.sau.sun_path)); + } else { + tprints("sun_path=@"); + printpathn(tcp, addr + 3, strlen(addrbuf.sau.sun_path + 1)); + } + break; + case AF_INET: + tprintf("sin_port=htons(%u), sin_addr=inet_addr(\"%s\")", + ntohs(addrbuf.sin.sin_port), inet_ntoa(addrbuf.sin.sin_addr)); + break; +#ifdef HAVE_INET_NTOP + case AF_INET6: + inet_ntop(AF_INET6, &addrbuf.sa6.sin6_addr, string_addr, sizeof(string_addr)); + tprintf("sin6_port=htons(%u), inet_pton(AF_INET6, \"%s\", &sin6_addr), sin6_flowinfo=%u", + ntohs(addrbuf.sa6.sin6_port), string_addr, + addrbuf.sa6.sin6_flowinfo); +#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID + { +#if defined(HAVE_IF_INDEXTONAME) && defined(IN6_IS_ADDR_LINKLOCAL) && defined(IN6_IS_ADDR_MC_LINKLOCAL) + int numericscope = 0; + if (IN6_IS_ADDR_LINKLOCAL(&addrbuf.sa6.sin6_addr) + || IN6_IS_ADDR_MC_LINKLOCAL(&addrbuf.sa6.sin6_addr)) { + char scopebuf[IFNAMSIZ + 1]; + + if (if_indextoname(addrbuf.sa6.sin6_scope_id, scopebuf) == NULL) + numericscope++; + else + tprintf(", sin6_scope_id=if_nametoindex(\"%s\")", scopebuf); + } else + numericscope++; + + if (numericscope) +#endif + tprintf(", sin6_scope_id=%u", addrbuf.sa6.sin6_scope_id); + } +#endif + break; +#endif +#if defined(AF_IPX) + case AF_IPX: + { + int i; + tprintf("sipx_port=htons(%u), ", + ntohs(addrbuf.sipx.sipx_port)); + /* Yes, I know, this does not look too + * strace-ish, but otherwise the IPX + * addresses just look monstrous... + * Anyways, feel free if you don't like + * this way.. :) + */ + tprintf("%08lx:", (unsigned long)ntohl(addrbuf.sipx.sipx_network)); + for (i = 0; i < IPX_NODE_LEN; i++) + tprintf("%02x", addrbuf.sipx.sipx_node[i]); + tprintf("/[%02x]", addrbuf.sipx.sipx_type); + } + break; +#endif /* AF_IPX */ +#ifdef AF_PACKET + case AF_PACKET: + { + int i; + tprintf("proto=%#04x, if%d, pkttype=", + ntohs(addrbuf.ll.sll_protocol), + addrbuf.ll.sll_ifindex); + printxval(af_packet_types, addrbuf.ll.sll_pkttype, "?"); + tprintf(", addr(%d)={%d, ", + addrbuf.ll.sll_halen, + addrbuf.ll.sll_hatype); + for (i = 0; i < addrbuf.ll.sll_halen; i++) + tprintf("%02x", addrbuf.ll.sll_addr[i]); + } + break; + +#endif /* AF_PACKET */ +#ifdef AF_NETLINK + case AF_NETLINK: + tprintf("pid=%d, groups=%08x", addrbuf.nl.nl_pid, addrbuf.nl.nl_groups); + break; +#endif /* AF_NETLINK */ + /* AF_AX25 AF_APPLETALK AF_NETROM AF_BRIDGE AF_AAL5 + AF_X25 AF_ROSE etc. still need to be done */ + + default: + tprints("sa_data="); + printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data, + sizeof addrbuf.sa.sa_data); + break; + } + tprints("}"); +} + +#if HAVE_SENDMSG +static const struct xlat scmvals[] = { +#ifdef SCM_RIGHTS + { SCM_RIGHTS, "SCM_RIGHTS" }, +#endif +#ifdef SCM_CREDENTIALS + { SCM_CREDENTIALS, "SCM_CREDENTIALS" }, +#endif + { 0, NULL } +}; + +static void +printcmsghdr(struct tcb *tcp, unsigned long addr, unsigned long len) +{ + struct cmsghdr *cmsg = len < sizeof(struct cmsghdr) ? + NULL : malloc(len); + if (cmsg == NULL || umoven(tcp, addr, len, (char *) cmsg) < 0) { + tprintf(", msg_control=%#lx", addr); + free(cmsg); + return; + } + + tprintf(", {cmsg_len=%u, cmsg_level=", (unsigned) cmsg->cmsg_len); + printxval(socketlayers, cmsg->cmsg_level, "SOL_???"); + tprints(", cmsg_type="); + + if (cmsg->cmsg_level == SOL_SOCKET) { + unsigned long cmsg_len; + + printxval(scmvals, cmsg->cmsg_type, "SCM_???"); + cmsg_len = (len < cmsg->cmsg_len) ? len : cmsg->cmsg_len; + + if (cmsg->cmsg_type == SCM_RIGHTS + && CMSG_LEN(sizeof(int)) <= cmsg_len) { + int *fds = (int *) CMSG_DATA(cmsg); + int first = 1; + + tprints(", {"); + while ((char *) fds < ((char *) cmsg + cmsg_len)) { + if (!first) + tprints(", "); + tprintf("%d", *fds++); + first = 0; + } + tprints("}}"); + free(cmsg); + return; + } + if (cmsg->cmsg_type == SCM_CREDENTIALS + && CMSG_LEN(sizeof(struct ucred)) <= cmsg_len) { + struct ucred *uc = (struct ucred *) CMSG_DATA(cmsg); + + tprintf("{pid=%ld, uid=%ld, gid=%ld}}", + (long)uc->pid, (long)uc->uid, (long)uc->gid); + free(cmsg); + return; + } + } + free(cmsg); + tprints(", ...}"); +} + +static void +do_msghdr(struct tcb *tcp, struct msghdr *msg, unsigned long data_size) +{ + tprintf("{msg_name(%d)=", msg->msg_namelen); + printsock(tcp, (long)msg->msg_name, msg->msg_namelen); + + tprintf(", msg_iov(%lu)=", (unsigned long)msg->msg_iovlen); + tprint_iov_upto(tcp, (unsigned long)msg->msg_iovlen, + (unsigned long)msg->msg_iov, 1, data_size); + +#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL + tprintf(", msg_controllen=%lu", (unsigned long)msg->msg_controllen); + if (msg->msg_controllen) + printcmsghdr(tcp, (unsigned long) msg->msg_control, + msg->msg_controllen); + tprints(", msg_flags="); + printflags(msg_flags, msg->msg_flags, "MSG_???"); +#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */ + tprintf("msg_accrights=%#lx, msg_accrightslen=%u", + (unsigned long) msg->msg_accrights, msg->msg_accrightslen); +#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */ + tprints("}"); +} + +struct msghdr32 { + uint32_t /* void* */ msg_name; + uint32_t /* socklen_t */msg_namelen; + uint32_t /* iovec* */ msg_iov; + uint32_t /* size_t */ msg_iovlen; + uint32_t /* void* */ msg_control; + uint32_t /* size_t */ msg_controllen; + uint32_t /* int */ msg_flags; +}; +struct mmsghdr32 { + struct msghdr32 msg_hdr; + uint32_t /* unsigned */ msg_len; +}; + +static void +printmsghdr(struct tcb *tcp, long addr, unsigned long data_size) +{ + struct msghdr msg; + +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize == 4) { + struct msghdr32 msg32; + + if (umove(tcp, addr, &msg32) < 0) { + tprintf("%#lx", addr); + return; + } + msg.msg_name = (void*)(long)msg32.msg_name; + msg.msg_namelen = msg32.msg_namelen; + msg.msg_iov = (void*)(long)msg32.msg_iov; + msg.msg_iovlen = msg32.msg_iovlen; + msg.msg_control = (void*)(long)msg32.msg_control; + msg.msg_controllen = msg32.msg_controllen; + msg.msg_flags = msg32.msg_flags; + } else +#endif + if (umove(tcp, addr, &msg) < 0) { + tprintf("%#lx", addr); + return; + } + do_msghdr(tcp, &msg, data_size); +} + +static void +printmmsghdr(struct tcb *tcp, long addr, unsigned int idx, unsigned long msg_len) +{ + struct mmsghdr { + struct msghdr msg_hdr; + unsigned msg_len; + } mmsg; + +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize == 4) { + struct mmsghdr32 mmsg32; + + addr += sizeof(mmsg32) * idx; + if (umove(tcp, addr, &mmsg32) < 0) { + tprintf("%#lx", addr); + return; + } + mmsg.msg_hdr.msg_name = (void*)(long)mmsg32.msg_hdr.msg_name; + mmsg.msg_hdr.msg_namelen = mmsg32.msg_hdr.msg_namelen; + mmsg.msg_hdr.msg_iov = (void*)(long)mmsg32.msg_hdr.msg_iov; + mmsg.msg_hdr.msg_iovlen = mmsg32.msg_hdr.msg_iovlen; + mmsg.msg_hdr.msg_control = (void*)(long)mmsg32.msg_hdr.msg_control; + mmsg.msg_hdr.msg_controllen = mmsg32.msg_hdr.msg_controllen; + mmsg.msg_hdr.msg_flags = mmsg32.msg_hdr.msg_flags; + mmsg.msg_len = mmsg32.msg_len; + } else +#endif + { + addr += sizeof(mmsg) * idx; + if (umove(tcp, addr, &mmsg) < 0) { + tprintf("%#lx", addr); + return; + } + } + tprints("{"); + do_msghdr(tcp, &mmsg.msg_hdr, msg_len ? msg_len : mmsg.msg_len); + tprintf(", %u}", mmsg.msg_len); +} + +static void +decode_mmsg(struct tcb *tcp, unsigned long msg_len) +{ + /* mmsgvec */ + if (syserror(tcp)) { + tprintf("%#lx", tcp->u_arg[1]); + } else { + unsigned int len = tcp->u_rval; + unsigned int i; + + tprints("{"); + for (i = 0; i < len; ++i) { + if (i) + tprints(", "); + printmmsghdr(tcp, tcp->u_arg[1], i, msg_len); + } + tprints("}"); + } + /* vlen */ + tprintf(", %u, ", (unsigned int) tcp->u_arg[2]); + /* flags */ + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); +} + +#endif /* HAVE_SENDMSG */ + +/* + * low bits of the socket type define real socket type, + * other bits are socket type flags. + */ +static void +tprint_sock_type(struct tcb *tcp, int flags) +{ + const char *str = xlookup(socktypes, flags & SOCK_TYPE_MASK); + + if (str) { + tprints(str); + flags &= ~SOCK_TYPE_MASK; + if (!flags) + return; + tprints("|"); + } + printflags(sock_type_flags, flags, "SOCK_???"); +} + +int +sys_socket(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(domains, tcp->u_arg[0], "PF_???"); + tprints(", "); + tprint_sock_type(tcp, tcp->u_arg[1]); + tprints(", "); + switch (tcp->u_arg[0]) { + case PF_INET: +#ifdef PF_INET6 + case PF_INET6: +#endif + printxval(protocols, tcp->u_arg[2], "IPPROTO_???"); + break; +#ifdef PF_IPX + case PF_IPX: + /* BTW: I don't believe this.. */ + tprints("["); + printxval(domains, tcp->u_arg[2], "PF_???"); + tprints("]"); + break; +#endif /* PF_IPX */ + default: + tprintf("%lu", tcp->u_arg[2]); + break; + } + } + return 0; +} + +int +sys_bind(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu", tcp->u_arg[2]); + } + return 0; +} + +int +sys_connect(struct tcb *tcp) +{ + return sys_bind(tcp); +} + +int +sys_listen(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]); + } + return 0; +} + +static int +do_accept(struct tcb *tcp, int flags_arg) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + return 0; + } + if (!tcp->u_arg[2]) + tprintf("%#lx, NULL", tcp->u_arg[1]); + else { + int len; + if (tcp->u_arg[1] == 0 || syserror(tcp) + || umove(tcp, tcp->u_arg[2], &len) < 0) { + tprintf("%#lx", tcp->u_arg[1]); + } else { + printsock(tcp, tcp->u_arg[1], len); + } + tprints(", "); + printnum_int(tcp, tcp->u_arg[2], "%u"); + } + if (flags_arg >= 0) { + tprints(", "); + printflags(sock_type_flags, tcp->u_arg[flags_arg], + "SOCK_???"); + } + return 0; +} + +int +sys_accept(struct tcb *tcp) +{ + return do_accept(tcp, -1); +} + +int +sys_accept4(struct tcb *tcp) +{ + return do_accept(tcp, 3); +} + +int +sys_send(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, ", tcp->u_arg[2]); + /* flags */ + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + } + return 0; +} + +int +sys_sendto(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %lu, ", tcp->u_arg[2]); + /* flags */ + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + /* to address */ + tprints(", "); + printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]); + /* to length */ + tprintf(", %lu", tcp->u_arg[5]); + } + return 0; +} + +#ifdef HAVE_SENDMSG + +int +sys_sendmsg(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printmsghdr(tcp, tcp->u_arg[1], (unsigned long) -1L); + /* flags */ + tprints(", "); + printflags(msg_flags, tcp->u_arg[2], "MSG_???"); + } + return 0; +} + +int +sys_sendmmsg(struct tcb *tcp) +{ + if (entering(tcp)) { + /* sockfd */ + tprintf("%d, ", (int) tcp->u_arg[0]); + if (!verbose(tcp)) { + tprintf("%#lx, %u, ", + tcp->u_arg[1], (unsigned int) tcp->u_arg[2]); + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + } + } else { + if (verbose(tcp)) + decode_mmsg(tcp, (unsigned long) -1L); + } + return 0; +} + +#endif /* HAVE_SENDMSG */ + +int +sys_recv(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_rval); + + tprintf(", %lu, ", tcp->u_arg[2]); + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + } + return 0; +} + +int +sys_recvfrom(struct tcb *tcp) +{ + int fromlen; + + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) { + tprintf("%#lx, %lu, %lu, %#lx, %#lx", + tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3], + tcp->u_arg[4], tcp->u_arg[5]); + return 0; + } + /* buf */ + printstr(tcp, tcp->u_arg[1], tcp->u_rval); + /* len */ + tprintf(", %lu, ", tcp->u_arg[2]); + /* flags */ + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + /* from address, len */ + if (!tcp->u_arg[4] || !tcp->u_arg[5]) { + if (tcp->u_arg[4] == 0) + tprints(", NULL"); + else + tprintf(", %#lx", tcp->u_arg[4]); + if (tcp->u_arg[5] == 0) + tprints(", NULL"); + else + tprintf(", %#lx", tcp->u_arg[5]); + return 0; + } + if (umove(tcp, tcp->u_arg[5], &fromlen) < 0) { + tprints(", {...}, [?]"); + return 0; + } + tprints(", "); + printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]); + /* from length */ + tprintf(", [%u]", fromlen); + } + return 0; +} + +#ifdef HAVE_SENDMSG + +int +sys_recvmsg(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + } else { + if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printmsghdr(tcp, tcp->u_arg[1], tcp->u_rval); + /* flags */ + tprints(", "); + printflags(msg_flags, tcp->u_arg[2], "MSG_???"); + } + return 0; +} + +int +sys_recvmmsg(struct tcb *tcp) +{ + /* +5 chars are for "left " prefix */ + static char str[5 + TIMESPEC_TEXT_BUFSIZE]; + + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + if (verbose(tcp)) { + sprint_timespec(str, tcp, tcp->u_arg[4]); + /* Abusing tcp->auxstr as temp storage. + * Will be used and freed on syscall exit. + */ + tcp->auxstr = strdup(str); + } else { + tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]); + printflags(msg_flags, tcp->u_arg[3], "MSG_???"); + tprints(", "); + print_timespec(tcp, tcp->u_arg[4]); + } + return 0; + } else { + if (verbose(tcp)) { + decode_mmsg(tcp, 0); + /* timeout on entrance */ + tprintf(", %s", tcp->auxstr ? tcp->auxstr : "{...}"); + free((void *) tcp->auxstr); + tcp->auxstr = NULL; + } + if (syserror(tcp)) + return 0; + if (tcp->u_rval == 0) { + tcp->auxstr = "Timeout"; + return RVAL_STR; + } + if (!verbose(tcp)) + return 0; + /* timeout on exit */ + sprint_timespec(stpcpy(str, "left "), tcp, tcp->u_arg[4]); + tcp->auxstr = str; + return RVAL_STR; + } +} + +#endif /* HAVE_SENDMSG */ + +static const struct xlat shutdown_modes[] = { + { 0, "SHUT_RD" }, + { 1, "SHUT_WR" }, + { 2, "SHUT_RDWR" }, + { 0, NULL } +}; + +int +sys_shutdown(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printxval(shutdown_modes, tcp->u_arg[1], "SHUT_???"); + } + return 0; +} + +int +sys_getsockname(struct tcb *tcp) +{ + return sys_accept(tcp); +} + +int +sys_getpeername(struct tcb *tcp) +{ + return sys_accept(tcp); +} + +static int +do_pipe(struct tcb *tcp, int flags_arg) +{ + if (exiting(tcp)) { + if (syserror(tcp)) { + tprintf("%#lx", tcp->u_arg[0]); + } else { +#if !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64) + int fds[2]; + + if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0) + tprints("[...]"); + else + tprintf("[%u, %u]", fds[0], fds[1]); +#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(IA64) + tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp)); +#else + tprintf("%#lx", tcp->u_arg[0]); +#endif + } + if (flags_arg >= 0) { + tprints(", "); + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); + } + } + return 0; +} + +int +sys_pipe(struct tcb *tcp) +{ + return do_pipe(tcp, -1); +} + +int +sys_pipe2(struct tcb *tcp) +{ + return do_pipe(tcp, 1); +} + +int +sys_socketpair(struct tcb *tcp) +{ + int fds[2]; + + if (entering(tcp)) { + printxval(domains, tcp->u_arg[0], "PF_???"); + tprints(", "); + tprint_sock_type(tcp, tcp->u_arg[1]); + tprints(", "); + switch (tcp->u_arg[0]) { + case PF_INET: + printxval(protocols, tcp->u_arg[2], "IPPROTO_???"); + break; +#ifdef PF_IPX + case PF_IPX: + /* BTW: I don't believe this.. */ + tprints("["); + printxval(domains, tcp->u_arg[2], "PF_???"); + tprints("]"); + break; +#endif /* PF_IPX */ + default: + tprintf("%lu", tcp->u_arg[2]); + break; + } + } else { + if (syserror(tcp)) { + tprintf(", %#lx", tcp->u_arg[3]); + return 0; + } + if (umoven(tcp, tcp->u_arg[3], sizeof fds, (char *) fds) < 0) + tprints(", [...]"); + else + tprintf(", [%u, %u]", fds[0], fds[1]); + } + return 0; +} + +int +sys_getsockopt(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printxval(socketlayers, tcp->u_arg[1], "SOL_???"); + tprints(", "); + switch (tcp->u_arg[1]) { + case SOL_SOCKET: + printxval(sockoptions, tcp->u_arg[2], "SO_???"); + break; +#ifdef SOL_IP + case SOL_IP: + printxval(sockipoptions, tcp->u_arg[2], "IP_???"); + break; +#endif +#ifdef SOL_IPV6 + case SOL_IPV6: + printxval(sockipv6options, tcp->u_arg[2], "IPV6_???"); + break; +#endif +#ifdef SOL_IPX + case SOL_IPX: + printxval(sockipxoptions, tcp->u_arg[2], "IPX_???"); + break; +#endif +#ifdef SOL_PACKET + case SOL_PACKET: + printxval(sockpacketoptions, tcp->u_arg[2], "PACKET_???"); + break; +#endif +#ifdef SOL_TCP + case SOL_TCP: + printxval(socktcpoptions, tcp->u_arg[2], "TCP_???"); + break; +#endif +#ifdef SOL_SCTP + case SOL_SCTP: + printxval(socksctpoptions, tcp->u_arg[2], "SCTP_???"); + break; +#endif + + /* SOL_AX25 SOL_ROSE SOL_ATALK SOL_NETROM SOL_UDP SOL_DECNET SOL_X25 + * etc. still need work */ + default: + tprintf("%lu", tcp->u_arg[2]); + break; + } + tprints(", "); + } else { + int len; + if (syserror(tcp) || umove(tcp, tcp->u_arg[4], &len) < 0) { + tprintf("%#lx, %#lx", + tcp->u_arg[3], tcp->u_arg[4]); + return 0; + } + + switch (tcp->u_arg[1]) { + case SOL_SOCKET: + switch (tcp->u_arg[2]) { +#ifdef SO_LINGER + case SO_LINGER: + if (len == sizeof(struct linger)) { + struct linger linger; + if (umove(tcp, + tcp->u_arg[3], + &linger) < 0) + break; + tprintf("{onoff=%d, linger=%d}, " + "[%d]", + linger.l_onoff, + linger.l_linger, + len); + return 0; + } + break; +#endif +#ifdef SO_PEERCRED + case SO_PEERCRED: + if (len == sizeof(struct ucred)) { + struct ucred uc; + if (umove(tcp, + tcp->u_arg[3], + &uc) < 0) + break; + tprintf("{pid=%ld, uid=%ld, gid=%ld}, " + "[%d]", + (long)uc.pid, + (long)uc.uid, + (long)uc.gid, + len); + return 0; + } + break; +#endif + } + break; + case SOL_PACKET: + switch (tcp->u_arg[2]) { +#ifdef PACKET_STATISTICS + case PACKET_STATISTICS: + if (len == sizeof(struct tpacket_stats)) { + struct tpacket_stats stats; + if (umove(tcp, + tcp->u_arg[3], + &stats) < 0) + break; + tprintf("{packets=%u, drops=%u}, " + "[%d]", + stats.tp_packets, + stats.tp_drops, + len); + return 0; + } + break; +#endif + } + break; + } + + if (len == sizeof(int)) { + printnum_int(tcp, tcp->u_arg[3], "%d"); + } + else { + printstr(tcp, tcp->u_arg[3], len); + } + tprintf(", [%d]", len); + } + return 0; +} + +#if defined(ICMP_FILTER) +static void printicmpfilter(struct tcb *tcp, long addr) +{ + struct icmp_filter filter; + + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp) || !verbose(tcp)) { + tprintf("%#lx", addr); + return; + } + if (umove(tcp, addr, &filter) < 0) { + tprints("{...}"); + return; + } + + tprints("~("); + printflags(icmpfilterflags, ~filter.data, "ICMP_???"); + tprints(")"); +} +#endif /* ICMP_FILTER */ + +static int +printsockopt(struct tcb *tcp, int level, int name, long addr, int len) +{ + printxval(socketlayers, level, "SOL_??"); + tprints(", "); + switch (level) { + case SOL_SOCKET: + printxval(sockoptions, name, "SO_???"); + switch (name) { +#if defined(SO_LINGER) + case SO_LINGER: + if (len == sizeof(struct linger)) { + struct linger linger; + if (umove(tcp, addr, &linger) < 0) + break; + tprintf(", {onoff=%d, linger=%d}", + linger.l_onoff, + linger.l_linger); + return 0; + } + break; +#endif + } + break; +#ifdef SOL_IP + case SOL_IP: + printxval(sockipoptions, name, "IP_???"); + break; +#endif +#ifdef SOL_IPV6 + case SOL_IPV6: + printxval(sockipv6options, name, "IPV6_???"); + break; +#endif +#ifdef SOL_IPX + case SOL_IPX: + printxval(sockipxoptions, name, "IPX_???"); + break; +#endif +#ifdef SOL_PACKET + case SOL_PACKET: + printxval(sockpacketoptions, name, "PACKET_???"); + /* TODO: decode packate_mreq for PACKET_*_MEMBERSHIP */ + switch (name) { +#ifdef PACKET_RX_RING + case PACKET_RX_RING: +#endif +#ifdef PACKET_TX_RING + case PACKET_TX_RING: +#endif +#if defined(PACKET_RX_RING) || defined(PACKET_TX_RING) + if (len == sizeof(struct tpacket_req)) { + struct tpacket_req req; + if (umove(tcp, addr, &req) < 0) + break; + tprintf(", {block_size=%u, block_nr=%u, frame_size=%u, frame_nr=%u}", + req.tp_block_size, + req.tp_block_nr, + req.tp_frame_size, + req.tp_frame_nr); + return 0; + } + break; +#endif /* PACKET_RX_RING || PACKET_TX_RING */ + } + break; +#endif +#ifdef SOL_TCP + case SOL_TCP: + printxval(socktcpoptions, name, "TCP_???"); + break; +#endif +#ifdef SOL_SCTP + case SOL_SCTP: + printxval(socksctpoptions, name, "SCTP_???"); + break; +#endif +#ifdef SOL_RAW + case SOL_RAW: + printxval(sockrawoptions, name, "RAW_???"); + switch (name) { +#if defined(ICMP_FILTER) + case ICMP_FILTER: + tprints(", "); + printicmpfilter(tcp, addr); + return 0; +#endif + } + break; +#endif + + /* SOL_AX25 SOL_ATALK SOL_NETROM SOL_UDP SOL_DECNET SOL_X25 + * etc. still need work */ + + default: + tprintf("%u", name); + } + + /* default arg printing */ + + tprints(", "); + + if (len == sizeof(int)) { + printnum_int(tcp, addr, "%d"); + } + else { + printstr(tcp, addr, len); + } + return 0; +} + +#ifdef HAVE_STRUCT_OPTHDR + +void +print_sock_optmgmt(struct tcb *tcp, long addr, int len) +{ + int c = 0; + struct opthdr hdr; + + while (len >= (int) sizeof hdr) { + if (umove(tcp, addr, &hdr) < 0) break; + if (c++) { + tprints(", "); + } + else if (len > hdr.len + sizeof hdr) { + tprints("["); + } + tprints("{"); + addr += sizeof hdr; + len -= sizeof hdr; + printsockopt(tcp, hdr.level, hdr.name, addr, hdr.len); + if (hdr.len > 0) { + addr += hdr.len; + len -= hdr.len; + } + tprints("}"); + } + if (len > 0) { + if (c++) tprints(", "); + printstr(tcp, addr, len); + } + if (c > 1) tprints("]"); +} + +#endif + +int +sys_setsockopt(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2], + tcp->u_arg[3], tcp->u_arg[4]); + tprintf(", %lu", tcp->u_arg[4]); + } + return 0; +} diff --git a/alice-strace/pathtrace.c b/alice-strace/pathtrace.c new file mode 100644 index 0000000..d4c2dc4 --- /dev/null +++ b/alice-strace/pathtrace.c @@ -0,0 +1,361 @@ +/* + * Copyright (c) 2011, Comtrol Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 +#ifdef HAVE_POLL_H +# include +#endif +#ifdef HAVE_SYS_POLL_H +# include +#endif + +#include "syscall.h" + +const char **paths_selected = NULL; +static unsigned num_selected = 0; + +/* + * Return true if specified path matches one that we're tracing. + */ +static int +pathmatch(const char *path) +{ + unsigned i; + + for (i = 0; i < num_selected; ++i) { + if (strcmp(path, paths_selected[i]) == 0) + return 1; + } + return 0; +} + +/* + * Return true if specified path (in user-space) matches. + */ +static int +upathmatch(struct tcb *tcp, unsigned long upath) +{ + char path[PATH_MAX + 1]; + + return umovestr(tcp, upath, sizeof path, path) > 0 && + pathmatch(path); +} + +/* + * Return true if specified fd maps to a path we're tracing. + */ +static int +fdmatch(struct tcb *tcp, int fd) +{ + char path[PATH_MAX + 1]; + int n = getfdpath(tcp, fd, path, sizeof(path)); + + return n >= 0 && pathmatch(path); +} + +/* + * Add a path to the set we're tracing. + * Secifying NULL will delete all paths. + */ +static void +storepath(const char *path) +{ + unsigned i; + + if (pathmatch(path)) + return; /* already in table */ + + i = num_selected++; + paths_selected = realloc(paths_selected, num_selected * sizeof(paths_selected[0])); + if (!paths_selected) + die_out_of_memory(); + paths_selected[i] = path; +} + +/* + * Get path associated with fd. + */ +int +getfdpath(struct tcb *tcp, int fd, char *buf, unsigned bufsize) +{ + char linkpath[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3]; + ssize_t n; + + if (fd < 0) + return -1; + + sprintf(linkpath, "/proc/%u/fd/%u", tcp->pid, fd); + n = readlink(linkpath, buf, bufsize - 1); + /* + * NB: if buf is too small, readlink doesn't fail, + * it returns truncated result (IOW: n == bufsize - 1). + */ + if (n >= 0) + buf[n] = '\0'; + return n; +} + +/* + * Add a path to the set we're tracing. Also add the canonicalized + * version of the path. Secifying NULL will delete all paths. + */ +void +pathtrace_select(const char *path) +{ + char *rpath; + + storepath(path); + + rpath = realpath(path, NULL); + + if (rpath == NULL) + return; + + /* if realpath and specified path are same, we're done */ + if (strcmp(path, rpath) == 0) { + free(rpath); + return; + } + + fprintf(stderr, "Requested path '%s' resolved into '%s'\n", + path, rpath); + storepath(rpath); +} + +/* + * Return true if syscall accesses a selected path + * (or if no paths have been specified for tracing). + */ +int +pathtrace_match(struct tcb *tcp) +{ + const struct_sysent *s; + + s = tcp->s_ent; + + if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC))) + return 0; + + /* + * Check for special cases where we need to do something + * other than test arg[0]. + */ + + if (s->sys_func == sys_dup2 || + s->sys_func == sys_dup3 || + s->sys_func == sys_sendfile || + s->sys_func == sys_sendfile64 || + s->sys_func == sys_tee) + { + /* fd, fd */ + return fdmatch(tcp, tcp->u_arg[0]) || + fdmatch(tcp, tcp->u_arg[1]); + } + + if (s->sys_func == sys_inotify_add_watch || + s->sys_func == sys_faccessat || + s->sys_func == sys_fchmodat || + s->sys_func == sys_futimesat || + s->sys_func == sys_mkdirat || + s->sys_func == sys_unlinkat || + s->sys_func == sys_newfstatat || + s->sys_func == sys_mknodat || + s->sys_func == sys_openat || + s->sys_func == sys_readlinkat || + s->sys_func == sys_utimensat || + s->sys_func == sys_fchownat || + s->sys_func == sys_pipe2) + { + /* fd, path */ + return fdmatch(tcp, tcp->u_arg[0]) || + upathmatch(tcp, tcp->u_arg[1]); + } + + if (s->sys_func == sys_link || + s->sys_func == sys_mount) + { + /* path, path */ + return upathmatch(tcp, tcp->u_arg[0]) || + upathmatch(tcp, tcp->u_arg[1]); + } + + if (s->sys_func == sys_quotactl) + { + /* x, path */ + return upathmatch(tcp, tcp->u_arg[1]); + } + + if (s->sys_func == sys_renameat || + s->sys_func == sys_linkat) + { + /* fd, path, fd, path */ + return fdmatch(tcp, tcp->u_arg[0]) || + fdmatch(tcp, tcp->u_arg[2]) || + upathmatch(tcp, tcp->u_arg[1]) || + upathmatch(tcp, tcp->u_arg[3]); + } + + if ( + s->sys_func == sys_old_mmap || +#if defined(S390) + s->sys_func == sys_old_mmap_pgoff || +#endif + s->sys_func == sys_mmap || + s->sys_func == sys_mmap_pgoff || + s->sys_func == sys_mmap_4koff + ) { + /* x, x, x, x, fd */ + return fdmatch(tcp, tcp->u_arg[4]); + } + + if (s->sys_func == sys_symlinkat) { + /* path, fd, path */ + return fdmatch(tcp, tcp->u_arg[1]) || + upathmatch(tcp, tcp->u_arg[0]) || + upathmatch(tcp, tcp->u_arg[2]); + } + + if (s->sys_func == sys_splice) { + /* fd, x, fd, x, x */ + return fdmatch(tcp, tcp->u_arg[0]) || + fdmatch(tcp, tcp->u_arg[2]); + } + + if (s->sys_func == sys_epoll_ctl) { + /* x, x, fd, x */ + return fdmatch(tcp, tcp->u_arg[2]); + } + + if (s->sys_func == sys_select || + s->sys_func == sys_oldselect || + s->sys_func == sys_pselect6) + { + int i, j; + unsigned nfds; + long *args, oldargs[5]; + unsigned fdsize; + fd_set *fds; + + if (s->sys_func == sys_oldselect) { + if (umoven(tcp, tcp->u_arg[0], sizeof oldargs, + (char*) oldargs) < 0) + { + fprintf(stderr, "umoven() failed\n"); + return 0; + } + args = oldargs; + } else + args = tcp->u_arg; + + nfds = args[0]; + /* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */ + if (args[0] > 1024*1024) + nfds = 1024*1024; + if (args[0] < 0) + nfds = 0; + fdsize = ((((nfds + 7) / 8) + sizeof(long) - 1) + & -sizeof(long)); + fds = malloc(fdsize); + if (!fds) + die_out_of_memory(); + + for (i = 1; i <= 3; ++i) { + if (args[i] == 0) + continue; + + if (umoven(tcp, args[i], fdsize, (char *) fds) < 0) { + fprintf(stderr, "umoven() failed\n"); + continue; + } + + for (j = 0; j < nfds; ++j) + if (FD_ISSET(j, fds) && fdmatch(tcp, j)) { + free(fds); + return 1; + } + } + free(fds); + return 0; + } + + if (s->sys_func == sys_poll || + s->sys_func == sys_ppoll) + { + struct pollfd fds; + unsigned nfds; + unsigned long start, cur, end; + + start = tcp->u_arg[0]; + nfds = tcp->u_arg[1]; + + end = start + sizeof(fds) * nfds; + + if (nfds == 0 || end < start) + return 0; + + for (cur = start; cur < end; cur += sizeof(fds)) + if ((umoven(tcp, cur, sizeof fds, (char *) &fds) == 0) + && fdmatch(tcp, fds.fd)) + return 1; + + return 0; + } + + if (s->sys_func == printargs || + s->sys_func == sys_pipe || + s->sys_func == sys_pipe2 || + s->sys_func == sys_eventfd2 || + s->sys_func == sys_eventfd || + s->sys_func == sys_inotify_init1 || + s->sys_func == sys_timerfd_create || + s->sys_func == sys_timerfd_settime || + s->sys_func == sys_timerfd_gettime || + s->sys_func == sys_epoll_create || + strcmp(s->sys_name, "fanotify_init") == 0) + { + /* + * These have TRACE_FILE or TRACE_DESCRIPTOR set, but they + * don't have any file descriptor or path args to test. + */ + return 0; + } + + /* + * Our fallback position for calls that haven't already + * been handled is to just check arg[0]. + */ + + if (s->sys_flags & TRACE_FILE) + return upathmatch(tcp, tcp->u_arg[0]); + + if (s->sys_flags & TRACE_DESC) + return fdmatch(tcp, tcp->u_arg[0]); + + return 0; +} diff --git a/alice-strace/pretty_print_stack_trace.py b/alice-strace/pretty_print_stack_trace.py new file mode 100644 index 0000000..c859350 --- /dev/null +++ b/alice-strace/pretty_print_stack_trace.py @@ -0,0 +1,263 @@ +# Pretty-print the output of strace++, using gdb to print out the +# function/file/line info for stack traces +# +# argv[1] - output from strace++ (use -o option to create the trace file) +# +# (also requires the 'file' program to be installed in addition to 'gdb') +# +# by Philip Guo + +import os, sys, re, subprocess, cPickle +from collections import defaultdict, namedtuple +from optparse import OptionParser + + +# Return a symbol table, which is a dict where: +# +# Key: Filename +# Value: Dict where ... +# Key: hex address (string) +# Value: (function name, instruction offset, filename, line number) +# Any of those fields might be null when there isn't adequate debug info +# +# containing all the debug info needed to pretty-print the entries from an +# strace++ output file. +# +# Input: fn is the filename of the strace++ output trace file +def create_symtab_for_strace_out(fn): + # each element is a string representing a return address, e.g.,: + # '/lib32/libc-2.11.1.so:0x6990d:0xf769390d' + # it's a colon-separated triple containing: + # 1.) absolute path to the binary + # 2.) our best guess at the offset within that binary + # 3.) the original return address (in case the calculated offset is bogus) + return_addrs_set = set() + + # do a first pass to find ALL return addresses, so that we can call gdb to do a lookup + for line in open(fn): + # look for a raw stack trace of addrs like: + # [ /lib32/libc-2.11.1.so:0x67aef:0xf75ccaef /lib32/libc-2.11.1.so:0x67e06:0xf75cce06 ] + if line.strip() == '[]': + continue + if line[0] == '[': + first_rb = line.find(']') + stack_addrs = line[1:first_rb].strip() + if stack_addrs: + stack_addrs = stack_addrs.split() + for addr in stack_addrs: + return_addrs_set.add(addr) + + + # Key: filename + # Value: set of (addr_offset, original_addr) + d = defaultdict(set) + + for e in return_addrs_set: + filename, addr_offset, original_addr = e.split(':') + d[filename].add((addr_offset, original_addr)) + + + # Key: filename + # Value: list of addresses to query (strings representing hex numbers) + filenames_to_addrs = defaultdict(list) + + + for filename, addrs_set in d.iteritems(): + # use the following heuristic to determine which address to use: + # - if the file is an 'executable', then use original_addr + # - otherwise if the file is a 'shared object', then use addr_offset + # + # shared objects are usually mmapped into "high" addresses and thus need an + # addr_offset, while exectuables usually do NOT need an offset and can instead + # use their original_addr to do symbol lookups + (file_out, _) = subprocess.Popen(['file', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + if 'shared object' in file_out: + for (addr_offset, _) in addrs_set: + filenames_to_addrs[filename].append(addr_offset) + elif 'executable' in file_out: + for (_, original_addr) in addrs_set: + filenames_to_addrs[filename].append(original_addr) + else: + print >> sys.stderr, "Warning:", filename, "doesn't appear to be an executable or shared library" + + + return get_symbol_table_using_gdb(filenames_to_addrs) + + +# some fields might be null if there isn't adequate debug info +SymbolTableEntry = namedtuple('SymbolTableEntry', + ['func_name', 'instr_offset', 'src_filename', 'src_line_num']) + +# Use gdb to probe the debug info of binaries in order to return a symbol +# table, which is structured as a dict where: +# +# Key: Filename +# Value: Dict where ... +# Key: hex address (string) +# Value: a SymbolTableEntry object +# +# The advantage of using gdb is that you can usually get file/line info, and gdb +# supports "splitdebug" binaries where the debug info is stored in a separate +# binary linked with .gnu_debuglink +# (See: http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html) +# +# The disadvantage is that gdb is quite heavyweight. Also, when you can't get +# .gnu_debuglink to work with custom paths (e.g., on Chrome OS), then gdb +# won't print out the proper debug info. TODO: try to look into improving this! +# +# Input: filenames_to_addrs is a dict mapping each binary filename to a list of +# addresses (strings representing hex numbers) on which to query for debug info +def get_symbol_table_using_gdb(filenames_to_addrs): + ret = defaultdict(dict) + + lineRE = re.compile('Line (\d+) of "(.*)" starts at address 0x\S+ <(.*?)> and ends at 0x\S+') + # even if there's no line number info, it might give you the function name + # e.g., in "No line number information available for address 0x857 <_dl_start_user>" + # at least you can find out that the function name is _dl_start_user + noLineInfoRE = re.compile('No line number information available for address 0x\S+ <(.*?)>') + + # for each file, create a gdb script to introspect all elements of addr_list + for filename, addrs_lst in filenames_to_addrs.iteritems(): + # now create a gdb script with some filler and the critical line that makes + # the query for debug info: 'info line *' + tmp_gdb_script = open('temp.gdb', 'w') + for addr in sorted(addrs_lst): + print >> tmp_gdb_script, 'echo ===\\n' + print >> tmp_gdb_script, 'echo ' + addr + '\\n' + print >> tmp_gdb_script, 'info line *' + addr + tmp_gdb_script.close() # force write to disk, or else temp.gdb will be empty! + + # now run: + # gdb -batch -x temp.gdb + # and harvest its stdout + # ( -batch mode allows gdb to produce 'clean' output and be run as a subprocess + # see: http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_8.html ) + (gdb_stdout, gdb_stderr) = subprocess.Popen(['gdb', filename, '-batch', '-x', 'temp.gdb'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + if gdb_stderr: + print >> sys.stderr, "GDB warnings while processing %s:" % (filename,), gdb_stderr, + + # parse the output of gdb, where each record is: + # === + # + # one or more lines containing the output of gdb (which should be appended together later) + tokens = gdb_stdout.split('===') + for t in tokens: + if not t: + continue + # collapse all space-like characters into a single space to simplify parsing later + t = re.sub('\s+', ' ', t).strip() + hex_addr = t.split()[0].strip() + # gdb output is the REST of the line + gdb_out = t[len(hex_addr):].strip() + #print hex_addr, gdb_out + + assert hex_addr.startswith('0x') + + m = lineRE.match(gdb_out) + if m: + (linenum, src_filename, funcname) = m.groups() + # split up "funcname+offset", e.g., 'main+21' + s = funcname.split('+') + # don't just assume that funcname splits into either 1 or 2 components. Sometimes + # there are weird function names like "STRING::operator+=(char const*)+91" + # containing a '+' in the function name!!! + if len(s) > 1: + offset = int(s[-1]) # the FINAL component should be the offset number + funcname = '+'.join(s[:-1]) # join the REST of the components into funcname + else: + offset = 0 + funcname = s[0] + + ret[filename][hex_addr] = SymbolTableEntry(funcname, offset, src_filename, int(linenum)) + else: + m = noLineInfoRE.match(gdb_out) + if m: + funcname = m.group(1) + + s = funcname.split('+') + assert len(s) <= 2 + offset = 0 + if len(s) == 2: + offset = int(s[1]) + funcname = s[0] + ret[filename][hex_addr] = SymbolTableEntry(funcname, offset, None, None) + + return ret + + +StackEntry = namedtuple('StackEntry', + ['func_name', 'instr_offset', 'src_filename', 'src_line_num', + 'binary_filename', 'addr_offset', 'raw_addr']) + +# Returns True iff two StackEntry objects are equal WITHOUT comparing raw_addr. +# Sometimes two call sites are equal even though they have different raw +# addresses in the binary!!! +# (as another optimization --- we only need to compare binary_filename and +# addr_offset, since the debug info are obtained from those fields using gdb) +def equals_modulo_raw_addr(x, y): + return x.binary_filename == y.binary_filename and \ + x.addr_offset == y.addr_offset + + +# Creates an object from a line of strace++ output and a symbol table (symtab) +class StraceLogEntry: + def __init__(self, line, symtab): + self.original_line = line.strip() + self.original_strace_string = None # raw output from basic strace + self.syscall_name = None + + # list of stack entries, each of which is a StackEntry (namedtuple) entry + self.backtrace = [] + + if line[0] == '[': + first_rb = line.find(']') + rest = line[first_rb+1:].strip() + self.original_strace_string = rest + + # self.original_strace_string might be something like: + # "mprotect(0x8049000, 4096, PROT_READ) = 0" + # so the syscall name is what comes before the parens + # + # Note that sometimes there's a PID that appears before the syscall name + # (e.g., when you use 'strace -f'), so in those cases, strip off the PID + # "2383 mprotect(0x8049000, 4096, PROT_READ) = 0" + first_paren = self.original_strace_string.find('(') + self.syscall_name = self.original_strace_string[:first_paren].strip() + toks = self.syscall_name.split() + if len(toks) == 2: + try: + _ = int(toks[0]) # check if this is an int! + self.syscall_name = toks[1].strip() + except ValueError: + pass + + stack_addrs = line[1:first_rb].strip() + if stack_addrs: + stack_addrs_lst = stack_addrs.split() + for addr in stack_addrs_lst: + binary_filename, addr_offset, raw_addr = addr.split(':') + symtab_for_file = symtab[binary_filename] + # try both addr_offset and raw_addr to see if either one matches: + if addr_offset in symtab_for_file: + syms = symtab_for_file[addr_offset] + elif raw_addr in symtab_for_file: + syms = symtab_for_file[raw_addr] + else: + syms = SymbolTableEntry(None, None, None, None) + + assert len(syms) == 4 + t = StackEntry(syms.func_name, syms.instr_offset, syms.src_filename, syms.src_line_num, + binary_filename, addr_offset, raw_addr) + self.backtrace.append(t) + + +stack_file = sys.argv[1] +symtab = create_symtab_for_strace_out(stack_file) +for line in open(stack_file, 'r'): + print '-------------------------------------------------' + print line + backtrace = StraceLogEntry(line, symtab).backtrace + for x in backtrace: + print x + diff --git a/alice-strace/process.c b/alice-strace/process.c new file mode 100644 index 0000000..fe52848 --- /dev/null +++ b/alice-strace/process.c @@ -0,0 +1,3030 @@ +/* + * 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) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * Copyright (c) 2000 PocketPenguins Inc. Linux for Hitachi SuperH + * port by Greg Banks + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 +#include +#include +#ifdef HAVE_ELF_H +# include +#endif + +#ifdef HAVE_SYS_REG_H +# include +# ifndef PTRACE_PEEKUSR +# define PTRACE_PEEKUSR PTRACE_PEEKUSER +# endif +# ifndef PTRACE_POKEUSR +# define PTRACE_POKEUSR PTRACE_POKEUSER +# endif +#endif + +#ifdef HAVE_LINUX_PTRACE_H +# undef PTRACE_SYSCALL +# ifdef HAVE_STRUCT_IA64_FPREG +# define ia64_fpreg XXX_ia64_fpreg +# endif +# ifdef HAVE_STRUCT_PT_ALL_USER_REGS +# define pt_all_user_regs XXX_pt_all_user_regs +# endif +# include +# undef ia64_fpreg +# undef pt_all_user_regs +#endif + +#if defined(SPARC64) +# define r_pc r_tpc +# undef PTRACE_GETREGS +# define PTRACE_GETREGS PTRACE_GETREGS64 +# undef PTRACE_SETREGS +# define PTRACE_SETREGS PTRACE_SETREGS64 +#endif + +#ifdef HAVE_LINUX_FUTEX_H +# include +#endif +#ifndef FUTEX_WAIT +# define FUTEX_WAIT 0 +#endif +#ifndef FUTEX_WAKE +# define FUTEX_WAKE 1 +#endif +#ifndef FUTEX_FD +# define FUTEX_FD 2 +#endif +#ifndef FUTEX_REQUEUE +# define FUTEX_REQUEUE 3 +#endif + +#include +#include +#undef GETGROUPS_T +#define GETGROUPS_T __kernel_gid_t +#undef GETGROUPS32_T +#define GETGROUPS32_T __kernel_gid32_t + +#if defined(IA64) +# include +# include +#endif + +#ifdef HAVE_PRCTL +# include + +static const struct xlat prctl_options[] = { +#ifdef PR_MAXPROCS + { PR_MAXPROCS, "PR_MAXPROCS" }, +#endif +#ifdef PR_ISBLOCKED + { PR_ISBLOCKED, "PR_ISBLOCKED" }, +#endif +#ifdef PR_SETSTACKSIZE + { PR_SETSTACKSIZE, "PR_SETSTACKSIZE" }, +#endif +#ifdef PR_GETSTACKSIZE + { PR_GETSTACKSIZE, "PR_GETSTACKSIZE" }, +#endif +#ifdef PR_MAXPPROCS + { PR_MAXPPROCS, "PR_MAXPPROCS" }, +#endif +#ifdef PR_UNBLKONEXEC + { PR_UNBLKONEXEC, "PR_UNBLKONEXEC" }, +#endif +#ifdef PR_ATOMICSIM + { PR_ATOMICSIM, "PR_ATOMICSIM" }, +#endif +#ifdef PR_SETEXITSIG + { PR_SETEXITSIG, "PR_SETEXITSIG" }, +#endif +#ifdef PR_RESIDENT + { PR_RESIDENT, "PR_RESIDENT" }, +#endif +#ifdef PR_ATTACHADDR + { PR_ATTACHADDR, "PR_ATTACHADDR" }, +#endif +#ifdef PR_DETACHADDR + { PR_DETACHADDR, "PR_DETACHADDR" }, +#endif +#ifdef PR_TERMCHILD + { PR_TERMCHILD, "PR_TERMCHILD" }, +#endif +#ifdef PR_GETSHMASK + { PR_GETSHMASK, "PR_GETSHMASK" }, +#endif +#ifdef PR_GETNSHARE + { PR_GETNSHARE, "PR_GETNSHARE" }, +#endif +#ifdef PR_COREPID + { PR_COREPID, "PR_COREPID" }, +#endif +#ifdef PR_ATTACHADDRPERM + { PR_ATTACHADDRPERM, "PR_ATTACHADDRPERM" }, +#endif +#ifdef PR_PTHREADEXIT + { PR_PTHREADEXIT, "PR_PTHREADEXIT" }, +#endif + +#ifdef PR_SET_PDEATHSIG + { PR_SET_PDEATHSIG, "PR_SET_PDEATHSIG" }, +#endif +#ifdef PR_GET_PDEATHSIG + { PR_GET_PDEATHSIG, "PR_GET_PDEATHSIG" }, +#endif +#ifdef PR_GET_DUMPABLE + { PR_GET_DUMPABLE, "PR_GET_DUMPABLE" }, +#endif +#ifdef PR_SET_DUMPABLE + { PR_SET_DUMPABLE, "PR_SET_DUMPABLE" }, +#endif +#ifdef PR_GET_UNALIGN + { PR_GET_UNALIGN, "PR_GET_UNALIGN" }, +#endif +#ifdef PR_SET_UNALIGN + { PR_SET_UNALIGN, "PR_SET_UNALIGN" }, +#endif +#ifdef PR_GET_KEEPCAPS + { PR_GET_KEEPCAPS, "PR_GET_KEEPCAPS" }, +#endif +#ifdef PR_SET_KEEPCAPS + { PR_SET_KEEPCAPS, "PR_SET_KEEPCAPS" }, +#endif +#ifdef PR_GET_FPEMU + { PR_GET_FPEMU, "PR_GET_FPEMU" }, +#endif +#ifdef PR_SET_FPEMU + { PR_SET_FPEMU, "PR_SET_FPEMU" }, +#endif +#ifdef PR_GET_FPEXC + { PR_GET_FPEXC, "PR_GET_FPEXC" }, +#endif +#ifdef PR_SET_FPEXC + { PR_SET_FPEXC, "PR_SET_FPEXC" }, +#endif +#ifdef PR_GET_TIMING + { PR_GET_TIMING, "PR_GET_TIMING" }, +#endif +#ifdef PR_SET_TIMING + { PR_SET_TIMING, "PR_SET_TIMING" }, +#endif +#ifdef PR_SET_NAME + { PR_SET_NAME, "PR_SET_NAME" }, +#endif +#ifdef PR_GET_NAME + { PR_GET_NAME, "PR_GET_NAME" }, +#endif +#ifdef PR_GET_ENDIAN + { PR_GET_ENDIAN, "PR_GET_ENDIAN" }, +#endif +#ifdef PR_SET_ENDIAN + { PR_SET_ENDIAN, "PR_SET_ENDIAN" }, +#endif +#ifdef PR_GET_SECCOMP + { PR_GET_SECCOMP, "PR_GET_SECCOMP" }, +#endif +#ifdef PR_SET_SECCOMP + { PR_SET_SECCOMP, "PR_SET_SECCOMP" }, +#endif +#ifdef PR_CAPBSET_READ + { PR_CAPBSET_READ, "PR_CAPBSET_READ" }, +#endif +#ifdef PR_CAPBSET_DROP + { PR_CAPBSET_DROP, "PR_CAPBSET_DROP" }, +#endif +#ifdef PR_GET_TSC + { PR_GET_TSC, "PR_GET_TSC" }, +#endif +#ifdef PR_SET_TSC + { PR_SET_TSC, "PR_SET_TSC" }, +#endif +#ifdef PR_GET_SECUREBITS + { PR_GET_SECUREBITS, "PR_GET_SECUREBITS" }, +#endif +#ifdef PR_SET_SECUREBITS + { PR_SET_SECUREBITS, "PR_SET_SECUREBITS" }, +#endif +#ifdef PR_SET_TIMERSLACK + { PR_SET_TIMERSLACK, "PR_SET_TIMERSLACK" }, +#endif +#ifdef PR_GET_TIMERSLACK + { PR_GET_TIMERSLACK, "PR_GET_TIMERSLACK" }, +#endif +#ifdef PR_TASK_PERF_EVENTS_DISABLE + { PR_TASK_PERF_EVENTS_DISABLE, "PR_TASK_PERF_EVENTS_DISABLE" }, +#endif +#ifdef PR_TASK_PERF_EVENTS_ENABLE + { PR_TASK_PERF_EVENTS_ENABLE, "PR_TASK_PERF_EVENTS_ENABLE" }, +#endif +#ifdef PR_MCE_KILL + { PR_MCE_KILL, "PR_MCE_KILL" }, +#endif +#ifdef PR_MCE_KILL_GET + { PR_MCE_KILL_GET, "PR_MCE_KILL_GET" }, +#endif +#ifdef PR_SET_MM + { PR_SET_MM, "PR_SET_MM" }, +#endif +#ifdef PR_SET_PTRACER + { PR_SET_PTRACER, "PR_SET_PTRACER" }, +#endif +#ifdef PR_SET_CHILD_SUBREAPER + { PR_SET_CHILD_SUBREAPER, "PR_SET_CHILD_SUBREAPER" }, +#endif +#ifdef PR_GET_CHILD_SUBREAPER + { PR_GET_CHILD_SUBREAPER, "PR_GET_CHILD_SUBREAPER" }, +#endif +#ifdef PR_SET_NO_NEW_PRIVS + { PR_SET_NO_NEW_PRIVS, "PR_SET_NO_NEW_PRIVS" }, +#endif +#ifdef PR_GET_NO_NEW_PRIVS + { PR_GET_NO_NEW_PRIVS, "PR_GET_NO_NEW_PRIVS" }, +#endif +#ifdef PR_GET_TID_ADDRESS + { PR_GET_TID_ADDRESS, "PR_GET_TID_ADDRESS" }, +#endif + { 0, NULL }, +}; + +static const char * +unalignctl_string(unsigned int ctl) +{ + static char buf[sizeof(int)*2 + 2]; + + switch (ctl) { +#ifdef PR_UNALIGN_NOPRINT + case PR_UNALIGN_NOPRINT: + return "NOPRINT"; +#endif +#ifdef PR_UNALIGN_SIGBUS + case PR_UNALIGN_SIGBUS: + return "SIGBUS"; +#endif + default: + break; + } + sprintf(buf, "%x", ctl); + return buf; +} + +int +sys_prctl(struct tcb *tcp) +{ + int i; + + if (entering(tcp)) { + printxval(prctl_options, tcp->u_arg[0], "PR_???"); + switch (tcp->u_arg[0]) { +#ifdef PR_GETNSHARE + case PR_GETNSHARE: + break; +#endif +#ifdef PR_SET_PDEATHSIG + case PR_SET_PDEATHSIG: + tprintf(", %lu", tcp->u_arg[1]); + break; +#endif +#ifdef PR_GET_PDEATHSIG + case PR_GET_PDEATHSIG: + break; +#endif +#ifdef PR_SET_DUMPABLE + case PR_SET_DUMPABLE: + tprintf(", %lu", tcp->u_arg[1]); + break; +#endif +#ifdef PR_GET_DUMPABLE + case PR_GET_DUMPABLE: + break; +#endif +#ifdef PR_SET_UNALIGN + case PR_SET_UNALIGN: + tprintf(", %s", unalignctl_string(tcp->u_arg[1])); + break; +#endif +#ifdef PR_GET_UNALIGN + case PR_GET_UNALIGN: + tprintf(", %#lx", tcp->u_arg[1]); + break; +#endif +#ifdef PR_SET_KEEPCAPS + case PR_SET_KEEPCAPS: + tprintf(", %lu", tcp->u_arg[1]); + break; +#endif +#ifdef PR_GET_KEEPCAPS + case PR_GET_KEEPCAPS: + break; +#endif + default: + for (i = 1; i < tcp->s_ent->nargs; i++) + tprintf(", %#lx", tcp->u_arg[i]); + break; + } + } else { + switch (tcp->u_arg[0]) { +#ifdef PR_GET_PDEATHSIG + case PR_GET_PDEATHSIG: + if (umove(tcp, tcp->u_arg[1], &i) < 0) + tprintf(", %#lx", tcp->u_arg[1]); + else + tprintf(", {%u}", i); + break; +#endif +#ifdef PR_GET_DUMPABLE + case PR_GET_DUMPABLE: + return RVAL_UDECIMAL; +#endif +#ifdef PR_GET_UNALIGN + case PR_GET_UNALIGN: + if (syserror(tcp) || umove(tcp, tcp->u_arg[1], &i) < 0) + break; + tcp->auxstr = unalignctl_string(i); + return RVAL_STR; +#endif +#ifdef PR_GET_KEEPCAPS + case PR_GET_KEEPCAPS: + return RVAL_UDECIMAL; +#endif + default: + break; + } + } + return 0; +} +#endif /* HAVE_PRCTL */ + +int +sys_sethostname(struct tcb *tcp) +{ + if (entering(tcp)) { + printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +#if defined(ALPHA) +int +sys_gethostname(struct tcb *tcp) +{ + if (exiting(tcp)) { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else + printpath(tcp, tcp->u_arg[0]); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} +#endif + +int +sys_setdomainname(struct tcb *tcp) +{ + if (entering(tcp)) { + printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +int +sys_exit(struct tcb *tcp) +{ + if (exiting(tcp)) { + fprintf(stderr, "_exit returned!\n"); + 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; +} + +/* defines copied from linux/sched.h since we can't include that + * ourselves (it conflicts with *lots* of libc includes) + */ +#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ +#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ +#define CLONE_SIGHAND 0x00000800 /* set if signal handlers shared */ +#define CLONE_IDLETASK 0x00001000 /* kernel-only flag */ +#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ +#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ +#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ +#define CLONE_THREAD 0x00010000 /* Same thread group? */ +#define CLONE_NEWNS 0x00020000 /* New namespace group? */ +#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ +#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ +#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ +#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ +#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ +#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ +#define CLONE_NEWUTS 0x04000000 /* New utsname group? */ +#define CLONE_NEWIPC 0x08000000 /* New ipcs */ +#define CLONE_NEWUSER 0x10000000 /* New user namespace */ +#define CLONE_NEWPID 0x20000000 /* New pid namespace */ +#define CLONE_NEWNET 0x40000000 /* New network namespace */ +#define CLONE_IO 0x80000000 /* Clone io context */ + +static const struct xlat clone_flags[] = { + { CLONE_VM, "CLONE_VM" }, + { CLONE_FS, "CLONE_FS" }, + { CLONE_FILES, "CLONE_FILES" }, + { CLONE_SIGHAND, "CLONE_SIGHAND" }, + { CLONE_IDLETASK, "CLONE_IDLETASK" }, + { CLONE_PTRACE, "CLONE_PTRACE" }, + { CLONE_VFORK, "CLONE_VFORK" }, + { CLONE_PARENT, "CLONE_PARENT" }, + { CLONE_THREAD, "CLONE_THREAD" }, + { CLONE_NEWNS, "CLONE_NEWNS" }, + { CLONE_SYSVSEM, "CLONE_SYSVSEM" }, + { CLONE_SETTLS, "CLONE_SETTLS" }, + { CLONE_PARENT_SETTID, "CLONE_PARENT_SETTID" }, + { CLONE_CHILD_CLEARTID, "CLONE_CHILD_CLEARTID" }, + { CLONE_UNTRACED, "CLONE_UNTRACED" }, + { CLONE_CHILD_SETTID, "CLONE_CHILD_SETTID" }, + { CLONE_STOPPED, "CLONE_STOPPED" }, + { CLONE_NEWUTS, "CLONE_NEWUTS" }, + { CLONE_NEWIPC, "CLONE_NEWIPC" }, + { CLONE_NEWUSER, "CLONE_NEWUSER" }, + { CLONE_NEWPID, "CLONE_NEWPID" }, + { CLONE_NEWNET, "CLONE_NEWNET" }, + { CLONE_IO, "CLONE_IO" }, + { 0, NULL }, +}; + +#ifdef I386 +# include +# ifdef HAVE_STRUCT_USER_DESC +# define modify_ldt_ldt_s user_desc +# endif +extern void print_ldt_entry(); +#endif + +#if defined IA64 +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_STACKSIZE (tcp->scno == SYS_clone2 ? 2 : -1) +# define ARG_PTID (tcp->scno == SYS_clone2 ? 3 : 2) +# define ARG_CTID (tcp->scno == SYS_clone2 ? 4 : 3) +# define ARG_TLS (tcp->scno == SYS_clone2 ? 5 : 4) +#elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32 +# define ARG_STACK 0 +# define ARG_FLAGS 1 +# define ARG_PTID 2 +# define ARG_CTID 3 +# define ARG_TLS 4 +#elif defined X86_64 || defined X32 || defined ALPHA || defined TILE \ + || defined OR1K +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_PTID 2 +# define ARG_CTID 3 +# define ARG_TLS 4 +#else +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_PTID 2 +# define ARG_TLS 3 +# define ARG_CTID 4 +#endif + +int +sys_clone(struct tcb *tcp) +{ + if (exiting(tcp)) { + const char *sep = "|"; + unsigned long flags = tcp->u_arg[ARG_FLAGS]; + tprintf("child_stack=%#lx, ", tcp->u_arg[ARG_STACK]); +#ifdef ARG_STACKSIZE + if (ARG_STACKSIZE != -1) + tprintf("stack_size=%#lx, ", + tcp->u_arg[ARG_STACKSIZE]); +#endif + tprints("flags="); + if (!printflags(clone_flags, flags &~ CSIGNAL, NULL)) + sep = ""; + if ((flags & CSIGNAL) != 0) + tprintf("%s%s", sep, signame(flags & CSIGNAL)); + if ((flags & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID + |CLONE_CHILD_CLEARTID|CLONE_SETTLS)) == 0) + return 0; + if (flags & CLONE_PARENT_SETTID) + tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]); + if (flags & CLONE_SETTLS) { +#ifdef I386 + struct modify_ldt_ldt_s copy; + if (umove(tcp, tcp->u_arg[ARG_TLS], ©) != -1) { + tprintf(", {entry_number:%d, ", + copy.entry_number); + if (!verbose(tcp)) + tprints("...}"); + else + print_ldt_entry(©); + } + else +#endif + tprintf(", tls=%#lx", tcp->u_arg[ARG_TLS]); + } + if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) + tprintf(", child_tidptr=%#lx", tcp->u_arg[ARG_CTID]); + } + return 0; +} + +int +sys_unshare(struct tcb *tcp) +{ + if (entering(tcp)) + printflags(clone_flags, tcp->u_arg[0], "CLONE_???"); + return 0; +} + +int +sys_fork(struct tcb *tcp) +{ + if (exiting(tcp)) + return RVAL_UDECIMAL; + return 0; +} + +int +sys_vfork(struct tcb *tcp) +{ + if (exiting(tcp)) + return RVAL_UDECIMAL; + return 0; +} + +int sys_getuid(struct tcb *tcp) +{ + if (exiting(tcp)) + tcp->u_rval = (uid_t) tcp->u_rval; + return RVAL_UDECIMAL; +} + +int sys_setfsuid(struct tcb *tcp) +{ + if (entering(tcp)) + tprintf("%u", (uid_t) tcp->u_arg[0]); + else + tcp->u_rval = (uid_t) tcp->u_rval; + return RVAL_UDECIMAL; +} + +int +sys_setuid(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%u", (uid_t) tcp->u_arg[0]); + } + return 0; +} + +int +sys_getresuid(struct tcb *tcp) +{ + if (exiting(tcp)) { + __kernel_uid_t uid; + if (syserror(tcp)) + tprintf("%#lx, %#lx, %#lx", tcp->u_arg[0], + tcp->u_arg[1], tcp->u_arg[2]); + else { + if (umove(tcp, tcp->u_arg[0], &uid) < 0) + tprintf("%#lx, ", tcp->u_arg[0]); + else + tprintf("[%lu], ", (unsigned long) uid); + if (umove(tcp, tcp->u_arg[1], &uid) < 0) + tprintf("%#lx, ", tcp->u_arg[1]); + else + tprintf("[%lu], ", (unsigned long) uid); + if (umove(tcp, tcp->u_arg[2], &uid) < 0) + tprintf("%#lx", tcp->u_arg[2]); + else + tprintf("[%lu]", (unsigned long) uid); + } + } + return 0; +} + +int +sys_setreuid(struct tcb *tcp) +{ + if (entering(tcp)) { + printuid("", tcp->u_arg[0]); + printuid(", ", tcp->u_arg[1]); + } + return 0; +} + +int +sys_setresuid(struct tcb *tcp) +{ + if (entering(tcp)) { + printuid("", tcp->u_arg[0]); + printuid(", ", tcp->u_arg[1]); + printuid(", ", tcp->u_arg[2]); + } + return 0; +} + +int +sys_setgroups(struct tcb *tcp) +{ + if (entering(tcp)) { + unsigned long len, size, start, cur, end, abbrev_end; + GETGROUPS_T gid; + int failed = 0; + + len = tcp->u_arg[0]; + tprintf("%lu, ", len); + if (len == 0) { + tprints("[]"); + return 0; + } + start = tcp->u_arg[1]; + if (start == 0) { + tprints("NULL"); + return 0; + } + size = len * sizeof(gid); + end = start + size; + if (!verbose(tcp) || size / sizeof(gid) != len || end < start) { + tprintf("%#lx", start); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(gid); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = start; cur < end; cur += sizeof(gid)) { + if (cur > start) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) { + tprints("?"); + failed = 1; + break; + } + tprintf("%lu", (unsigned long) gid); + } + tprints("]"); + if (failed) + tprintf(" %#lx", tcp->u_arg[1]); + } + return 0; +} + +int +sys_getgroups(struct tcb *tcp) +{ + unsigned long len; + + if (entering(tcp)) { + len = tcp->u_arg[0]; + tprintf("%lu, ", len); + } else { + unsigned long size, start, cur, end, abbrev_end; + GETGROUPS_T gid; + int failed = 0; + + len = tcp->u_rval; + if (len == 0) { + tprints("[]"); + return 0; + } + start = tcp->u_arg[1]; + if (start == 0) { + tprints("NULL"); + return 0; + } + if (tcp->u_arg[0] == 0) { + tprintf("%#lx", start); + return 0; + } + size = len * sizeof(gid); + end = start + size; + if (!verbose(tcp) || tcp->u_arg[0] == 0 || + size / sizeof(gid) != len || end < start) { + tprintf("%#lx", start); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(gid); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = start; cur < end; cur += sizeof(gid)) { + if (cur > start) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) { + tprints("?"); + failed = 1; + break; + } + tprintf("%lu", (unsigned long) gid); + } + tprints("]"); + if (failed) + tprintf(" %#lx", tcp->u_arg[1]); + } + return 0; +} + +int +sys_setgroups32(struct tcb *tcp) +{ + if (entering(tcp)) { + unsigned long len, size, start, cur, end, abbrev_end; + GETGROUPS32_T gid; + int failed = 0; + + len = tcp->u_arg[0]; + tprintf("%lu, ", len); + if (len == 0) { + tprints("[]"); + return 0; + } + start = tcp->u_arg[1]; + if (start == 0) { + tprints("NULL"); + return 0; + } + size = len * sizeof(gid); + end = start + size; + if (!verbose(tcp) || size / sizeof(gid) != len || end < start) { + tprintf("%#lx", start); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(gid); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = start; cur < end; cur += sizeof(gid)) { + if (cur > start) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) { + tprints("?"); + failed = 1; + break; + } + tprintf("%lu", (unsigned long) gid); + } + tprints("]"); + if (failed) + tprintf(" %#lx", tcp->u_arg[1]); + } + return 0; +} + +int +sys_getgroups32(struct tcb *tcp) +{ + unsigned long len; + + if (entering(tcp)) { + len = tcp->u_arg[0]; + tprintf("%lu, ", len); + } else { + unsigned long size, start, cur, end, abbrev_end; + GETGROUPS32_T gid; + int failed = 0; + + len = tcp->u_rval; + if (len == 0) { + tprints("[]"); + return 0; + } + start = tcp->u_arg[1]; + if (start == 0) { + tprints("NULL"); + return 0; + } + size = len * sizeof(gid); + end = start + size; + if (!verbose(tcp) || tcp->u_arg[0] == 0 || + size / sizeof(gid) != len || end < start) { + tprintf("%#lx", start); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(gid); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = start; cur < end; cur += sizeof(gid)) { + if (cur > start) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) { + tprints("?"); + failed = 1; + break; + } + tprintf("%lu", (unsigned long) gid); + } + tprints("]"); + if (failed) + tprintf(" %#lx", tcp->u_arg[1]); + } + return 0; +} + +static void +printargv(struct tcb *tcp, long addr) +{ + union { + unsigned int p32; + unsigned long p64; + char data[sizeof(long)]; + } cp; + const char *sep; + int n = 0; + unsigned wordsize = current_wordsize; + + cp.p64 = 1; + for (sep = ""; !abbrev(tcp) || n < max_strlen / 2; sep = ", ", ++n) { + if (umoven(tcp, addr, wordsize, cp.data) < 0) { + tprintf("%#lx", addr); + return; + } + if (wordsize == 4) + cp.p64 = cp.p32; + if (cp.p64 == 0) + break; + tprints(sep); + printstr(tcp, cp.p64, -1); + addr += wordsize; + } + if (cp.p64) + tprintf("%s...", sep); +} + +static void +printargc(const char *fmt, struct tcb *tcp, long addr) +{ + int count; + char *cp; + + for (count = 0; umove(tcp, addr, &cp) >= 0 && cp != NULL; count++) { + addr += sizeof(char *); + } + tprintf(fmt, count, count == 1 ? "" : "s"); +} + +#if defined(SPARC) || defined(SPARC64) +int +sys_execv(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + if (!verbose(tcp)) + tprintf(", %#lx", tcp->u_arg[1]); + else { + tprints(", ["); + printargv(tcp, tcp->u_arg[1]); + tprints("]"); + } + } + return 0; +} +#endif + +int +sys_execve(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + if (!verbose(tcp)) + tprintf(", %#lx", tcp->u_arg[1]); + else { + tprints(", ["); + printargv(tcp, tcp->u_arg[1]); + tprints("]"); + } + if (!verbose(tcp)) + tprintf(", %#lx", tcp->u_arg[2]); + else if (abbrev(tcp)) + printargc(", [/* %d var%s */]", tcp, tcp->u_arg[2]); + else { + tprints(", ["); + printargv(tcp, tcp->u_arg[2]); + tprints("]"); + } + } + + if (!entering(tcp)) { + delete_mmap_cache(tcp); + } + + return 0; +} + +#ifndef __WNOTHREAD +#define __WNOTHREAD 0x20000000 +#endif +#ifndef __WALL +#define __WALL 0x40000000 +#endif +#ifndef __WCLONE +#define __WCLONE 0x80000000 +#endif + +static const struct xlat wait4_options[] = { + { WNOHANG, "WNOHANG" }, +#ifndef WSTOPPED + { WUNTRACED, "WUNTRACED" }, +#endif +#ifdef WEXITED + { WEXITED, "WEXITED" }, +#endif +#ifdef WTRAPPED + { WTRAPPED, "WTRAPPED" }, +#endif +#ifdef WSTOPPED + { WSTOPPED, "WSTOPPED" }, +#endif +#ifdef WCONTINUED + { WCONTINUED, "WCONTINUED" }, +#endif +#ifdef WNOWAIT + { WNOWAIT, "WNOWAIT" }, +#endif +#ifdef __WCLONE + { __WCLONE, "__WCLONE" }, +#endif +#ifdef __WALL + { __WALL, "__WALL" }, +#endif +#ifdef __WNOTHREAD + { __WNOTHREAD, "__WNOTHREAD" }, +#endif + { 0, NULL }, +}; + +#if !defined WCOREFLAG && defined WCOREFLG +# define WCOREFLAG WCOREFLG +#endif +#ifndef WCOREFLAG +# define WCOREFLAG 0x80 +#endif +#ifndef WCOREDUMP +# define WCOREDUMP(status) ((status) & 0200) +#endif +#ifndef W_STOPCODE +# define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#endif +#ifndef W_EXITCODE +# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) +#endif + +static int +printstatus(int status) +{ + int exited = 0; + + /* + * Here is a tricky presentation problem. This solution + * is still not entirely satisfactory but since there + * are no wait status constructors it will have to do. + */ + if (WIFSTOPPED(status)) { + tprintf("[{WIFSTOPPED(s) && WSTOPSIG(s) == %s}", + signame(WSTOPSIG(status))); + status &= ~W_STOPCODE(WSTOPSIG(status)); + } + else if (WIFSIGNALED(status)) { + tprintf("[{WIFSIGNALED(s) && WTERMSIG(s) == %s%s}", + signame(WTERMSIG(status)), + WCOREDUMP(status) ? " && WCOREDUMP(s)" : ""); + status &= ~(W_EXITCODE(0, WTERMSIG(status)) | WCOREFLAG); + } + else if (WIFEXITED(status)) { + tprintf("[{WIFEXITED(s) && WEXITSTATUS(s) == %d}", + WEXITSTATUS(status)); + exited = 1; + status &= ~W_EXITCODE(WEXITSTATUS(status), 0); + } + else { + tprintf("[%#x]", status); + return 0; + } + + if (status == 0) + tprints("]"); + else + tprintf(" | %#x]", status); + + return exited; +} + +static int +printwaitn(struct tcb *tcp, int n, int bitness) +{ + int status; + + if (entering(tcp)) { + /* On Linux, kernel-side pid_t is typedef'ed to int + * on all arches. Also, glibc-2.8 truncates wait3 and wait4 + * pid argument to int on 64bit arches, producing, + * for example, wait4(4294967295, ...) instead of -1 + * in strace. We have to use int here, not long. + */ + int pid = tcp->u_arg[0]; + tprintf("%d, ", pid); + } else { + /* status */ + if (!tcp->u_arg[1]) + tprints("NULL"); + else if (syserror(tcp) || tcp->u_rval == 0) + tprintf("%#lx", tcp->u_arg[1]); + else if (umove(tcp, tcp->u_arg[1], &status) < 0) + tprints("[?]"); + else + printstatus(status); + /* options */ + tprints(", "); + printflags(wait4_options, tcp->u_arg[2], "W???"); + if (n == 4) { + tprints(", "); + /* usage */ + if (!tcp->u_arg[3]) + tprints("NULL"); + else if (tcp->u_rval > 0) { +#ifdef ALPHA + if (bitness) + printrusage32(tcp, tcp->u_arg[3]); + else +#endif + printrusage(tcp, tcp->u_arg[3]); + } + else + tprintf("%#lx", tcp->u_arg[3]); + } + } + return 0; +} + +int +sys_waitpid(struct tcb *tcp) +{ + return printwaitn(tcp, 3, 0); +} + +int +sys_wait4(struct tcb *tcp) +{ + return printwaitn(tcp, 4, 0); +} + +#ifdef ALPHA +int +sys_osf_wait4(struct tcb *tcp) +{ + return printwaitn(tcp, 4, 1); +} +#endif + +static const struct xlat waitid_types[] = { + { P_PID, "P_PID" }, +#ifdef P_PPID + { P_PPID, "P_PPID" }, +#endif + { P_PGID, "P_PGID" }, +#ifdef P_SID + { P_SID, "P_SID" }, +#endif +#ifdef P_CID + { P_CID, "P_CID" }, +#endif +#ifdef P_UID + { P_UID, "P_UID" }, +#endif +#ifdef P_GID + { P_GID, "P_GID" }, +#endif + { P_ALL, "P_ALL" }, +#ifdef P_LWPID + { P_LWPID, "P_LWPID" }, +#endif + { 0, NULL }, +}; + +int +sys_waitid(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(waitid_types, tcp->u_arg[0], "P_???"); + tprintf(", %ld, ", tcp->u_arg[1]); + } + else { + /* siginfo */ + printsiginfo_at(tcp, tcp->u_arg[2]); + /* options */ + tprints(", "); + printflags(wait4_options, tcp->u_arg[3], "W???"); + if (tcp->s_ent->nargs > 4) { + /* usage */ + tprints(", "); + if (!tcp->u_arg[4]) + tprints("NULL"); + else if (tcp->u_error) + tprintf("%#lx", tcp->u_arg[4]); + else + printrusage(tcp, tcp->u_arg[4]); + } + } + return 0; +} + +int +sys_uname(struct tcb *tcp) +{ + struct utsname uname; + + if (exiting(tcp)) { + if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else if (umove(tcp, tcp->u_arg[0], &uname) < 0) + tprints("{...}"); + else if (!abbrev(tcp)) { + tprintf("{sysname=\"%s\", nodename=\"%s\", ", + uname.sysname, uname.nodename); + tprintf("release=\"%s\", version=\"%s\", ", + uname.release, uname.version); + tprintf("machine=\"%s\"", uname.machine); +#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + tprintf(", domainname=\"%s\"", uname.domainname); +#endif + tprints("}"); + } + else + tprintf("{sys=\"%s\", node=\"%s\", ...}", + uname.sysname, uname.nodename); + } + return 0; +} + +static const struct xlat ptrace_cmds[] = { + { PTRACE_TRACEME, "PTRACE_TRACEME" }, + { PTRACE_PEEKTEXT, "PTRACE_PEEKTEXT" }, + { PTRACE_PEEKDATA, "PTRACE_PEEKDATA" }, + { PTRACE_PEEKUSER, "PTRACE_PEEKUSER" }, + { PTRACE_POKETEXT, "PTRACE_POKETEXT" }, + { PTRACE_POKEDATA, "PTRACE_POKEDATA" }, + { PTRACE_POKEUSER, "PTRACE_POKEUSER" }, + { PTRACE_CONT, "PTRACE_CONT" }, + { PTRACE_KILL, "PTRACE_KILL" }, + { PTRACE_SINGLESTEP, "PTRACE_SINGLESTEP" }, + { PTRACE_ATTACH, "PTRACE_ATTACH" }, + { PTRACE_DETACH, "PTRACE_DETACH" }, +#ifdef PTRACE_GETREGS + { PTRACE_GETREGS, "PTRACE_GETREGS" }, +#endif +#ifdef PTRACE_SETREGS + { PTRACE_SETREGS, "PTRACE_SETREGS" }, +#endif +#ifdef PTRACE_GETFPREGS + { PTRACE_GETFPREGS, "PTRACE_GETFPREGS" }, +#endif +#ifdef PTRACE_SETFPREGS + { PTRACE_SETFPREGS, "PTRACE_SETFPREGS" }, +#endif +#ifdef PTRACE_GETFPXREGS + { PTRACE_GETFPXREGS, "PTRACE_GETFPXREGS" }, +#endif +#ifdef PTRACE_SETFPXREGS + { PTRACE_SETFPXREGS, "PTRACE_SETFPXREGS" }, +#endif +#ifdef PTRACE_GETVRREGS + { PTRACE_GETVRREGS, "PTRACE_GETVRREGS" }, +#endif +#ifdef PTRACE_SETVRREGS + { PTRACE_SETVRREGS, "PTRACE_SETVRREGS" }, +#endif +#ifdef PTRACE_SETOPTIONS + { PTRACE_SETOPTIONS, "PTRACE_SETOPTIONS" }, +#endif +#ifdef PTRACE_GETEVENTMSG + { PTRACE_GETEVENTMSG, "PTRACE_GETEVENTMSG" }, +#endif +#ifdef PTRACE_GETSIGINFO + { PTRACE_GETSIGINFO, "PTRACE_GETSIGINFO" }, +#endif +#ifdef PTRACE_SETSIGINFO + { PTRACE_SETSIGINFO, "PTRACE_SETSIGINFO" }, +#endif +#ifdef PTRACE_GETREGSET + { PTRACE_GETREGSET, "PTRACE_GETREGSET" }, +#endif +#ifdef PTRACE_SETREGSET + { PTRACE_SETREGSET, "PTRACE_SETREGSET" }, +#endif +#ifdef PTRACE_SET_SYSCALL + { PTRACE_SET_SYSCALL, "PTRACE_SET_SYSCALL" }, +#endif +#ifdef PTRACE_SEIZE + { PTRACE_SEIZE, "PTRACE_SEIZE" }, +#endif +#ifdef PTRACE_INTERRUPT + { PTRACE_INTERRUPT, "PTRACE_INTERRUPT" }, +#endif +#ifdef PTRACE_LISTEN + { PTRACE_LISTEN, "PTRACE_LISTEN" }, +#endif + { PTRACE_SYSCALL, "PTRACE_SYSCALL" }, + + { 0, NULL }, +}; + +#ifdef PTRACE_SETOPTIONS +static const struct xlat ptrace_setoptions_flags[] = { +# ifdef PTRACE_O_TRACESYSGOOD + { PTRACE_O_TRACESYSGOOD,"PTRACE_O_TRACESYSGOOD" }, +# endif +# ifdef PTRACE_O_TRACEFORK + { PTRACE_O_TRACEFORK, "PTRACE_O_TRACEFORK" }, +# endif +# ifdef PTRACE_O_TRACEVFORK + { PTRACE_O_TRACEVFORK, "PTRACE_O_TRACEVFORK" }, +# endif +# ifdef PTRACE_O_TRACECLONE + { PTRACE_O_TRACECLONE, "PTRACE_O_TRACECLONE" }, +# endif +# ifdef PTRACE_O_TRACEEXEC + { PTRACE_O_TRACEEXEC, "PTRACE_O_TRACEEXEC" }, +# endif +# ifdef PTRACE_O_TRACEVFORKDONE + { PTRACE_O_TRACEVFORKDONE,"PTRACE_O_TRACEVFORKDONE"}, +# endif +# ifdef PTRACE_O_TRACEEXIT + { PTRACE_O_TRACEEXIT, "PTRACE_O_TRACEEXIT" }, +# endif +# ifdef PTRACE_O_TRACESECCOMP + { PTRACE_O_TRACESECCOMP,"PTRACE_O_TRACESECCOMP" }, +# endif +# ifdef PTRACE_O_EXITKILL + { PTRACE_O_EXITKILL, "PTRACE_O_EXITKILL" }, +# endif + { 0, NULL }, +}; +#endif /* PTRACE_SETOPTIONS */ + +static const struct xlat nt_descriptor_types[] = { +#ifdef NT_PRSTATUS + { NT_PRSTATUS, "NT_PRSTATUS" }, +#endif +#ifdef NT_FPREGSET + { NT_FPREGSET, "NT_FPREGSET" }, +#endif +#ifdef NT_PRPSINFO + { NT_PRPSINFO, "NT_PRPSINFO" }, +#endif +#ifdef NT_PRXREG + { NT_PRXREG, "NT_PRXREG" }, +#endif +#ifdef NT_TASKSTRUCT + { NT_TASKSTRUCT, "NT_TASKSTRUCT" }, +#endif +#ifdef NT_PLATFORM + { NT_PLATFORM, "NT_PLATFORM" }, +#endif +#ifdef NT_AUXV + { NT_AUXV, "NT_AUXV" }, +#endif +#ifdef NT_GWINDOWS + { NT_GWINDOWS, "NT_GWINDOWS" }, +#endif +#ifdef NT_ASRS + { NT_ASRS, "NT_ASRS" }, +#endif +#ifdef NT_PSTATUS + { NT_PSTATUS, "NT_PSTATUS" }, +#endif +#ifdef NT_PSINFO + { NT_PSINFO, "NT_PSINFO" }, +#endif +#ifdef NT_PRCRED + { NT_PRCRED, "NT_PRCRED" }, +#endif +#ifdef NT_UTSNAME + { NT_UTSNAME, "NT_UTSNAME" }, +#endif +#ifdef NT_LWPSTATUS + { NT_LWPSTATUS, "NT_LWPSTATUS" }, +#endif +#ifdef NT_LWPSINFO + { NT_LWPSINFO, "NT_LWPSINFO" }, +#endif +#ifdef NT_PRFPXREG + { NT_PRFPXREG, "NT_PRFPXREG" }, +#endif +#ifdef NT_PRXFPREG + { NT_PRXFPREG, "NT_PRXFPREG" }, +#endif +#ifdef NT_PPC_VMX + { NT_PPC_VMX, "NT_PPC_VMX" }, +#endif +#ifdef NT_PPC_SPE + { NT_PPC_SPE, "NT_PPC_SPE" }, +#endif +#ifdef NT_PPC_VSX + { NT_PPC_VSX, "NT_PPC_VSX" }, +#endif +#ifdef NT_386_TLS + { NT_386_TLS, "NT_386_TLS" }, +#endif +#ifdef NT_386_IOPERM + { NT_386_IOPERM, "NT_386_IOPERM" }, +#endif +#ifdef NT_X86_XSTATE + { NT_X86_XSTATE, "NT_X86_XSTATE" }, +#endif + { 0, NULL }, +}; + +#define uoff(member) offsetof(struct user, member) + +const struct xlat struct_user_offsets[] = { +#if defined(S390) || defined(S390X) + { PT_PSWMASK, "psw_mask" }, + { PT_PSWADDR, "psw_addr" }, + { PT_GPR0, "gpr0" }, + { PT_GPR1, "gpr1" }, + { PT_GPR2, "gpr2" }, + { PT_GPR3, "gpr3" }, + { PT_GPR4, "gpr4" }, + { PT_GPR5, "gpr5" }, + { PT_GPR6, "gpr6" }, + { PT_GPR7, "gpr7" }, + { PT_GPR8, "gpr8" }, + { PT_GPR9, "gpr9" }, + { PT_GPR10, "gpr10" }, + { PT_GPR11, "gpr11" }, + { PT_GPR12, "gpr12" }, + { PT_GPR13, "gpr13" }, + { PT_GPR14, "gpr14" }, + { PT_GPR15, "gpr15" }, + { PT_ACR0, "acr0" }, + { PT_ACR1, "acr1" }, + { PT_ACR2, "acr2" }, + { PT_ACR3, "acr3" }, + { PT_ACR4, "acr4" }, + { PT_ACR5, "acr5" }, + { PT_ACR6, "acr6" }, + { PT_ACR7, "acr7" }, + { PT_ACR8, "acr8" }, + { PT_ACR9, "acr9" }, + { PT_ACR10, "acr10" }, + { PT_ACR11, "acr11" }, + { PT_ACR12, "acr12" }, + { PT_ACR13, "acr13" }, + { PT_ACR14, "acr14" }, + { PT_ACR15, "acr15" }, + { PT_ORIGGPR2, "orig_gpr2" }, + { PT_FPC, "fpc" }, +#if defined(S390) + { PT_FPR0_HI, "fpr0.hi" }, + { PT_FPR0_LO, "fpr0.lo" }, + { PT_FPR1_HI, "fpr1.hi" }, + { PT_FPR1_LO, "fpr1.lo" }, + { PT_FPR2_HI, "fpr2.hi" }, + { PT_FPR2_LO, "fpr2.lo" }, + { PT_FPR3_HI, "fpr3.hi" }, + { PT_FPR3_LO, "fpr3.lo" }, + { PT_FPR4_HI, "fpr4.hi" }, + { PT_FPR4_LO, "fpr4.lo" }, + { PT_FPR5_HI, "fpr5.hi" }, + { PT_FPR5_LO, "fpr5.lo" }, + { PT_FPR6_HI, "fpr6.hi" }, + { PT_FPR6_LO, "fpr6.lo" }, + { PT_FPR7_HI, "fpr7.hi" }, + { PT_FPR7_LO, "fpr7.lo" }, + { PT_FPR8_HI, "fpr8.hi" }, + { PT_FPR8_LO, "fpr8.lo" }, + { PT_FPR9_HI, "fpr9.hi" }, + { PT_FPR9_LO, "fpr9.lo" }, + { PT_FPR10_HI, "fpr10.hi" }, + { PT_FPR10_LO, "fpr10.lo" }, + { PT_FPR11_HI, "fpr11.hi" }, + { PT_FPR11_LO, "fpr11.lo" }, + { PT_FPR12_HI, "fpr12.hi" }, + { PT_FPR12_LO, "fpr12.lo" }, + { PT_FPR13_HI, "fpr13.hi" }, + { PT_FPR13_LO, "fpr13.lo" }, + { PT_FPR14_HI, "fpr14.hi" }, + { PT_FPR14_LO, "fpr14.lo" }, + { PT_FPR15_HI, "fpr15.hi" }, + { PT_FPR15_LO, "fpr15.lo" }, +#endif +#if defined(S390X) + { PT_FPR0, "fpr0" }, + { PT_FPR1, "fpr1" }, + { PT_FPR2, "fpr2" }, + { PT_FPR3, "fpr3" }, + { PT_FPR4, "fpr4" }, + { PT_FPR5, "fpr5" }, + { PT_FPR6, "fpr6" }, + { PT_FPR7, "fpr7" }, + { PT_FPR8, "fpr8" }, + { PT_FPR9, "fpr9" }, + { PT_FPR10, "fpr10" }, + { PT_FPR11, "fpr11" }, + { PT_FPR12, "fpr12" }, + { PT_FPR13, "fpr13" }, + { PT_FPR14, "fpr14" }, + { PT_FPR15, "fpr15" }, +#endif + { PT_CR_9, "cr9" }, + { PT_CR_10, "cr10" }, + { PT_CR_11, "cr11" }, + { PT_IEEE_IP, "ieee_exception_ip" }, +#elif defined(SPARC) + /* XXX No support for these offsets yet. */ +#elif defined(HPPA) + /* XXX No support for these offsets yet. */ +#elif defined(POWERPC) +# ifndef PT_ORIG_R3 +# define PT_ORIG_R3 34 +# endif +# define REGSIZE (sizeof(unsigned long)) + { REGSIZE*PT_R0, "r0" }, + { REGSIZE*PT_R1, "r1" }, + { REGSIZE*PT_R2, "r2" }, + { REGSIZE*PT_R3, "r3" }, + { REGSIZE*PT_R4, "r4" }, + { REGSIZE*PT_R5, "r5" }, + { REGSIZE*PT_R6, "r6" }, + { REGSIZE*PT_R7, "r7" }, + { REGSIZE*PT_R8, "r8" }, + { REGSIZE*PT_R9, "r9" }, + { REGSIZE*PT_R10, "r10" }, + { REGSIZE*PT_R11, "r11" }, + { REGSIZE*PT_R12, "r12" }, + { REGSIZE*PT_R13, "r13" }, + { REGSIZE*PT_R14, "r14" }, + { REGSIZE*PT_R15, "r15" }, + { REGSIZE*PT_R16, "r16" }, + { REGSIZE*PT_R17, "r17" }, + { REGSIZE*PT_R18, "r18" }, + { REGSIZE*PT_R19, "r19" }, + { REGSIZE*PT_R20, "r20" }, + { REGSIZE*PT_R21, "r21" }, + { REGSIZE*PT_R22, "r22" }, + { REGSIZE*PT_R23, "r23" }, + { REGSIZE*PT_R24, "r24" }, + { REGSIZE*PT_R25, "r25" }, + { REGSIZE*PT_R26, "r26" }, + { REGSIZE*PT_R27, "r27" }, + { REGSIZE*PT_R28, "r28" }, + { REGSIZE*PT_R29, "r29" }, + { REGSIZE*PT_R30, "r30" }, + { REGSIZE*PT_R31, "r31" }, + { REGSIZE*PT_NIP, "NIP" }, + { REGSIZE*PT_MSR, "MSR" }, + { REGSIZE*PT_ORIG_R3, "ORIG_R3" }, + { REGSIZE*PT_CTR, "CTR" }, + { REGSIZE*PT_LNK, "LNK" }, + { REGSIZE*PT_XER, "XER" }, + { REGSIZE*PT_CCR, "CCR" }, + { REGSIZE*PT_FPR0, "FPR0" }, +# undef REGSIZE +#elif defined(ALPHA) + { 0, "r0" }, + { 1, "r1" }, + { 2, "r2" }, + { 3, "r3" }, + { 4, "r4" }, + { 5, "r5" }, + { 6, "r6" }, + { 7, "r7" }, + { 8, "r8" }, + { 9, "r9" }, + { 10, "r10" }, + { 11, "r11" }, + { 12, "r12" }, + { 13, "r13" }, + { 14, "r14" }, + { 15, "r15" }, + { 16, "r16" }, + { 17, "r17" }, + { 18, "r18" }, + { 19, "r19" }, + { 20, "r20" }, + { 21, "r21" }, + { 22, "r22" }, + { 23, "r23" }, + { 24, "r24" }, + { 25, "r25" }, + { 26, "r26" }, + { 27, "r27" }, + { 28, "r28" }, + { 29, "gp" }, + { 30, "fp" }, + { 31, "zero" }, + { 32, "fp0" }, + { 33, "fp" }, + { 34, "fp2" }, + { 35, "fp3" }, + { 36, "fp4" }, + { 37, "fp5" }, + { 38, "fp6" }, + { 39, "fp7" }, + { 40, "fp8" }, + { 41, "fp9" }, + { 42, "fp10" }, + { 43, "fp11" }, + { 44, "fp12" }, + { 45, "fp13" }, + { 46, "fp14" }, + { 47, "fp15" }, + { 48, "fp16" }, + { 49, "fp17" }, + { 50, "fp18" }, + { 51, "fp19" }, + { 52, "fp20" }, + { 53, "fp21" }, + { 54, "fp22" }, + { 55, "fp23" }, + { 56, "fp24" }, + { 57, "fp25" }, + { 58, "fp26" }, + { 59, "fp27" }, + { 60, "fp28" }, + { 61, "fp29" }, + { 62, "fp30" }, + { 63, "fp31" }, + { 64, "pc" }, +#elif defined(IA64) + { PT_F32, "f32" }, { PT_F33, "f33" }, { PT_F34, "f34" }, + { PT_F35, "f35" }, { PT_F36, "f36" }, { PT_F37, "f37" }, + { PT_F38, "f38" }, { PT_F39, "f39" }, { PT_F40, "f40" }, + { PT_F41, "f41" }, { PT_F42, "f42" }, { PT_F43, "f43" }, + { PT_F44, "f44" }, { PT_F45, "f45" }, { PT_F46, "f46" }, + { PT_F47, "f47" }, { PT_F48, "f48" }, { PT_F49, "f49" }, + { PT_F50, "f50" }, { PT_F51, "f51" }, { PT_F52, "f52" }, + { PT_F53, "f53" }, { PT_F54, "f54" }, { PT_F55, "f55" }, + { PT_F56, "f56" }, { PT_F57, "f57" }, { PT_F58, "f58" }, + { PT_F59, "f59" }, { PT_F60, "f60" }, { PT_F61, "f61" }, + { PT_F62, "f62" }, { PT_F63, "f63" }, { PT_F64, "f64" }, + { PT_F65, "f65" }, { PT_F66, "f66" }, { PT_F67, "f67" }, + { PT_F68, "f68" }, { PT_F69, "f69" }, { PT_F70, "f70" }, + { PT_F71, "f71" }, { PT_F72, "f72" }, { PT_F73, "f73" }, + { PT_F74, "f74" }, { PT_F75, "f75" }, { PT_F76, "f76" }, + { PT_F77, "f77" }, { PT_F78, "f78" }, { PT_F79, "f79" }, + { PT_F80, "f80" }, { PT_F81, "f81" }, { PT_F82, "f82" }, + { PT_F83, "f83" }, { PT_F84, "f84" }, { PT_F85, "f85" }, + { PT_F86, "f86" }, { PT_F87, "f87" }, { PT_F88, "f88" }, + { PT_F89, "f89" }, { PT_F90, "f90" }, { PT_F91, "f91" }, + { PT_F92, "f92" }, { PT_F93, "f93" }, { PT_F94, "f94" }, + { PT_F95, "f95" }, { PT_F96, "f96" }, { PT_F97, "f97" }, + { PT_F98, "f98" }, { PT_F99, "f99" }, { PT_F100, "f100" }, + { PT_F101, "f101" }, { PT_F102, "f102" }, { PT_F103, "f103" }, + { PT_F104, "f104" }, { PT_F105, "f105" }, { PT_F106, "f106" }, + { PT_F107, "f107" }, { PT_F108, "f108" }, { PT_F109, "f109" }, + { PT_F110, "f110" }, { PT_F111, "f111" }, { PT_F112, "f112" }, + { PT_F113, "f113" }, { PT_F114, "f114" }, { PT_F115, "f115" }, + { PT_F116, "f116" }, { PT_F117, "f117" }, { PT_F118, "f118" }, + { PT_F119, "f119" }, { PT_F120, "f120" }, { PT_F121, "f121" }, + { PT_F122, "f122" }, { PT_F123, "f123" }, { PT_F124, "f124" }, + { PT_F125, "f125" }, { PT_F126, "f126" }, { PT_F127, "f127" }, + /* switch stack: */ + { PT_F2, "f2" }, { PT_F3, "f3" }, { PT_F4, "f4" }, + { PT_F5, "f5" }, { PT_F10, "f10" }, { PT_F11, "f11" }, + { PT_F12, "f12" }, { PT_F13, "f13" }, { PT_F14, "f14" }, + { PT_F15, "f15" }, { PT_F16, "f16" }, { PT_F17, "f17" }, + { PT_F18, "f18" }, { PT_F19, "f19" }, { PT_F20, "f20" }, + { PT_F21, "f21" }, { PT_F22, "f22" }, { PT_F23, "f23" }, + { PT_F24, "f24" }, { PT_F25, "f25" }, { PT_F26, "f26" }, + { PT_F27, "f27" }, { PT_F28, "f28" }, { PT_F29, "f29" }, + { PT_F30, "f30" }, { PT_F31, "f31" }, { PT_R4, "r4" }, + { PT_R5, "r5" }, { PT_R6, "r6" }, { PT_R7, "r7" }, + { PT_B1, "b1" }, { PT_B2, "b2" }, { PT_B3, "b3" }, + { PT_B4, "b4" }, { PT_B5, "b5" }, + { PT_AR_EC, "ar.ec" }, { PT_AR_LC, "ar.lc" }, + /* pt_regs */ + { PT_CR_IPSR, "psr" }, { PT_CR_IIP, "ip" }, + { PT_CFM, "cfm" }, { PT_AR_UNAT, "ar.unat" }, + { PT_AR_PFS, "ar.pfs" }, { PT_AR_RSC, "ar.rsc" }, + { PT_AR_RNAT, "ar.rnat" }, { PT_AR_BSPSTORE, "ar.bspstore" }, + { PT_PR, "pr" }, { PT_B6, "b6" }, { PT_AR_BSP, "ar.bsp" }, + { PT_R1, "r1" }, { PT_R2, "r2" }, { PT_R3, "r3" }, + { PT_R12, "r12" }, { PT_R13, "r13" }, { PT_R14, "r14" }, + { PT_R15, "r15" }, { PT_R8, "r8" }, { PT_R9, "r9" }, + { PT_R10, "r10" }, { PT_R11, "r11" }, { PT_R16, "r16" }, + { PT_R17, "r17" }, { PT_R18, "r18" }, { PT_R19, "r19" }, + { PT_R20, "r20" }, { PT_R21, "r21" }, { PT_R22, "r22" }, + { PT_R23, "r23" }, { PT_R24, "r24" }, { PT_R25, "r25" }, + { PT_R26, "r26" }, { PT_R27, "r27" }, { PT_R28, "r28" }, + { PT_R29, "r29" }, { PT_R30, "r30" }, { PT_R31, "r31" }, + { PT_AR_CCV, "ar.ccv" }, { PT_AR_FPSR, "ar.fpsr" }, + { PT_B0, "b0" }, { PT_B7, "b7" }, { PT_F6, "f6" }, + { PT_F7, "f7" }, { PT_F8, "f8" }, { PT_F9, "f9" }, +# ifdef PT_AR_CSD + { PT_AR_CSD, "ar.csd" }, +# endif +# ifdef PT_AR_SSD + { PT_AR_SSD, "ar.ssd" }, +# endif + { PT_DBR, "dbr" }, { PT_IBR, "ibr" }, { PT_PMD, "pmd" }, +#elif defined(I386) + { 4*EBX, "4*EBX" }, + { 4*ECX, "4*ECX" }, + { 4*EDX, "4*EDX" }, + { 4*ESI, "4*ESI" }, + { 4*EDI, "4*EDI" }, + { 4*EBP, "4*EBP" }, + { 4*EAX, "4*EAX" }, + { 4*DS, "4*DS" }, + { 4*ES, "4*ES" }, + { 4*FS, "4*FS" }, + { 4*GS, "4*GS" }, + { 4*ORIG_EAX, "4*ORIG_EAX" }, + { 4*EIP, "4*EIP" }, + { 4*CS, "4*CS" }, + { 4*EFL, "4*EFL" }, + { 4*UESP, "4*UESP" }, + { 4*SS, "4*SS" }, +#elif defined(X86_64) || defined(X32) + { 8*R15, "8*R15" }, + { 8*R14, "8*R14" }, + { 8*R13, "8*R13" }, + { 8*R12, "8*R12" }, + { 8*RBP, "8*RBP" }, + { 8*RBX, "8*RBX" }, + { 8*R11, "8*R11" }, + { 8*R10, "8*R10" }, + { 8*R9, "8*R9" }, + { 8*R8, "8*R8" }, + { 8*RAX, "8*RAX" }, + { 8*RCX, "8*RCX" }, + { 8*RDX, "8*RDX" }, + { 8*RSI, "8*RSI" }, + { 8*RDI, "8*RDI" }, + { 8*ORIG_RAX, "8*ORIG_RAX" }, + { 8*RIP, "8*RIP" }, + { 8*CS, "8*CS" }, + { 8*EFLAGS, "8*EFL" }, + { 8*RSP, "8*RSP" }, + { 8*SS, "8*SS" }, +#elif defined(M68K) + { 4*PT_D1, "4*PT_D1" }, + { 4*PT_D2, "4*PT_D2" }, + { 4*PT_D3, "4*PT_D3" }, + { 4*PT_D4, "4*PT_D4" }, + { 4*PT_D5, "4*PT_D5" }, + { 4*PT_D6, "4*PT_D6" }, + { 4*PT_D7, "4*PT_D7" }, + { 4*PT_A0, "4*PT_A0" }, + { 4*PT_A1, "4*PT_A1" }, + { 4*PT_A2, "4*PT_A2" }, + { 4*PT_A3, "4*PT_A3" }, + { 4*PT_A4, "4*PT_A4" }, + { 4*PT_A5, "4*PT_A5" }, + { 4*PT_A6, "4*PT_A6" }, + { 4*PT_D0, "4*PT_D0" }, + { 4*PT_USP, "4*PT_USP" }, + { 4*PT_ORIG_D0, "4*PT_ORIG_D0" }, + { 4*PT_SR, "4*PT_SR" }, + { 4*PT_PC, "4*PT_PC" }, +#elif defined(SH) + { 4*REG_REG0, "4*REG_REG0" }, + { 4*(REG_REG0+1), "4*REG_REG1" }, + { 4*(REG_REG0+2), "4*REG_REG2" }, + { 4*(REG_REG0+3), "4*REG_REG3" }, + { 4*(REG_REG0+4), "4*REG_REG4" }, + { 4*(REG_REG0+5), "4*REG_REG5" }, + { 4*(REG_REG0+6), "4*REG_REG6" }, + { 4*(REG_REG0+7), "4*REG_REG7" }, + { 4*(REG_REG0+8), "4*REG_REG8" }, + { 4*(REG_REG0+9), "4*REG_REG9" }, + { 4*(REG_REG0+10), "4*REG_REG10" }, + { 4*(REG_REG0+11), "4*REG_REG11" }, + { 4*(REG_REG0+12), "4*REG_REG12" }, + { 4*(REG_REG0+13), "4*REG_REG13" }, + { 4*(REG_REG0+14), "4*REG_REG14" }, + { 4*REG_REG15, "4*REG_REG15" }, + { 4*REG_PC, "4*REG_PC" }, + { 4*REG_PR, "4*REG_PR" }, + { 4*REG_SR, "4*REG_SR" }, + { 4*REG_GBR, "4*REG_GBR" }, + { 4*REG_MACH, "4*REG_MACH" }, + { 4*REG_MACL, "4*REG_MACL" }, + { 4*REG_SYSCALL, "4*REG_SYSCALL" }, + { 4*REG_FPUL, "4*REG_FPUL" }, + { 4*REG_FPREG0, "4*REG_FPREG0" }, + { 4*(REG_FPREG0+1), "4*REG_FPREG1" }, + { 4*(REG_FPREG0+2), "4*REG_FPREG2" }, + { 4*(REG_FPREG0+3), "4*REG_FPREG3" }, + { 4*(REG_FPREG0+4), "4*REG_FPREG4" }, + { 4*(REG_FPREG0+5), "4*REG_FPREG5" }, + { 4*(REG_FPREG0+6), "4*REG_FPREG6" }, + { 4*(REG_FPREG0+7), "4*REG_FPREG7" }, + { 4*(REG_FPREG0+8), "4*REG_FPREG8" }, + { 4*(REG_FPREG0+9), "4*REG_FPREG9" }, + { 4*(REG_FPREG0+10), "4*REG_FPREG10" }, + { 4*(REG_FPREG0+11), "4*REG_FPREG11" }, + { 4*(REG_FPREG0+12), "4*REG_FPREG12" }, + { 4*(REG_FPREG0+13), "4*REG_FPREG13" }, + { 4*(REG_FPREG0+14), "4*REG_FPREG14" }, + { 4*REG_FPREG15, "4*REG_FPREG15" }, +# ifdef REG_XDREG0 + { 4*REG_XDREG0, "4*REG_XDREG0" }, + { 4*(REG_XDREG0+2), "4*REG_XDREG2" }, + { 4*(REG_XDREG0+4), "4*REG_XDREG4" }, + { 4*(REG_XDREG0+6), "4*REG_XDREG6" }, + { 4*(REG_XDREG0+8), "4*REG_XDREG8" }, + { 4*(REG_XDREG0+10), "4*REG_XDREG10" }, + { 4*(REG_XDREG0+12), "4*REG_XDREG12" }, + { 4*REG_XDREG14, "4*REG_XDREG14" }, +# endif + { 4*REG_FPSCR, "4*REG_FPSCR" }, +#elif defined(SH64) + { 0, "PC(L)" }, + { 4, "PC(U)" }, + { 8, "SR(L)" }, + { 12, "SR(U)" }, + { 16, "syscall no.(L)" }, + { 20, "syscall_no.(U)" }, + { 24, "R0(L)" }, + { 28, "R0(U)" }, + { 32, "R1(L)" }, + { 36, "R1(U)" }, + { 40, "R2(L)" }, + { 44, "R2(U)" }, + { 48, "R3(L)" }, + { 52, "R3(U)" }, + { 56, "R4(L)" }, + { 60, "R4(U)" }, + { 64, "R5(L)" }, + { 68, "R5(U)" }, + { 72, "R6(L)" }, + { 76, "R6(U)" }, + { 80, "R7(L)" }, + { 84, "R7(U)" }, + { 88, "R8(L)" }, + { 92, "R8(U)" }, + { 96, "R9(L)" }, + { 100, "R9(U)" }, + { 104, "R10(L)" }, + { 108, "R10(U)" }, + { 112, "R11(L)" }, + { 116, "R11(U)" }, + { 120, "R12(L)" }, + { 124, "R12(U)" }, + { 128, "R13(L)" }, + { 132, "R13(U)" }, + { 136, "R14(L)" }, + { 140, "R14(U)" }, + { 144, "R15(L)" }, + { 148, "R15(U)" }, + { 152, "R16(L)" }, + { 156, "R16(U)" }, + { 160, "R17(L)" }, + { 164, "R17(U)" }, + { 168, "R18(L)" }, + { 172, "R18(U)" }, + { 176, "R19(L)" }, + { 180, "R19(U)" }, + { 184, "R20(L)" }, + { 188, "R20(U)" }, + { 192, "R21(L)" }, + { 196, "R21(U)" }, + { 200, "R22(L)" }, + { 204, "R22(U)" }, + { 208, "R23(L)" }, + { 212, "R23(U)" }, + { 216, "R24(L)" }, + { 220, "R24(U)" }, + { 224, "R25(L)" }, + { 228, "R25(U)" }, + { 232, "R26(L)" }, + { 236, "R26(U)" }, + { 240, "R27(L)" }, + { 244, "R27(U)" }, + { 248, "R28(L)" }, + { 252, "R28(U)" }, + { 256, "R29(L)" }, + { 260, "R29(U)" }, + { 264, "R30(L)" }, + { 268, "R30(U)" }, + { 272, "R31(L)" }, + { 276, "R31(U)" }, + { 280, "R32(L)" }, + { 284, "R32(U)" }, + { 288, "R33(L)" }, + { 292, "R33(U)" }, + { 296, "R34(L)" }, + { 300, "R34(U)" }, + { 304, "R35(L)" }, + { 308, "R35(U)" }, + { 312, "R36(L)" }, + { 316, "R36(U)" }, + { 320, "R37(L)" }, + { 324, "R37(U)" }, + { 328, "R38(L)" }, + { 332, "R38(U)" }, + { 336, "R39(L)" }, + { 340, "R39(U)" }, + { 344, "R40(L)" }, + { 348, "R40(U)" }, + { 352, "R41(L)" }, + { 356, "R41(U)" }, + { 360, "R42(L)" }, + { 364, "R42(U)" }, + { 368, "R43(L)" }, + { 372, "R43(U)" }, + { 376, "R44(L)" }, + { 380, "R44(U)" }, + { 384, "R45(L)" }, + { 388, "R45(U)" }, + { 392, "R46(L)" }, + { 396, "R46(U)" }, + { 400, "R47(L)" }, + { 404, "R47(U)" }, + { 408, "R48(L)" }, + { 412, "R48(U)" }, + { 416, "R49(L)" }, + { 420, "R49(U)" }, + { 424, "R50(L)" }, + { 428, "R50(U)" }, + { 432, "R51(L)" }, + { 436, "R51(U)" }, + { 440, "R52(L)" }, + { 444, "R52(U)" }, + { 448, "R53(L)" }, + { 452, "R53(U)" }, + { 456, "R54(L)" }, + { 460, "R54(U)" }, + { 464, "R55(L)" }, + { 468, "R55(U)" }, + { 472, "R56(L)" }, + { 476, "R56(U)" }, + { 480, "R57(L)" }, + { 484, "R57(U)" }, + { 488, "R58(L)" }, + { 492, "R58(U)" }, + { 496, "R59(L)" }, + { 500, "R59(U)" }, + { 504, "R60(L)" }, + { 508, "R60(U)" }, + { 512, "R61(L)" }, + { 516, "R61(U)" }, + { 520, "R62(L)" }, + { 524, "R62(U)" }, + { 528, "TR0(L)" }, + { 532, "TR0(U)" }, + { 536, "TR1(L)" }, + { 540, "TR1(U)" }, + { 544, "TR2(L)" }, + { 548, "TR2(U)" }, + { 552, "TR3(L)" }, + { 556, "TR3(U)" }, + { 560, "TR4(L)" }, + { 564, "TR4(U)" }, + { 568, "TR5(L)" }, + { 572, "TR5(U)" }, + { 576, "TR6(L)" }, + { 580, "TR6(U)" }, + { 584, "TR7(L)" }, + { 588, "TR7(U)" }, + /* This entry is in case pt_regs contains dregs (depends on + the kernel build options). */ + { uoff(regs), "offsetof(struct user, regs)" }, + { uoff(fpu), "offsetof(struct user, fpu)" }, +#elif defined(ARM) + { uoff(regs.ARM_r0), "r0" }, + { uoff(regs.ARM_r1), "r1" }, + { uoff(regs.ARM_r2), "r2" }, + { uoff(regs.ARM_r3), "r3" }, + { uoff(regs.ARM_r4), "r4" }, + { uoff(regs.ARM_r5), "r5" }, + { uoff(regs.ARM_r6), "r6" }, + { uoff(regs.ARM_r7), "r7" }, + { uoff(regs.ARM_r8), "r8" }, + { uoff(regs.ARM_r9), "r9" }, + { uoff(regs.ARM_r10), "r10" }, + { uoff(regs.ARM_fp), "fp" }, + { uoff(regs.ARM_ip), "ip" }, + { uoff(regs.ARM_sp), "sp" }, + { uoff(regs.ARM_lr), "lr" }, + { uoff(regs.ARM_pc), "pc" }, + { uoff(regs.ARM_cpsr), "cpsr" }, +#elif defined(AVR32) + { uoff(regs.sr), "sr" }, + { uoff(regs.pc), "pc" }, + { uoff(regs.lr), "lr" }, + { uoff(regs.sp), "sp" }, + { uoff(regs.r12), "r12" }, + { uoff(regs.r11), "r11" }, + { uoff(regs.r10), "r10" }, + { uoff(regs.r9), "r9" }, + { uoff(regs.r8), "r8" }, + { uoff(regs.r7), "r7" }, + { uoff(regs.r6), "r6" }, + { uoff(regs.r5), "r5" }, + { uoff(regs.r4), "r4" }, + { uoff(regs.r3), "r3" }, + { uoff(regs.r2), "r2" }, + { uoff(regs.r1), "r1" }, + { uoff(regs.r0), "r0" }, + { uoff(regs.r12_orig), "orig_r12" }, +#elif defined(MIPS) + { 0, "r0" }, + { 1, "r1" }, + { 2, "r2" }, + { 3, "r3" }, + { 4, "r4" }, + { 5, "r5" }, + { 6, "r6" }, + { 7, "r7" }, + { 8, "r8" }, + { 9, "r9" }, + { 10, "r10" }, + { 11, "r11" }, + { 12, "r12" }, + { 13, "r13" }, + { 14, "r14" }, + { 15, "r15" }, + { 16, "r16" }, + { 17, "r17" }, + { 18, "r18" }, + { 19, "r19" }, + { 20, "r20" }, + { 21, "r21" }, + { 22, "r22" }, + { 23, "r23" }, + { 24, "r24" }, + { 25, "r25" }, + { 26, "r26" }, + { 27, "r27" }, + { 28, "r28" }, + { 29, "r29" }, + { 30, "r30" }, + { 31, "r31" }, + { 32, "f0" }, + { 33, "f1" }, + { 34, "f2" }, + { 35, "f3" }, + { 36, "f4" }, + { 37, "f5" }, + { 38, "f6" }, + { 39, "f7" }, + { 40, "f8" }, + { 41, "f9" }, + { 42, "f10" }, + { 43, "f11" }, + { 44, "f12" }, + { 45, "f13" }, + { 46, "f14" }, + { 47, "f15" }, + { 48, "f16" }, + { 49, "f17" }, + { 50, "f18" }, + { 51, "f19" }, + { 52, "f20" }, + { 53, "f21" }, + { 54, "f22" }, + { 55, "f23" }, + { 56, "f24" }, + { 57, "f25" }, + { 58, "f26" }, + { 59, "f27" }, + { 60, "f28" }, + { 61, "f29" }, + { 62, "f30" }, + { 63, "f31" }, + { 64, "pc" }, + { 65, "cause" }, + { 66, "badvaddr" }, + { 67, "mmhi" }, + { 68, "mmlo" }, + { 69, "fpcsr" }, + { 70, "fpeir" }, +#elif defined(TILE) + { PTREGS_OFFSET_REG(0), "r0" }, + { PTREGS_OFFSET_REG(1), "r1" }, + { PTREGS_OFFSET_REG(2), "r2" }, + { PTREGS_OFFSET_REG(3), "r3" }, + { PTREGS_OFFSET_REG(4), "r4" }, + { PTREGS_OFFSET_REG(5), "r5" }, + { PTREGS_OFFSET_REG(6), "r6" }, + { PTREGS_OFFSET_REG(7), "r7" }, + { PTREGS_OFFSET_REG(8), "r8" }, + { PTREGS_OFFSET_REG(9), "r9" }, + { PTREGS_OFFSET_REG(10), "r10" }, + { PTREGS_OFFSET_REG(11), "r11" }, + { PTREGS_OFFSET_REG(12), "r12" }, + { PTREGS_OFFSET_REG(13), "r13" }, + { PTREGS_OFFSET_REG(14), "r14" }, + { PTREGS_OFFSET_REG(15), "r15" }, + { PTREGS_OFFSET_REG(16), "r16" }, + { PTREGS_OFFSET_REG(17), "r17" }, + { PTREGS_OFFSET_REG(18), "r18" }, + { PTREGS_OFFSET_REG(19), "r19" }, + { PTREGS_OFFSET_REG(20), "r20" }, + { PTREGS_OFFSET_REG(21), "r21" }, + { PTREGS_OFFSET_REG(22), "r22" }, + { PTREGS_OFFSET_REG(23), "r23" }, + { PTREGS_OFFSET_REG(24), "r24" }, + { PTREGS_OFFSET_REG(25), "r25" }, + { PTREGS_OFFSET_REG(26), "r26" }, + { PTREGS_OFFSET_REG(27), "r27" }, + { PTREGS_OFFSET_REG(28), "r28" }, + { PTREGS_OFFSET_REG(29), "r29" }, + { PTREGS_OFFSET_REG(30), "r30" }, + { PTREGS_OFFSET_REG(31), "r31" }, + { PTREGS_OFFSET_REG(32), "r32" }, + { PTREGS_OFFSET_REG(33), "r33" }, + { PTREGS_OFFSET_REG(34), "r34" }, + { PTREGS_OFFSET_REG(35), "r35" }, + { PTREGS_OFFSET_REG(36), "r36" }, + { PTREGS_OFFSET_REG(37), "r37" }, + { PTREGS_OFFSET_REG(38), "r38" }, + { PTREGS_OFFSET_REG(39), "r39" }, + { PTREGS_OFFSET_REG(40), "r40" }, + { PTREGS_OFFSET_REG(41), "r41" }, + { PTREGS_OFFSET_REG(42), "r42" }, + { PTREGS_OFFSET_REG(43), "r43" }, + { PTREGS_OFFSET_REG(44), "r44" }, + { PTREGS_OFFSET_REG(45), "r45" }, + { PTREGS_OFFSET_REG(46), "r46" }, + { PTREGS_OFFSET_REG(47), "r47" }, + { PTREGS_OFFSET_REG(48), "r48" }, + { PTREGS_OFFSET_REG(49), "r49" }, + { PTREGS_OFFSET_REG(50), "r50" }, + { PTREGS_OFFSET_REG(51), "r51" }, + { PTREGS_OFFSET_REG(52), "r52" }, + { PTREGS_OFFSET_TP, "tp" }, + { PTREGS_OFFSET_SP, "sp" }, + { PTREGS_OFFSET_LR, "lr" }, + { PTREGS_OFFSET_PC, "pc" }, + { PTREGS_OFFSET_EX1, "ex1" }, + { PTREGS_OFFSET_FAULTNUM, "faultnum" }, + { PTREGS_OFFSET_ORIG_R0, "orig_r0" }, + { PTREGS_OFFSET_FLAGS, "flags" }, +#endif +#ifdef CRISV10 + { 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" }, + { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, + { 4*PT_R13, "4*PT_R13" }, + { 4*PT_R12, "4*PT_R12" }, + { 4*PT_R11, "4*PT_R11" }, + { 4*PT_R10, "4*PT_R10" }, + { 4*PT_R9, "4*PT_R9" }, + { 4*PT_R8, "4*PT_R8" }, + { 4*PT_R7, "4*PT_R7" }, + { 4*PT_R6, "4*PT_R6" }, + { 4*PT_R5, "4*PT_R5" }, + { 4*PT_R4, "4*PT_R4" }, + { 4*PT_R3, "4*PT_R3" }, + { 4*PT_R2, "4*PT_R2" }, + { 4*PT_R1, "4*PT_R1" }, + { 4*PT_R0, "4*PT_R0" }, + { 4*PT_MOF, "4*PT_MOF" }, + { 4*PT_DCCR, "4*PT_DCCR" }, + { 4*PT_SRP, "4*PT_SRP" }, + { 4*PT_IRP, "4*PT_IRP" }, + { 4*PT_CSRINSTR, "4*PT_CSRINSTR" }, + { 4*PT_CSRADDR, "4*PT_CSRADDR" }, + { 4*PT_CSRDATA, "4*PT_CSRDATA" }, + { 4*PT_USP, "4*PT_USP" }, +#endif +#ifdef CRISV32 + { 4*PT_ORIG_R10, "4*PT_ORIG_R10" }, + { 4*PT_R0, "4*PT_R0" }, + { 4*PT_R1, "4*PT_R1" }, + { 4*PT_R2, "4*PT_R2" }, + { 4*PT_R3, "4*PT_R3" }, + { 4*PT_R4, "4*PT_R4" }, + { 4*PT_R5, "4*PT_R5" }, + { 4*PT_R6, "4*PT_R6" }, + { 4*PT_R7, "4*PT_R7" }, + { 4*PT_R8, "4*PT_R8" }, + { 4*PT_R9, "4*PT_R9" }, + { 4*PT_R10, "4*PT_R10" }, + { 4*PT_R11, "4*PT_R11" }, + { 4*PT_R12, "4*PT_R12" }, + { 4*PT_R13, "4*PT_R13" }, + { 4*PT_ACR, "4*PT_ACR" }, + { 4*PT_SRS, "4*PT_SRS" }, + { 4*PT_MOF, "4*PT_MOF" }, + { 4*PT_SPC, "4*PT_SPC" }, + { 4*PT_CCS, "4*PT_CCS" }, + { 4*PT_SRP, "4*PT_SRP" }, + { 4*PT_ERP, "4*PT_ERP" }, + { 4*PT_EXS, "4*PT_EXS" }, + { 4*PT_EDA, "4*PT_EDA" }, + { 4*PT_USP, "4*PT_USP" }, + { 4*PT_PPC, "4*PT_PPC" }, + { 4*PT_BP_CTRL, "4*PT_BP_CTRL" }, + { 4*PT_BP+4, "4*PT_BP+4" }, + { 4*PT_BP+8, "4*PT_BP+8" }, + { 4*PT_BP+12, "4*PT_BP+12" }, + { 4*PT_BP+16, "4*PT_BP+16" }, + { 4*PT_BP+20, "4*PT_BP+20" }, + { 4*PT_BP+24, "4*PT_BP+24" }, + { 4*PT_BP+28, "4*PT_BP+28" }, + { 4*PT_BP+32, "4*PT_BP+32" }, + { 4*PT_BP+36, "4*PT_BP+36" }, + { 4*PT_BP+40, "4*PT_BP+40" }, + { 4*PT_BP+44, "4*PT_BP+44" }, + { 4*PT_BP+48, "4*PT_BP+48" }, + { 4*PT_BP+52, "4*PT_BP+52" }, + { 4*PT_BP+56, "4*PT_BP+56" }, +#endif +#ifdef MICROBLAZE + { PT_GPR(0), "r0" }, + { PT_GPR(1), "r1" }, + { PT_GPR(2), "r2" }, + { PT_GPR(3), "r3" }, + { PT_GPR(4), "r4" }, + { PT_GPR(5), "r5" }, + { PT_GPR(6), "r6" }, + { PT_GPR(7), "r7" }, + { PT_GPR(8), "r8" }, + { PT_GPR(9), "r9" }, + { PT_GPR(10), "r10" }, + { PT_GPR(11), "r11" }, + { PT_GPR(12), "r12" }, + { PT_GPR(13), "r13" }, + { PT_GPR(14), "r14" }, + { PT_GPR(15), "r15" }, + { PT_GPR(16), "r16" }, + { PT_GPR(17), "r17" }, + { PT_GPR(18), "r18" }, + { PT_GPR(19), "r19" }, + { PT_GPR(20), "r20" }, + { PT_GPR(21), "r21" }, + { PT_GPR(22), "r22" }, + { PT_GPR(23), "r23" }, + { PT_GPR(24), "r24" }, + { PT_GPR(25), "r25" }, + { PT_GPR(26), "r26" }, + { PT_GPR(27), "r27" }, + { PT_GPR(28), "r28" }, + { 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", }, +#endif +#ifdef OR1K + { 4*0, "r0" }, + { 4*1, "r1" }, + { 4*2, "r2" }, + { 4*3, "r3" }, + { 4*4, "r4" }, + { 4*5, "r5" }, + { 4*6, "r6" }, + { 4*7, "r7" }, + { 4*8, "r8" }, + { 4*9, "r9" }, + { 4*10, "r10" }, + { 4*11, "r11" }, + { 4*12, "r12" }, + { 4*13, "r13" }, + { 4*14, "r14" }, + { 4*15, "r15" }, + { 4*16, "r16" }, + { 4*17, "r17" }, + { 4*18, "r18" }, + { 4*19, "r19" }, + { 4*20, "r20" }, + { 4*21, "r21" }, + { 4*22, "r22" }, + { 4*23, "r23" }, + { 4*24, "r24" }, + { 4*25, "r25" }, + { 4*26, "r26" }, + { 4*27, "r27" }, + { 4*28, "r28" }, + { 4*29, "r29" }, + { 4*30, "r30" }, + { 4*31, "r31" }, + { 4*32, "pc" }, + { 4*33, "sr" }, +#endif +#ifdef XTENSA + { SYSCALL_NR, "syscall_nr" }, + { REG_AR_BASE, "ar0" }, + { REG_AR_BASE+1, "ar1" }, + { REG_AR_BASE+2, "ar2" }, + { REG_AR_BASE+3, "ar3" }, + { REG_AR_BASE+4, "ar4" }, + { REG_AR_BASE+5, "ar5" }, + { REG_AR_BASE+6, "ar6" }, + { REG_AR_BASE+7, "ar7" }, + { REG_AR_BASE+8, "ar8" }, + { REG_AR_BASE+9, "ar9" }, + { REG_AR_BASE+10, "ar10" }, + { REG_AR_BASE+11, "ar11" }, + { REG_AR_BASE+12, "ar12" }, + { REG_AR_BASE+13, "ar13" }, + { REG_AR_BASE+14, "ar14" }, + { REG_AR_BASE+15, "ar15" }, + { REG_AR_BASE+16, "ar16" }, + { REG_AR_BASE+17, "ar17" }, + { REG_AR_BASE+18, "ar18" }, + { REG_AR_BASE+19, "ar19" }, + { REG_AR_BASE+20, "ar20" }, + { REG_AR_BASE+21, "ar21" }, + { REG_AR_BASE+22, "ar22" }, + { REG_AR_BASE+23, "ar23" }, + { REG_AR_BASE+24, "ar24" }, + { REG_AR_BASE+25, "ar25" }, + { REG_AR_BASE+26, "ar26" }, + { REG_AR_BASE+27, "ar27" }, + { REG_AR_BASE+28, "ar28" }, + { REG_AR_BASE+29, "ar29" }, + { REG_AR_BASE+30, "ar30" }, + { REG_AR_BASE+31, "ar31" }, + { REG_AR_BASE+32, "ar32" }, + { REG_AR_BASE+33, "ar33" }, + { REG_AR_BASE+34, "ar34" }, + { REG_AR_BASE+35, "ar35" }, + { REG_AR_BASE+36, "ar36" }, + { REG_AR_BASE+37, "ar37" }, + { REG_AR_BASE+38, "ar38" }, + { REG_AR_BASE+39, "ar39" }, + { REG_AR_BASE+40, "ar40" }, + { REG_AR_BASE+41, "ar41" }, + { REG_AR_BASE+42, "ar42" }, + { REG_AR_BASE+43, "ar43" }, + { REG_AR_BASE+44, "ar44" }, + { REG_AR_BASE+45, "ar45" }, + { REG_AR_BASE+46, "ar46" }, + { REG_AR_BASE+47, "ar47" }, + { REG_AR_BASE+48, "ar48" }, + { REG_AR_BASE+49, "ar49" }, + { REG_AR_BASE+50, "ar50" }, + { REG_AR_BASE+51, "ar51" }, + { REG_AR_BASE+52, "ar52" }, + { REG_AR_BASE+53, "ar53" }, + { REG_AR_BASE+54, "ar54" }, + { REG_AR_BASE+55, "ar55" }, + { REG_AR_BASE+56, "ar56" }, + { REG_AR_BASE+57, "ar57" }, + { REG_AR_BASE+58, "ar58" }, + { REG_AR_BASE+59, "ar59" }, + { REG_AR_BASE+60, "ar60" }, + { REG_AR_BASE+61, "ar61" }, + { REG_AR_BASE+62, "ar62" }, + { REG_AR_BASE+63, "ar63" }, + { REG_LBEG, "lbeg" }, + { REG_LEND, "lend" }, + { REG_LCOUNT, "lcount" }, + { REG_SAR, "sar" }, + { REG_WB, "wb" }, + { REG_WS, "ws" }, + { REG_PS, "ps" }, + { REG_PC, "pc" }, + { REG_A_BASE, "a0" }, + { REG_A_BASE+1, "a1" }, + { REG_A_BASE+2, "a2" }, + { REG_A_BASE+3, "a3" }, + { REG_A_BASE+4, "a4" }, + { REG_A_BASE+5, "a5" }, + { REG_A_BASE+6, "a6" }, + { REG_A_BASE+7, "a7" }, + { REG_A_BASE+8, "a8" }, + { REG_A_BASE+9, "a9" }, + { REG_A_BASE+10, "a10" }, + { REG_A_BASE+11, "a11" }, + { REG_A_BASE+12, "a12" }, + { REG_A_BASE+13, "a13" }, + { REG_A_BASE+14, "a14" }, + { REG_A_BASE+15, "a15" }, +#endif + + /* Other fields in "struct user" */ +#if defined(S390) || defined(S390X) + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + /* S390[X] has no start_data */ + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(POWERPC) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(I386) || defined(X86_64) || defined(X32) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + { uoff(i387), "offsetof(struct user, i387)" }, + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(reserved), "offsetof(struct user, reserved)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { uoff(u_debugreg), "offsetof(struct user, u_debugreg)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(IA64) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(ARM) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(reserved), "offsetof(struct user, reserved)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(AARCH64) + /* nothing */ +#elif defined(M68K) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + { uoff(m68kfp), "offsetof(struct user, m68kfp)" }, + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(reserved), "offsetof(struct user, reserved)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(MIPS) || defined(LINUX_MIPSN32) + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_data), "offsetof(struct user, start_data)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(ALPHA) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(SPARC) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(SPARC64) + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(HPPA) + /* nothing */ +#elif defined(SH) || defined(SH64) + { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" }, + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_data), "offsetof(struct user, start_data)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(CRISV10) || defined(CRISV32) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(TILE) + /* nothing */ +#elif defined(MICROBLAZE) + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(AVR32) + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(start_data), "offsetof(struct user, start_data)" }, + { uoff(start_stack), "offsetof(struct user, start_stack)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(BFIN) + { uoff(u_tsize), "offsetof(struct user, u_tsize)" }, + { uoff(u_dsize), "offsetof(struct user, u_dsize)" }, + { uoff(u_ssize), "offsetof(struct user, u_ssize)" }, + { uoff(start_code), "offsetof(struct user, start_code)" }, + { uoff(signal), "offsetof(struct user, signal)" }, + { uoff(u_ar0), "offsetof(struct user, u_ar0)" }, + { uoff(magic), "offsetof(struct user, magic)" }, + { uoff(u_comm), "offsetof(struct user, u_comm)" }, + { sizeof(struct user), "sizeof(struct user)" }, +#elif defined(OR1K) + /* nothing */ +#elif defined(METAG) + /* nothing */ +#elif defined(XTENSA) + /* nothing */ +#endif + { 0, NULL }, +}; + +int +sys_ptrace(struct tcb *tcp) +{ + const struct xlat *x; + long addr; + + if (entering(tcp)) { + printxval(ptrace_cmds, tcp->u_arg[0], "PTRACE_???"); + tprintf(", %lu, ", tcp->u_arg[1]); + + addr = tcp->u_arg[2]; + if (tcp->u_arg[0] == PTRACE_PEEKUSER + || tcp->u_arg[0] == PTRACE_POKEUSER + ) { + for (x = struct_user_offsets; x->str; x++) { + if (x->val >= addr) + break; + } + if (!x->str) + tprintf("%#lx, ", addr); + else if (x->val > addr && x != struct_user_offsets) { + x--; + tprintf("%s + %ld, ", x->str, addr - x->val); + } + else + tprintf("%s, ", x->str); + } else +#ifdef PTRACE_GETREGSET + if (tcp->u_arg[0] == PTRACE_GETREGSET + || tcp->u_arg[0] == PTRACE_SETREGSET + ) { + printxval(nt_descriptor_types, tcp->u_arg[2], "NT_???"); + tprints(", "); + } else +#endif + tprintf("%#lx, ", addr); + + + switch (tcp->u_arg[0]) { +#ifndef IA64 + case PTRACE_PEEKDATA: + case PTRACE_PEEKTEXT: + case PTRACE_PEEKUSER: + break; +#endif + case PTRACE_CONT: + case PTRACE_SINGLESTEP: + case PTRACE_SYSCALL: + case PTRACE_DETACH: + printsignal(tcp->u_arg[3]); + break; +#ifdef PTRACE_SETOPTIONS + case PTRACE_SETOPTIONS: + printflags(ptrace_setoptions_flags, tcp->u_arg[3], "PTRACE_O_???"); + break; +#endif +#ifdef PTRACE_SETSIGINFO + case PTRACE_SETSIGINFO: { + printsiginfo_at(tcp, tcp->u_arg[3]); + break; + } +#endif +#ifdef PTRACE_GETSIGINFO + case PTRACE_GETSIGINFO: + /* Don't print anything, do it at syscall return. */ + break; +#endif +#ifdef PTRACE_GETREGSET + case PTRACE_GETREGSET: + break; + case PTRACE_SETREGSET: + tprint_iov(tcp, /*len:*/ 1, tcp->u_arg[3], /*as string:*/ 0); + break; +#endif + default: + tprintf("%#lx", tcp->u_arg[3]); + break; + } + } else { + switch (tcp->u_arg[0]) { + case PTRACE_PEEKDATA: + case PTRACE_PEEKTEXT: + case PTRACE_PEEKUSER: +#ifdef IA64 + return RVAL_HEX; +#else + printnum(tcp, tcp->u_arg[3], "%#lx"); + break; +#endif +#ifdef PTRACE_GETSIGINFO + case PTRACE_GETSIGINFO: { + printsiginfo_at(tcp, tcp->u_arg[3]); + break; + } +#endif +#ifdef PTRACE_GETREGSET + case PTRACE_GETREGSET: + tprint_iov(tcp, /*len:*/ 1, tcp->u_arg[3], /*as string:*/ 0); + break; +#endif + } + } + return 0; +} + +#ifndef FUTEX_CMP_REQUEUE +# define FUTEX_CMP_REQUEUE 4 +#endif +#ifndef FUTEX_WAKE_OP +# define FUTEX_WAKE_OP 5 +#endif +#ifndef FUTEX_LOCK_PI +# define FUTEX_LOCK_PI 6 +# define FUTEX_UNLOCK_PI 7 +# define FUTEX_TRYLOCK_PI 8 +#endif +#ifndef FUTEX_WAIT_BITSET +# define FUTEX_WAIT_BITSET 9 +#endif +#ifndef FUTEX_WAKE_BITSET +# define FUTEX_WAKE_BITSET 10 +#endif +#ifndef FUTEX_WAIT_REQUEUE_PI +# define FUTEX_WAIT_REQUEUE_PI 11 +#endif +#ifndef FUTEX_CMP_REQUEUE_PI +# define FUTEX_CMP_REQUEUE_PI 12 +#endif +#ifndef FUTEX_PRIVATE_FLAG +# define FUTEX_PRIVATE_FLAG 128 +#endif +#ifndef FUTEX_CLOCK_REALTIME +# define FUTEX_CLOCK_REALTIME 256 +#endif +static const struct xlat futexops[] = { + { FUTEX_WAIT, "FUTEX_WAIT" }, + { FUTEX_WAKE, "FUTEX_WAKE" }, + { FUTEX_FD, "FUTEX_FD" }, + { FUTEX_REQUEUE, "FUTEX_REQUEUE" }, + { FUTEX_CMP_REQUEUE, "FUTEX_CMP_REQUEUE" }, + { FUTEX_WAKE_OP, "FUTEX_WAKE_OP" }, + { FUTEX_LOCK_PI, "FUTEX_LOCK_PI" }, + { FUTEX_UNLOCK_PI, "FUTEX_UNLOCK_PI" }, + { FUTEX_TRYLOCK_PI, "FUTEX_TRYLOCK_PI" }, + { FUTEX_WAIT_BITSET, "FUTEX_WAIT_BITSET" }, + { FUTEX_WAKE_BITSET, "FUTEX_WAKE_BITSET" }, + { FUTEX_WAIT_REQUEUE_PI, "FUTEX_WAIT_REQUEUE_PI" }, + { FUTEX_CMP_REQUEUE_PI, "FUTEX_CMP_REQUEUE_PI" }, + { FUTEX_WAIT|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_PRIVATE" }, + { FUTEX_WAKE|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_PRIVATE" }, + { FUTEX_FD|FUTEX_PRIVATE_FLAG, "FUTEX_FD_PRIVATE" }, + { FUTEX_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_REQUEUE_PRIVATE" }, + { FUTEX_CMP_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PRIVATE" }, + { FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_OP_PRIVATE" }, + { FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_LOCK_PI_PRIVATE" }, + { FUTEX_UNLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_UNLOCK_PI_PRIVATE" }, + { FUTEX_TRYLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_TRYLOCK_PI_PRIVATE" }, + { FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_BITSET_PRIVATE" }, + { FUTEX_WAKE_BITSET|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_BITSET_PRIVATE" }, + { FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_REQUEUE_PI_PRIVATE" }, + { FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PI_PRIVATE" }, + { FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME" }, + { FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME" }, + { FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME" }, + { FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME" }, + { 0, NULL } +}; +#ifndef FUTEX_OP_SET +# define FUTEX_OP_SET 0 +# define FUTEX_OP_ADD 1 +# define FUTEX_OP_OR 2 +# define FUTEX_OP_ANDN 3 +# define FUTEX_OP_XOR 4 +# define FUTEX_OP_CMP_EQ 0 +# define FUTEX_OP_CMP_NE 1 +# define FUTEX_OP_CMP_LT 2 +# define FUTEX_OP_CMP_LE 3 +# define FUTEX_OP_CMP_GT 4 +# define FUTEX_OP_CMP_GE 5 +#endif +static const struct xlat futexwakeops[] = { + { FUTEX_OP_SET, "FUTEX_OP_SET" }, + { FUTEX_OP_ADD, "FUTEX_OP_ADD" }, + { FUTEX_OP_OR, "FUTEX_OP_OR" }, + { FUTEX_OP_ANDN, "FUTEX_OP_ANDN" }, + { FUTEX_OP_XOR, "FUTEX_OP_XOR" }, + { 0, NULL } +}; +static const struct xlat futexwakecmps[] = { + { FUTEX_OP_CMP_EQ, "FUTEX_OP_CMP_EQ" }, + { FUTEX_OP_CMP_NE, "FUTEX_OP_CMP_NE" }, + { FUTEX_OP_CMP_LT, "FUTEX_OP_CMP_LT" }, + { FUTEX_OP_CMP_LE, "FUTEX_OP_CMP_LE" }, + { FUTEX_OP_CMP_GT, "FUTEX_OP_CMP_GT" }, + { FUTEX_OP_CMP_GE, "FUTEX_OP_CMP_GE" }, + { 0, NULL } +}; + +int +sys_futex(struct tcb *tcp) +{ + if (entering(tcp)) { + long int cmd = tcp->u_arg[1] & 127; + tprintf("%p, ", (void *) tcp->u_arg[0]); + printxval(futexops, tcp->u_arg[1], "FUTEX_???"); + tprintf(", %ld", tcp->u_arg[2]); + if (cmd == FUTEX_WAKE_BITSET) + tprintf(", %lx", tcp->u_arg[5]); + else if (cmd == FUTEX_WAIT) { + tprints(", "); + printtv(tcp, tcp->u_arg[3]); + } else if (cmd == FUTEX_WAIT_BITSET) { + tprints(", "); + printtv(tcp, tcp->u_arg[3]); + tprintf(", %lx", tcp->u_arg[5]); + } else if (cmd == FUTEX_REQUEUE) + tprintf(", %ld, %p", tcp->u_arg[3], (void *) tcp->u_arg[4]); + else if (cmd == FUTEX_CMP_REQUEUE || cmd == FUTEX_CMP_REQUEUE_PI) + tprintf(", %ld, %p, %ld", tcp->u_arg[3], (void *) tcp->u_arg[4], tcp->u_arg[5]); + else if (cmd == FUTEX_WAKE_OP) { + tprintf(", %ld, %p, {", tcp->u_arg[3], (void *) tcp->u_arg[4]); + if ((tcp->u_arg[5] >> 28) & 8) + tprints("FUTEX_OP_OPARG_SHIFT|"); + printxval(futexwakeops, (tcp->u_arg[5] >> 28) & 0x7, "FUTEX_OP_???"); + tprintf(", %ld, ", (tcp->u_arg[5] >> 12) & 0xfff); + if ((tcp->u_arg[5] >> 24) & 8) + tprints("FUTEX_OP_OPARG_SHIFT|"); + printxval(futexwakecmps, (tcp->u_arg[5] >> 24) & 0x7, "FUTEX_OP_CMP_???"); + tprintf(", %ld}", tcp->u_arg[5] & 0xfff); + } else if (cmd == FUTEX_WAIT_REQUEUE_PI) { + tprints(", "); + printtv(tcp, tcp->u_arg[3]); + tprintf(", %p", (void *) tcp->u_arg[4]); + } + } + return 0; +} + +static void +print_affinitylist(struct tcb *tcp, long list, unsigned int len) +{ + int first = 1; + unsigned long w, min_len; + + if (abbrev(tcp) && len / sizeof(w) > max_strlen) + min_len = len - max_strlen * sizeof(w); + else + min_len = 0; + for (; len >= sizeof(w) && len > min_len; + len -= sizeof(w), list += sizeof(w)) { + if (umove(tcp, list, &w) < 0) + break; + if (first) + tprints("{"); + else + tprints(", "); + first = 0; + tprintf("%lx", w); + } + if (len) { + if (first) + tprintf("%#lx", list); + else + tprintf(", %s}", (len >= sizeof(w) && len > min_len ? + "???" : "...")); + } else { + tprints(first ? "{}" : "}"); + } +} + +int +sys_sched_setaffinity(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + print_affinitylist(tcp, tcp->u_arg[2], tcp->u_arg[1]); + } + return 0; +} + +int +sys_sched_getaffinity(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + } else { + if (tcp->u_rval == -1) + tprintf("%#lx", tcp->u_arg[2]); + else + print_affinitylist(tcp, tcp->u_arg[2], tcp->u_rval); + } + return 0; +} + +int +sys_get_robust_list(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); + } else { + void *addr; + size_t len; + + if (syserror(tcp) || + !tcp->u_arg[1] || + umove(tcp, tcp->u_arg[1], &addr) < 0) { + tprintf("%#lx, ", tcp->u_arg[1]); + } else { + tprintf("[%p], ", addr); + } + + if (syserror(tcp) || + !tcp->u_arg[2] || + umove(tcp, tcp->u_arg[2], &len) < 0) { + tprintf("%#lx", tcp->u_arg[2]); + } else { + tprintf("[%lu]", (unsigned long) len); + } + } + return 0; +} + +static const struct xlat schedulers[] = { + { SCHED_OTHER, "SCHED_OTHER" }, + { SCHED_RR, "SCHED_RR" }, + { SCHED_FIFO, "SCHED_FIFO" }, + { 0, NULL } +}; + +int +sys_sched_getscheduler(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%d", (int) tcp->u_arg[0]); + } else if (!syserror(tcp)) { + tcp->auxstr = xlookup(schedulers, tcp->u_rval); + if (tcp->auxstr != NULL) + return RVAL_STR; + } + return 0; +} + +int +sys_sched_setscheduler(struct tcb *tcp) +{ + if (entering(tcp)) { + struct sched_param p; + tprintf("%d, ", (int) tcp->u_arg[0]); + printxval(schedulers, tcp->u_arg[1], "SCHED_???"); + if (umove(tcp, tcp->u_arg[2], &p) < 0) + tprintf(", %#lx", tcp->u_arg[2]); + else + tprintf(", { %d }", p.__sched_priority); + } + return 0; +} + +int +sys_sched_getparam(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%d, ", (int) tcp->u_arg[0]); + } else { + struct sched_param p; + if (umove(tcp, tcp->u_arg[1], &p) < 0) + tprintf("%#lx", tcp->u_arg[1]); + else + tprintf("{ %d }", p.__sched_priority); + } + return 0; +} + +int +sys_sched_setparam(struct tcb *tcp) +{ + if (entering(tcp)) { + struct sched_param p; + if (umove(tcp, tcp->u_arg[1], &p) < 0) + tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]); + else + tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority); + } + return 0; +} + +int +sys_sched_get_priority_min(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(schedulers, tcp->u_arg[0], "SCHED_???"); + } + return 0; +} + +int +sys_sched_rr_get_interval(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + print_timespec(tcp, tcp->u_arg[1]); + } + return 0; +} + +#if defined X86_64 || defined X32 +# include + +static const struct xlat archvals[] = { + { ARCH_SET_GS, "ARCH_SET_GS" }, + { ARCH_SET_FS, "ARCH_SET_FS" }, + { ARCH_GET_FS, "ARCH_GET_FS" }, + { ARCH_GET_GS, "ARCH_GET_GS" }, + { 0, NULL }, +}; + +int +sys_arch_prctl(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(archvals, tcp->u_arg[0], "ARCH_???"); + if (tcp->u_arg[0] == ARCH_SET_GS + || tcp->u_arg[0] == ARCH_SET_FS + ) { + tprintf(", %#lx", tcp->u_arg[1]); + } + } else { + if (tcp->u_arg[0] == ARCH_GET_GS + || tcp->u_arg[0] == ARCH_GET_FS + ) { + long int v; + if (!syserror(tcp) && umove(tcp, tcp->u_arg[1], &v) != -1) + tprintf(", [%#lx]", v); + else + tprintf(", %#lx", tcp->u_arg[1]); + } + } + return 0; +} +#endif /* X86_64 || X32 */ + +int +sys_getcpu(struct tcb *tcp) +{ + if (exiting(tcp)) { + unsigned u; + if (tcp->u_arg[0] == 0) + tprints("NULL, "); + else if (umove(tcp, tcp->u_arg[0], &u) < 0) + tprintf("%#lx, ", tcp->u_arg[0]); + else + tprintf("[%u], ", u); + if (tcp->u_arg[1] == 0) + tprints("NULL, "); + else if (umove(tcp, tcp->u_arg[1], &u) < 0) + tprintf("%#lx, ", tcp->u_arg[1]); + else + tprintf("[%u], ", u); + tprintf("%#lx", tcp->u_arg[2]); + } + return 0; +} + +int +sys_process_vm_readv(struct tcb *tcp) +{ + if (entering(tcp)) { + /* arg 1: pid */ + tprintf("%ld, ", tcp->u_arg[0]); + } else { + /* arg 2: local iov */ + if (syserror(tcp)) { + tprintf("%#lx", tcp->u_arg[1]); + } else { + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + } + /* arg 3: local iovcnt */ + tprintf(", %lu, ", tcp->u_arg[2]); + /* arg 4: remote iov */ + if (syserror(tcp)) { + tprintf("%#lx", tcp->u_arg[3]); + } else { + tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0); + } + /* arg 5: remote iovcnt */ + /* arg 6: flags */ + tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + } + return 0; +} + +int +sys_process_vm_writev(struct tcb *tcp) +{ + if (entering(tcp)) { + /* arg 1: pid */ + tprintf("%ld, ", tcp->u_arg[0]); + /* arg 2: local iov */ + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + /* arg 3: local iovcnt */ + tprintf(", %lu, ", tcp->u_arg[2]); + /* arg 4: remote iov */ + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[3]); + else + tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0); + /* arg 5: remote iovcnt */ + /* arg 6: flags */ + tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + } + return 0; +} diff --git a/alice-strace/quota.c b/alice-strace/quota.c new file mode 100644 index 0000000..780abf9 --- /dev/null +++ b/alice-strace/quota.c @@ -0,0 +1,652 @@ +/* + * 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, 2006 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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" + +#define SUBCMDMASK 0x00ff +#define SUBCMDSHIFT 8 +#define QCMD_CMD(cmd) ((u_int32_t)(cmd) >> SUBCMDSHIFT) +#define QCMD_TYPE(cmd) ((u_int32_t)(cmd) & SUBCMDMASK) + +#define OLD_CMD(cmd) ((u_int32_t)(cmd) << 8) +#define NEW_CMD(cmd) ((u_int32_t)(cmd) | 0x800000) +#define XQM_CMD(cmd) ((u_int32_t)(cmd) | ('X'<<8)) + +#define Q_V1_QUOTAON OLD_CMD(0x1) +#define Q_V1_QUOTAOFF OLD_CMD(0x2) +#define Q_V1_GETQUOTA OLD_CMD(0x3) +#define Q_V1_SETQUOTA OLD_CMD(0x4) +#define Q_V1_SETUSE OLD_CMD(0x5) +#define Q_V1_SYNC OLD_CMD(0x6) +#define Q_SETQLIM OLD_CMD(0x7) +#define Q_V1_GETSTATS OLD_CMD(0x8) +#define Q_V1_RSQUASH OLD_CMD(0x10) + +#define Q_V2_GETQUOTA OLD_CMD(0xD) +#define Q_V2_SETQUOTA OLD_CMD(0xE) +#define Q_V2_SETUSE OLD_CMD(0xF) +#define Q_V2_GETINFO OLD_CMD(0x9) +#define Q_V2_SETINFO OLD_CMD(0xA) +#define Q_V2_SETGRACE OLD_CMD(0xB) +#define Q_V2_SETFLAGS OLD_CMD(0xC) +#define Q_V2_GETSTATS OLD_CMD(0x11) + +#define Q_SYNC NEW_CMD(0x1) +#define Q_QUOTAON NEW_CMD(0x2) +#define Q_QUOTAOFF NEW_CMD(0x3) +#define Q_GETFMT NEW_CMD(0x4) +#define Q_GETINFO NEW_CMD(0x5) +#define Q_SETINFO NEW_CMD(0x6) +#define Q_GETQUOTA NEW_CMD(0x7) +#define Q_SETQUOTA NEW_CMD(0x8) + +#define Q_XQUOTAON XQM_CMD(0x1) +#define Q_XQUOTAOFF XQM_CMD(0x2) +#define Q_XGETQUOTA XQM_CMD(0x3) +#define Q_XSETQLIM XQM_CMD(0x4) +#define Q_XGETQSTAT XQM_CMD(0x5) +#define Q_XQUOTARM XQM_CMD(0x6) +#define Q_XQUOTASYNC XQM_CMD(0x7) + +static const struct xlat quotacmds[] = { + {Q_V1_QUOTAON, "Q_V1_QUOTAON"}, + {Q_V1_QUOTAOFF, "Q_V1_QUOTAOFF"}, + {Q_V1_GETQUOTA, "Q_V1_GETQUOTA"}, + {Q_V1_SETQUOTA, "Q_V1_SETQUOTA"}, + {Q_V1_SETUSE, "Q_V1_SETUSE"}, + {Q_V1_SYNC, "Q_V1_SYNC"}, + {Q_SETQLIM, "Q_SETQLIM"}, + {Q_V1_GETSTATS, "Q_V1_GETSTATS"}, + {Q_V1_RSQUASH, "Q_V1_RSQUASH"}, + + {Q_V2_GETQUOTA, "Q_V2_GETQUOTA"}, + {Q_V2_SETQUOTA, "Q_V2_SETQUOTA"}, + {Q_V2_SETUSE, "Q_V2_SETUSE"}, + {Q_V2_GETINFO, "Q_V2_GETINFO"}, + {Q_V2_SETINFO, "Q_V2_SETINFO"}, + {Q_V2_SETGRACE, "Q_V2_SETGRACE"}, + {Q_V2_SETFLAGS, "Q_V2_SETFLAGS"}, + {Q_V2_GETSTATS, "Q_V2_GETSTATS"}, + + {Q_SYNC, "Q_SYNC"}, + {Q_QUOTAON, "Q_QUOTAON"}, + {Q_QUOTAOFF, "Q_QUOTAOFF"}, + {Q_GETFMT, "Q_GETFMT"}, + {Q_GETINFO, "Q_GETINFO"}, + {Q_SETINFO, "Q_SETINFO"}, + {Q_GETQUOTA, "Q_GETQUOTA"}, + {Q_SETQUOTA, "Q_SETQUOTA"}, + + {Q_XQUOTAON, "Q_XQUOTAON"}, + {Q_XQUOTAOFF, "Q_XQUOTAOFF"}, + {Q_XGETQUOTA, "Q_XGETQUOTA"}, + {Q_XSETQLIM, "Q_XSETQLIM"}, + {Q_XGETQSTAT, "Q_XGETQSTAT"}, + {Q_XQUOTARM, "Q_XQUOTARM"}, + {Q_XQUOTASYNC, "Q_XQUOTASYNC"}, + + {0, NULL}, +}; + +#define USRQUOTA 0 +#define GRPQUOTA 1 + +static const struct xlat quotatypes[] = { + {USRQUOTA, "USRQUOTA"}, + {GRPQUOTA, "GRPQUOTA"}, + {0, NULL}, +}; + +/* Quota format identifiers */ +#define QFMT_VFS_OLD 1 +#define QFMT_VFS_V0 2 + +static const struct xlat quota_formats[] = { + {QFMT_VFS_OLD, "QFMT_VFS_OLD"}, + {QFMT_VFS_V0, "QFMT_VFS_V0"}, + {0, NULL}, +}; + +#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ +#define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ +#define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ +#define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ + +#define XFS_USER_QUOTA (1<<0) /* user quota type */ +#define XFS_PROJ_QUOTA (1<<1) /* (IRIX) project quota type */ +#define XFS_GROUP_QUOTA (1<<2) /* group quota type */ + +static const struct xlat xfs_quota_flags[] = { + {XFS_QUOTA_UDQ_ACCT, "XFS_QUOTA_UDQ_ACCT"}, + {XFS_QUOTA_UDQ_ENFD, "XFS_QUOTA_UDQ_ENFD"}, + {XFS_QUOTA_GDQ_ACCT, "XFS_QUOTA_GDQ_ACCT"}, + {XFS_QUOTA_GDQ_ENFD, "XFS_QUOTA_GDQ_ENFD"}, + {0, NULL} +}; + +static const struct xlat xfs_dqblk_flags[] = { + {XFS_USER_QUOTA, "XFS_USER_QUOTA"}, + {XFS_PROJ_QUOTA, "XFS_PROJ_QUOTA"}, + {XFS_GROUP_QUOTA, "XFS_GROUP_QUOTA"}, + {0, NULL} +}; + +/* + * Following flags are used to specify which fields are valid + */ +#define QIF_BLIMITS 1 +#define QIF_SPACE 2 +#define QIF_ILIMITS 4 +#define QIF_INODES 8 +#define QIF_BTIME 16 +#define QIF_ITIME 32 + +static const struct xlat if_dqblk_valid[] = { + {QIF_BLIMITS, "QIF_BLIMITS"}, + {QIF_SPACE, "QIF_SPACE"}, + {QIF_ILIMITS, "QIF_ILIMITS"}, + {QIF_INODES, "QIF_INODES"}, + {QIF_BTIME, "QIF_BTIME"}, + {QIF_ITIME, "QIF_ITIME"}, + {0, NULL} +}; + +struct if_dqblk +{ + u_int64_t dqb_bhardlimit; + u_int64_t dqb_bsoftlimit; + u_int64_t dqb_curspace; + u_int64_t dqb_ihardlimit; + u_int64_t dqb_isoftlimit; + u_int64_t dqb_curinodes; + u_int64_t dqb_btime; + u_int64_t dqb_itime; + u_int32_t dqb_valid; +}; + +struct v1_dqblk +{ + u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ + u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ + u_int32_t dqb_curblocks; /* current block count */ + u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ + u_int32_t dqb_isoftlimit; /* preferred inode limit */ + u_int32_t dqb_curinodes; /* current # allocated inodes */ + time_t dqb_btime; /* time limit for excessive disk use */ + time_t dqb_itime; /* time limit for excessive files */ +}; + +struct v2_dqblk +{ + unsigned int dqb_ihardlimit; + unsigned int dqb_isoftlimit; + unsigned int dqb_curinodes; + unsigned int dqb_bhardlimit; + unsigned int dqb_bsoftlimit; + u_int64_t dqb_curspace; + time_t dqb_btime; + time_t dqb_itime; +}; + +struct xfs_dqblk +{ + int8_t d_version; /* version of this structure */ + int8_t d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ + u_int16_t d_fieldmask; /* field specifier */ + u_int32_t d_id; /* user, project, or group ID */ + u_int64_t d_blk_hardlimit; /* absolute limit on disk blks */ + u_int64_t d_blk_softlimit; /* preferred limit on disk blks */ + u_int64_t d_ino_hardlimit; /* maximum # allocated inodes */ + u_int64_t d_ino_softlimit; /* preferred inode limit */ + u_int64_t d_bcount; /* # disk blocks owned by the user */ + u_int64_t d_icount; /* # inodes owned by the user */ + int32_t d_itimer; /* zero if within inode limits */ + int32_t d_btimer; /* similar to above; for disk blocks */ + u_int16_t d_iwarns; /* # warnings issued wrt num inodes */ + u_int16_t d_bwarns; /* # warnings issued wrt disk blocks */ + int32_t d_padding2; /* padding2 - for future use */ + u_int64_t d_rtb_hardlimit; /* absolute limit on realtime blks */ + u_int64_t d_rtb_softlimit; /* preferred limit on RT disk blks */ + u_int64_t d_rtbcount; /* # realtime blocks owned */ + int32_t d_rtbtimer; /* similar to above; for RT disk blks */ + u_int16_t d_rtbwarns; /* # warnings issued wrt RT disk blks */ + int16_t d_padding3; /* padding3 - for future use */ + char d_padding4[8]; /* yet more padding */ +}; + +/* + * Following flags are used to specify which fields are valid + */ +#define IIF_BGRACE 1 +#define IIF_IGRACE 2 +#define IIF_FLAGS 4 + +static const struct xlat if_dqinfo_valid[] = { + {IIF_BGRACE, "IIF_BGRACE"}, + {IIF_IGRACE, "IIF_IGRACE"}, + {IIF_FLAGS, "IIF_FLAGS"}, + {0, NULL} +}; + +struct if_dqinfo +{ + u_int64_t dqi_bgrace; + u_int64_t dqi_igrace; + u_int32_t dqi_flags; + u_int32_t dqi_valid; +}; + +struct v2_dqinfo +{ + unsigned int dqi_bgrace; + unsigned int dqi_igrace; + unsigned int dqi_flags; + unsigned int dqi_blocks; + unsigned int dqi_free_blk; + unsigned int dqi_free_entry; +}; + +struct v1_dqstats +{ + u_int32_t lookups; + u_int32_t drops; + u_int32_t reads; + u_int32_t writes; + u_int32_t cache_hits; + u_int32_t allocated_dquots; + u_int32_t free_dquots; + u_int32_t syncs; +}; + +struct v2_dqstats +{ + u_int32_t lookups; + u_int32_t drops; + u_int32_t reads; + u_int32_t writes; + u_int32_t cache_hits; + u_int32_t allocated_dquots; + u_int32_t free_dquots; + u_int32_t syncs; + u_int32_t version; +}; + +typedef struct fs_qfilestat +{ + u_int64_t qfs_ino; /* inode number */ + u_int64_t qfs_nblks; /* number of BBs 512-byte-blks */ + u_int32_t qfs_nextents; /* number of extents */ +} fs_qfilestat_t; + +struct xfs_dqstats +{ + int8_t qs_version; /* version number for future changes */ + u_int16_t qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ + int8_t qs_pad; /* unused */ + fs_qfilestat_t qs_uquota; /* user quota storage information */ + fs_qfilestat_t qs_gquota; /* group quota storage information */ + u_int32_t qs_incoredqs; /* number of dquots incore */ + 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 */ + u_int16_t qs_bwarnlimit; /* limit for num warnings */ + u_int16_t qs_iwarnlimit; /* limit for num warnings */ +}; + +static void +decode_cmd_data(struct tcb *tcp, u_int32_t cmd, unsigned long data) +{ + switch (cmd) { + case Q_GETQUOTA: + case Q_SETQUOTA: + { + struct if_dqblk dq; + + if (cmd == Q_GETQUOTA && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{bhardlimit=%" PRIu64 ", ", dq.dqb_bhardlimit); + tprintf("bsoftlimit=%" PRIu64 ", ", dq.dqb_bsoftlimit); + tprintf("curspace=%" PRIu64 ", ", dq.dqb_curspace); + tprintf("ihardlimit=%" PRIu64 ", ", dq.dqb_ihardlimit); + tprintf("isoftlimit=%" PRIu64 ", ", dq.dqb_isoftlimit); + tprintf("curinodes=%" PRIu64 ", ", dq.dqb_curinodes); + if (!abbrev(tcp)) { + tprintf("btime=%" PRIu64 ", ", dq.dqb_btime); + tprintf("itime=%" PRIu64 ", ", dq.dqb_itime); + tprints("valid="); + printflags(if_dqblk_valid, + dq.dqb_valid, "QIF_???"); + tprints("}"); + } else + tprints("...}"); + break; + } + case Q_V1_GETQUOTA: + case Q_V1_SETQUOTA: + { + struct v1_dqblk dq; + + if (cmd == Q_V1_GETQUOTA && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{bhardlimit=%u, ", dq.dqb_bhardlimit); + tprintf("bsoftlimit=%u, ", dq.dqb_bsoftlimit); + tprintf("curblocks=%u, ", dq.dqb_curblocks); + tprintf("ihardlimit=%u, ", dq.dqb_ihardlimit); + tprintf("isoftlimit=%u, ", dq.dqb_isoftlimit); + tprintf("curinodes=%u, ", dq.dqb_curinodes); + tprintf("btime=%lu, ", (long) dq.dqb_btime); + tprintf("itime=%lu}", (long) dq.dqb_itime); + break; + } + case Q_V2_GETQUOTA: + case Q_V2_SETQUOTA: + { + struct v2_dqblk dq; + + if (cmd == Q_V2_GETQUOTA && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{ihardlimit=%u, ", dq.dqb_ihardlimit); + tprintf("isoftlimit=%u, ", dq.dqb_isoftlimit); + tprintf("curinodes=%u, ", dq.dqb_curinodes); + tprintf("bhardlimit=%u, ", dq.dqb_bhardlimit); + tprintf("bsoftlimit=%u, ", dq.dqb_bsoftlimit); + tprintf("curspace=%" PRIu64 ", ", dq.dqb_curspace); + tprintf("btime=%lu, ", (long) dq.dqb_btime); + tprintf("itime=%lu}", (long) dq.dqb_itime); + break; + } + case Q_XGETQUOTA: + case Q_XSETQLIM: + { + struct xfs_dqblk dq; + + if (cmd == Q_XGETQUOTA && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{version=%d, ", dq.d_version); + tprints("flags="); + printflags(xfs_dqblk_flags, + dq.d_flags, "XFS_???_QUOTA"); + tprintf(", fieldmask=%#x, ", dq.d_fieldmask); + tprintf("id=%u, ", dq.d_id); + tprintf("blk_hardlimit=%" PRIu64 ", ", dq.d_blk_hardlimit); + tprintf("blk_softlimit=%" PRIu64 ", ", dq.d_blk_softlimit); + tprintf("ino_hardlimit=%" PRIu64 ", ", dq.d_ino_hardlimit); + tprintf("ino_softlimit=%" PRIu64 ", ", dq.d_ino_softlimit); + tprintf("bcount=%" PRIu64 ", ", dq.d_bcount); + tprintf("icount=%" PRIu64 ", ", dq.d_icount); + if (!abbrev(tcp)) { + tprintf("itimer=%d, ", dq.d_itimer); + tprintf("btimer=%d, ", dq.d_btimer); + tprintf("iwarns=%u, ", dq.d_iwarns); + tprintf("bwarns=%u, ", dq.d_bwarns); + tprintf("rtbcount=%" PRIu64 ", ", dq.d_rtbcount); + tprintf("rtbtimer=%d, ", dq.d_rtbtimer); + tprintf("rtbwarns=%u}", dq.d_rtbwarns); + } else + tprints("...}"); + break; + } + case Q_GETFMT: + { + u_int32_t fmt; + + if (syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &fmt) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprints("{"); + printxval(quota_formats, fmt, "QFMT_VFS_???"); + tprints("}"); + break; + } + case Q_GETINFO: + case Q_SETINFO: + { + struct if_dqinfo dq; + + if (cmd == Q_GETINFO && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{bgrace=%" PRIu64 ", ", dq.dqi_bgrace); + tprintf("igrace=%" PRIu64 ", ", dq.dqi_igrace); + tprintf("flags=%#x, ", dq.dqi_flags); + tprints("valid="); + printflags(if_dqinfo_valid, dq.dqi_valid, "IIF_???"); + tprints("}"); + break; + } + case Q_V2_GETINFO: + case Q_V2_SETINFO: + { + struct v2_dqinfo dq; + + if (cmd == Q_V2_GETINFO && syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{bgrace=%u, ", dq.dqi_bgrace); + tprintf("igrace=%u, ", dq.dqi_igrace); + tprintf("flags=%#x, ", dq.dqi_flags); + tprintf("blocks=%u, ", dq.dqi_blocks); + tprintf("free_blk=%u, ", dq.dqi_free_blk); + tprintf("free_entry=%u}", dq.dqi_free_entry); + break; + } + case Q_V1_GETSTATS: + { + struct v1_dqstats dq; + + if (syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{lookups=%u, ", dq.lookups); + tprintf("drops=%u, ", dq.drops); + tprintf("reads=%u, ", dq.reads); + tprintf("writes=%u, ", dq.writes); + tprintf("cache_hits=%u, ", dq.cache_hits); + tprintf("allocated_dquots=%u, ", dq.allocated_dquots); + tprintf("free_dquots=%u, ", dq.free_dquots); + tprintf("syncs=%u}", dq.syncs); + break; + } + case Q_V2_GETSTATS: + { + struct v2_dqstats dq; + + if (syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{lookups=%u, ", dq.lookups); + tprintf("drops=%u, ", dq.drops); + tprintf("reads=%u, ", dq.reads); + tprintf("writes=%u, ", dq.writes); + tprintf("cache_hits=%u, ", dq.cache_hits); + tprintf("allocated_dquots=%u, ", dq.allocated_dquots); + tprintf("free_dquots=%u, ", dq.free_dquots); + tprintf("syncs=%u, ", dq.syncs); + tprintf("version=%u}", dq.version); + break; + } + case Q_XGETQSTAT: + { + struct xfs_dqstats dq; + + if (syserror(tcp)) { + tprintf("%#lx", data); + break; + } + if (umove(tcp, data, &dq) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprintf("{version=%d, ", dq.qs_version); + if (abbrev(tcp)) { + tprints("...}"); + break; + } + tprints("flags="); + printflags(xfs_quota_flags, + dq.qs_flags, "XFS_QUOTA_???"); + tprintf(", incoredqs=%u, ", dq.qs_incoredqs); + tprintf("u_ino=%" PRIu64 ", ", dq.qs_uquota.qfs_ino); + tprintf("u_nblks=%" PRIu64 ", ", dq.qs_uquota.qfs_nblks); + tprintf("u_nextents=%u, ", dq.qs_uquota.qfs_nextents); + tprintf("g_ino=%" PRIu64 ", ", dq.qs_gquota.qfs_ino); + tprintf("g_nblks=%" PRIu64 ", ", dq.qs_gquota.qfs_nblks); + tprintf("g_nextents=%u, ", dq.qs_gquota.qfs_nextents); + tprintf("btimelimit=%d, ", dq.qs_btimelimit); + tprintf("itimelimit=%d, ", dq.qs_itimelimit); + tprintf("rtbtimelimit=%d, ", dq.qs_rtbtimelimit); + tprintf("bwarnlimit=%u, ", dq.qs_bwarnlimit); + tprintf("iwarnlimit=%u}", dq.qs_iwarnlimit); + break; + } + case Q_XQUOTAON: + { + u_int32_t flag; + + if (umove(tcp, data, &flag) < 0) { + tprintf("{???} %#lx", data); + break; + } + tprints("{"); + printflags(xfs_quota_flags, flag, "XFS_QUOTA_???"); + tprints("}"); + break; + } + default: + tprintf("%#lx", data); + break; + } +} + +int +sys_quotactl(struct tcb *tcp) +{ + /* + * The Linux kernel only looks at the low 32 bits of command and id + * arguments, but on some 64-bit architectures (s390x) this word + * will have been sign-extended when we see it. The high 1 bits + * don't mean anything, so don't confuse the output with them. + */ + u_int32_t qcmd = tcp->u_arg[0]; + u_int32_t cmd = QCMD_CMD(qcmd); + u_int32_t type = QCMD_TYPE(qcmd); + u_int32_t id = tcp->u_arg[2]; + + if (!verbose(tcp)) + return printargs(tcp); + + if (entering(tcp)) { + printxval(quotacmds, cmd, "Q_???"); + tprints("|"); + printxval(quotatypes, type, "???QUOTA"); + tprints(", "); + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + switch (cmd) { + case Q_V1_QUOTAON: + case Q_QUOTAON: + printxval(quota_formats, id, "QFMT_VFS_???"); + break; + case Q_V1_GETQUOTA: + case Q_V2_GETQUOTA: + case Q_GETQUOTA: + case Q_V1_SETQUOTA: + case Q_V2_SETQUOTA: + case Q_V1_SETUSE: + case Q_V2_SETUSE: + case Q_SETQLIM: + case Q_SETQUOTA: + case Q_XGETQUOTA: + case Q_XSETQLIM: + tprintf("%u", id); + break; + default: + tprintf("%#lx", tcp->u_arg[2]); + break; + } + tprints(", "); + } else { + if (!tcp->u_arg[3]) + tprints("NULL"); + else + decode_cmd_data(tcp, cmd, tcp->u_arg[3]); + } + return 0; +} diff --git a/alice-strace/resource.c b/alice-strace/resource.c new file mode 100644 index 0000000..657e63d --- /dev/null +++ b/alice-strace/resource.c @@ -0,0 +1,438 @@ +/* + * 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 +#include +#include + +static const struct xlat resources[] = { +#ifdef RLIMIT_AS + { RLIMIT_AS, "RLIMIT_AS" }, +#endif +#ifdef RLIMIT_CORE + { RLIMIT_CORE, "RLIMIT_CORE" }, +#endif +#ifdef RLIMIT_CPU + { RLIMIT_CPU, "RLIMIT_CPU" }, +#endif +#ifdef RLIMIT_DATA + { RLIMIT_DATA, "RLIMIT_DATA" }, +#endif +#ifdef RLIMIT_FSIZE + { RLIMIT_FSIZE, "RLIMIT_FSIZE" }, +#endif +#ifdef RLIMIT_LOCKS + { RLIMIT_LOCKS, "RLIMIT_LOCKS" }, +#endif +#ifdef RLIMIT_MEMLOCK + { RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK" }, +#endif +#ifdef RLIMIT_MSGQUEUE + { RLIMIT_MSGQUEUE, "RLIMIT_MSGQUEUE" }, +#endif +#ifdef RLIMIT_NICE + { RLIMIT_NICE, "RLIMIT_NICE" }, +#endif +#ifdef RLIMIT_NOFILE + { RLIMIT_NOFILE, "RLIMIT_NOFILE" }, +#endif +#ifdef RLIMIT_NPROC + { RLIMIT_NPROC, "RLIMIT_NPROC" }, +#endif +#ifdef RLIMIT_RSS + { RLIMIT_RSS, "RLIMIT_RSS" }, +#endif +#ifdef RLIMIT_RTPRIO + { RLIMIT_RTPRIO, "RLIMIT_RTPRIO" }, +#endif +#ifdef RLIMIT_RTTIME + { RLIMIT_RTTIME, "RLIMIT_RTTIME" }, +#endif +#ifdef RLIMIT_SIGPENDING + { RLIMIT_SIGPENDING, "RLIMIT_SIGPENDING" }, +#endif +#ifdef RLIMIT_STACK + { RLIMIT_STACK, "RLIMIT_STACK" }, +#endif +#ifdef RLIMIT_VMEM + { RLIMIT_VMEM, "RLIMIT_VMEM" }, +#endif + { 0, NULL } +}; + +#if !(SIZEOF_RLIM_T == 4 || SIZEOF_RLIM_T == 8) +# error "Unsupported SIZEOF_RLIM_T value" +#endif + +static const char * +sprint_rlim64(uint64_t lim) +{ + static char buf[sizeof(uint64_t)*3 + sizeof("*1024")]; + + if (lim == UINT64_MAX) + return "RLIM64_INFINITY"; + + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf, "%" PRIu64 "*1024", lim / 1024); + else + sprintf(buf, "%" PRIu64, lim); + return buf; +} + +static void +print_rlimit64(struct tcb *tcp, unsigned long addr) +{ + struct rlimit_64 { + uint64_t rlim_cur; + uint64_t rlim_max; + } rlim; + + if (umove(tcp, addr, &rlim) < 0) + tprintf("%#lx", addr); + else { + tprintf("{rlim_cur=%s,", sprint_rlim64(rlim.rlim_cur)); + tprintf(" rlim_max=%s}", sprint_rlim64(rlim.rlim_max)); + } +} + +static void +decode_rlimit64(struct tcb *tcp, unsigned long addr) +{ + if (!addr) + tprints("NULL"); + else if (!verbose(tcp) || + (exiting(tcp) && syserror(tcp))) + tprintf("%#lx", addr); + else + print_rlimit64(tcp, addr); +} + +#if SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1 + +static const char * +sprint_rlim32(uint32_t lim) +{ + static char buf[sizeof(uint32_t)*3 + sizeof("*1024")]; + + if (lim == UINT32_MAX) + return "RLIM_INFINITY"; + + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf, "%" PRIu32 "*1024", lim / 1024); + else + sprintf(buf, "%" PRIu32, lim); + return buf; +} + +static void +print_rlimit32(struct tcb *tcp, unsigned long addr) +{ + struct rlimit_32 { + uint32_t rlim_cur; + uint32_t rlim_max; + } rlim; + + if (umove(tcp, addr, &rlim) < 0) + tprintf("%#lx", addr); + else { + tprintf("{rlim_cur=%s,", sprint_rlim32(rlim.rlim_cur)); + tprintf(" rlim_max=%s}", sprint_rlim32(rlim.rlim_max)); + } +} + +static void +decode_rlimit(struct tcb *tcp, unsigned long addr) +{ + if (!addr) + tprints("NULL"); + else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp))) + tprintf("%#lx", addr); + else { +# if SIZEOF_RLIM_T == 4 + print_rlimit32(tcp, addr); +# else + if (current_wordsize == 4) + print_rlimit32(tcp, addr); + else + print_rlimit64(tcp, addr); +# endif + } +} + +#else /* SIZEOF_RLIM_T == 8 && SUPPORTED_PERSONALITIES == 1 */ + +# define decode_rlimit decode_rlimit64 + +#endif /* SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1 */ + +int +sys_getrlimit(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(resources, tcp->u_arg[0], "RLIMIT_???"); + tprints(", "); + } + else { + decode_rlimit(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_setrlimit(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(resources, tcp->u_arg[0], "RLIMIT_???"); + tprints(", "); + decode_rlimit(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_prlimit64(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, ", tcp->u_arg[0]); + printxval(resources, tcp->u_arg[1], "RLIMIT_???"); + tprints(", "); + decode_rlimit64(tcp, tcp->u_arg[2]); + tprints(", "); + } else { + decode_rlimit64(tcp, tcp->u_arg[3]); + } + return 0; +} + +static const struct xlat usagewho[] = { + { RUSAGE_SELF, "RUSAGE_SELF" }, + { RUSAGE_CHILDREN, "RUSAGE_CHILDREN" }, +#ifdef RUSAGE_BOTH + { RUSAGE_BOTH, "RUSAGE_BOTH" }, +#endif + { 0, NULL }, +}; + +#ifdef ALPHA +void +printrusage32(struct tcb *tcp, long 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 */ + long ru_maxrss; /* maximum resident set size */ + long ru_ixrss; /* integral shared memory size */ + long ru_idrss; /* integral unshared data size */ + long ru_isrss; /* integral unshared stack size */ + long ru_minflt; /* page reclaims */ + long ru_majflt; /* page faults */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ + } ru; + + if (!addr) + tprints("NULL"); + else if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", addr); + else if (umove(tcp, addr, &ru) < 0) + tprints("{...}"); + else if (!abbrev(tcp)) { + 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); + tprintf("ru_maxrss=%lu, ru_ixrss=%lu, ", + ru.ru_maxrss, ru.ru_ixrss); + tprintf("ru_idrss=%lu, ru_isrss=%lu, ", + ru.ru_idrss, ru.ru_isrss); + tprintf("ru_minflt=%lu, ru_majflt=%lu, ru_nswap=%lu, ", + ru.ru_minflt, ru.ru_majflt, ru.ru_nswap); + tprintf("ru_inblock=%lu, ru_oublock=%lu, ", + ru.ru_inblock, ru.ru_oublock); + tprintf("ru_msgsnd=%lu, ru_msgrcv=%lu, ", + ru.ru_msgsnd, ru.ru_msgrcv); + tprintf("ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}", + ru.ru_nsignals, ru.ru_nvcsw, ru.ru_nivcsw); + } + else { + 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); + } +} +#endif + +void +printrusage(struct tcb *tcp, long addr) +{ + struct rusage ru; + + if (!addr) + tprints("NULL"); + else if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", addr); + else if (umove(tcp, addr, &ru) < 0) + tprints("{...}"); + else if (!abbrev(tcp)) { + 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); + tprintf("ru_maxrss=%lu, ru_ixrss=%lu, ", + ru.ru_maxrss, ru.ru_ixrss); + tprintf("ru_idrss=%lu, ru_isrss=%lu, ", + ru.ru_idrss, ru.ru_isrss); + tprintf("ru_minflt=%lu, ru_majflt=%lu, ru_nswap=%lu, ", + ru.ru_minflt, ru.ru_majflt, ru.ru_nswap); + tprintf("ru_inblock=%lu, ru_oublock=%lu, ", + ru.ru_inblock, ru.ru_oublock); + tprintf("ru_msgsnd=%lu, ru_msgrcv=%lu, ", + ru.ru_msgsnd, ru.ru_msgrcv); + tprintf("ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}", + ru.ru_nsignals, ru.ru_nvcsw, ru.ru_nivcsw); + } + else { + 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); + } +} + +int +sys_getrusage(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(usagewho, tcp->u_arg[0], "RUSAGE_???"); + tprints(", "); + } + else + printrusage(tcp, tcp->u_arg[1]); + return 0; +} + +#ifdef ALPHA +int +sys_osf_getrusage(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(usagewho, tcp->u_arg[0], "RUSAGE_???"); + tprints(", "); + } + else + printrusage32(tcp, tcp->u_arg[1]); + return 0; +} +#endif /* ALPHA */ + +int +sys_sysinfo(struct tcb *tcp) +{ + struct sysinfo si; + + if (exiting(tcp)) { + if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else if (umove(tcp, tcp->u_arg[0], &si) < 0) + tprints("{...}"); + else { + tprintf("{uptime=%lu, loads=[%lu, %lu, %lu] ", + (long) si.uptime, (long) si.loads[0], + (long) si.loads[1], (long) si.loads[2]); + tprintf("totalram=%lu, freeram=%lu, ", + (long) si.totalram, (long) si.freeram); + tprintf("sharedram=%lu, bufferram=%lu} ", + (long) si.sharedram, (long) si.bufferram); + tprintf("totalswap=%lu, freeswap=%lu, procs=%u}", + (long) si.totalswap, (long) si.freeswap, + (unsigned)si.procs); + } + } + return 0; +} + +static const struct xlat priorities[] = { + { PRIO_PROCESS, "PRIO_PROCESS" }, + { PRIO_PGRP, "PRIO_PGRP" }, + { PRIO_USER, "PRIO_USER" }, + { 0, NULL }, +}; + +int +sys_getpriority(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(priorities, tcp->u_arg[0], "PRIO_???"); + tprintf(", %lu", tcp->u_arg[1]); + } + return 0; +} + +int +sys_setpriority(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(priorities, tcp->u_arg[0], "PRIO_???"); + tprintf(", %lu, %ld", tcp->u_arg[1], tcp->u_arg[2]); + } + return 0; +} + +int +sys_times(struct tcb *tcp) +{ + struct tms tbuf; + + if (exiting(tcp)) { + if (tcp->u_arg[0] == 0) + tprints("NULL"); + else if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0) + tprints("{...}"); + else { + tprintf("{tms_utime=%llu, tms_stime=%llu, ", + (unsigned long long) tbuf.tms_utime, + (unsigned long long) tbuf.tms_stime); + tprintf("tms_cutime=%llu, tms_cstime=%llu}", + (unsigned long long) tbuf.tms_cutime, + (unsigned long long) tbuf.tms_cstime); + } + } + return 0; +} diff --git a/alice-strace/scsi.c b/alice-strace/scsi.c new file mode 100644 index 0000000..682016e --- /dev/null +++ b/alice-strace/scsi.c @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2007 Vladimir Nadvornik + * Copyright (c) 2007 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 + +static const struct xlat sg_io_dxfer_direction[] = { + {SG_DXFER_NONE, "SG_DXFER_NONE"}, + {SG_DXFER_TO_DEV, "SG_DXFER_TO_DEV"}, + {SG_DXFER_FROM_DEV, "SG_DXFER_FROM_DEV"}, + {SG_DXFER_TO_FROM_DEV, "SG_DXFER_TO_FROM_DEV"}, + {0, NULL} +}; + +static void +print_sg_io_buffer(struct tcb *tcp, unsigned char *addr, int len) +{ + unsigned char *buf = NULL; + int allocated, i; + + if (len == 0) + return; + allocated = (len > max_strlen) ? max_strlen : len; + if (len < 0 || + (buf = malloc(allocated)) == NULL || + umoven(tcp, (unsigned long) addr, allocated, (char *) buf) < 0) { + tprintf("%p", addr); + free(buf); + return; + } + tprintf("%02x", buf[0]); + for (i = 1; i < allocated; ++i) + tprintf(", %02x", buf[i]); + free(buf); + if (allocated != len) + tprints(", ..."); +} + +static void +print_sg_io_req(struct tcb *tcp, struct sg_io_hdr *sg_io) +{ + tprintf("{'%c', ", sg_io->interface_id); + printxval(sg_io_dxfer_direction, sg_io->dxfer_direction, + "SG_DXFER_???"); + tprintf(", cmd[%u]=[", sg_io->cmd_len); + print_sg_io_buffer(tcp, 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); + printstr(tcp, (unsigned long) sg_io->dxferp, + sg_io->dxfer_len); + tprints("]"); + } +} + +static void +print_sg_io_res(struct tcb *tcp, struct sg_io_hdr *sg_io) +{ + if (sg_io->dxfer_direction == SG_DXFER_FROM_DEV || + sg_io->dxfer_direction == SG_DXFER_TO_FROM_DEV) { + tprintf(", data[%u]=[", sg_io->dxfer_len); + printstr(tcp, (unsigned long) sg_io->dxferp, + sg_io->dxfer_len); + tprints("]"); + } + 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, 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); +} + +int +scsi_ioctl(struct tcb *tcp, long code, long arg) +{ + switch (code) { + case SG_IO: + if (entering(tcp)) { + struct sg_io_hdr sg_io; + + if (umove(tcp, arg, &sg_io) < 0) + tprintf(", %#lx", arg); + else { + tprints(", "); + print_sg_io_req(tcp, &sg_io); + } + } + if (exiting(tcp)) { + struct sg_io_hdr sg_io; + + if (!syserror(tcp) && umove(tcp, arg, &sg_io) >= 0) + print_sg_io_res(tcp, &sg_io); + else + tprints("}"); + } + break; + default: + if (entering(tcp)) + tprintf(", %#lx", arg); + break; + } + return 1; +} diff --git a/alice-strace/signal.c b/alice-strace/signal.c new file mode 100644 index 0000000..55815aa --- /dev/null +++ b/alice-strace/signal.c @@ -0,0 +1,1438 @@ +/* + * 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) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 + +#ifdef HAVE_SYS_REG_H +# include +# ifndef PTRACE_PEEKUSR +# define PTRACE_PEEKUSR PTRACE_PEEKUSER +# endif +# ifndef PTRACE_POKEUSR +# define PTRACE_POKEUSR PTRACE_POKEUSER +# endif +#elif defined(HAVE_LINUX_PTRACE_H) +# undef PTRACE_SYSCALL +# ifdef HAVE_STRUCT_IA64_FPREG +# define ia64_fpreg XXX_ia64_fpreg +# endif +# ifdef HAVE_STRUCT_PT_ALL_USER_REGS +# define pt_all_user_regs XXX_pt_all_user_regs +# endif +# include +# undef ia64_fpreg +# undef pt_all_user_regs +#endif + +#ifdef IA64 +# include +#endif + +#if defined(SPARC) || defined(SPARC64) || defined(MIPS) +typedef struct { + struct pt_regs si_regs; + int si_mask; +} m_siginfo_t; +#elif defined HAVE_ASM_SIGCONTEXT_H +# if !defined(IA64) && !defined(X86_64) && !defined(X32) +# include +# endif +#else /* !HAVE_ASM_SIGCONTEXT_H */ +# if defined I386 && !defined HAVE_STRUCT_SIGCONTEXT_STRUCT +struct sigcontext_struct { + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long esp; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned short cs, __csh; + unsigned long eflags; + unsigned long esp_at_signal; + unsigned short ss, __ssh; + unsigned long i387; + unsigned long oldmask; + unsigned long cr2; +}; +# else /* !I386 */ +# if defined M68K && !defined HAVE_STRUCT_SIGCONTEXT +struct sigcontext +{ + unsigned long sc_mask; + unsigned long sc_usp; + unsigned long sc_d0; + unsigned long sc_d1; + unsigned long sc_a0; + unsigned long sc_a1; + unsigned short sc_sr; + unsigned long sc_pc; + unsigned short sc_formatvec; +}; +# endif /* M68K */ +# endif /* !I386 */ +#endif /* !HAVE_ASM_SIGCONTEXT_H */ + +#ifndef NSIG +# warning: NSIG is not defined, using 32 +# define NSIG 32 +#endif +#ifdef ARM +/* Ugh. Is this really correct? ARM has no RT signals?! */ +# undef NSIG +# define NSIG 32 +#endif + +#ifdef HAVE_SIGACTION + +#if defined I386 || defined X86_64 || defined X32 +/* The libc headers do not define this constant since it should only be + used by the implementation. So we define it here. */ +# ifndef SA_RESTORER +# define SA_RESTORER 0x04000000 +# endif +#endif + +static const struct xlat sigact_flags[] = { +#ifdef SA_RESTORER + { SA_RESTORER, "SA_RESTORER" }, +#endif +#ifdef SA_STACK + { SA_STACK, "SA_STACK" }, +#endif +#ifdef SA_RESTART + { SA_RESTART, "SA_RESTART" }, +#endif +#ifdef SA_INTERRUPT + { SA_INTERRUPT, "SA_INTERRUPT" }, +#endif +#ifdef SA_NODEFER + { SA_NODEFER, "SA_NODEFER" }, +#endif +#if defined SA_NOMASK && SA_NODEFER != SA_NOMASK + { SA_NOMASK, "SA_NOMASK" }, +#endif +#ifdef SA_RESETHAND + { SA_RESETHAND, "SA_RESETHAND" }, +#endif +#if defined SA_ONESHOT && SA_ONESHOT != SA_RESETHAND + { SA_ONESHOT, "SA_ONESHOT" }, +#endif +#ifdef SA_SIGINFO + { SA_SIGINFO, "SA_SIGINFO" }, +#endif +#ifdef SA_RESETHAND + { SA_RESETHAND, "SA_RESETHAND" }, +#endif +#ifdef SA_ONSTACK + { SA_ONSTACK, "SA_ONSTACK" }, +#endif +#ifdef SA_NODEFER + { SA_NODEFER, "SA_NODEFER" }, +#endif +#ifdef SA_NOCLDSTOP + { SA_NOCLDSTOP, "SA_NOCLDSTOP" }, +#endif +#ifdef SA_NOCLDWAIT + { SA_NOCLDWAIT, "SA_NOCLDWAIT" }, +#endif +#ifdef _SA_BSDCALL + { _SA_BSDCALL, "_SA_BSDCALL" }, +#endif +#ifdef SA_NOPTRACE + { SA_NOPTRACE, "SA_NOPTRACE" }, +#endif + { 0, NULL }, +}; + +static const struct xlat sigprocmaskcmds[] = { + { SIG_BLOCK, "SIG_BLOCK" }, + { SIG_UNBLOCK, "SIG_UNBLOCK" }, + { SIG_SETMASK, "SIG_SETMASK" }, +#ifdef SIG_SETMASK32 + { SIG_SETMASK32,"SIG_SETMASK32" }, +#endif + { 0, NULL }, +}; + +#endif /* HAVE_SIGACTION */ + +/* Anonymous realtime signals. */ +/* Under glibc 2.1, SIGRTMIN et al are functions, but __SIGRTMIN is a + constant. This is what we want. Otherwise, just use SIGRTMIN. */ +#ifdef SIGRTMIN +#ifndef __SIGRTMIN +#define __SIGRTMIN SIGRTMIN +#define __SIGRTMAX SIGRTMAX /* likewise */ +#endif +#endif + +/* Note on the size of sigset_t: + * + * In glibc, sigset_t is an array with space for 1024 bits (!), + * even though all arches supported by Linux have only 64 signals + * except MIPS, which has 128. IOW, it is 128 bytes long. + * + * In-kernel sigset_t is sized correctly (it is either 64 or 128 bit long). + * However, some old syscall return only 32 lower bits (one word). + * Example: sys_sigpending vs sys_rt_sigpending. + * + * Be aware of this fact when you try to + * memcpy(&tcp->u_arg[1], &something, sizeof(sigset_t)) + * - sizeof(sigset_t) is much bigger than you think, + * it may overflow tcp->u_arg[] array, and it may try to copy more data + * than is really available in . + * Similarly, + * 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. + */ + +const char * +signame(int sig) +{ + static char buf[sizeof("SIGRT_%d") + sizeof(int)*3]; + + if (sig >= 0 && sig < nsignals) + return signalent[sig]; +#ifdef SIGRTMIN + if (sig >= __SIGRTMIN && sig <= __SIGRTMAX) { + sprintf(buf, "SIGRT_%d", (int)(sig - __SIGRTMIN)); + return buf; + } +#endif + sprintf(buf, "%d", sig); + return buf; +} + +static void +long_to_sigset(long l, sigset_t *s) +{ + sigemptyset(s); + *(long *)s = l; +} + +static int +copy_sigset_len(struct tcb *tcp, long addr, sigset_t *s, int len) +{ + if (len > sizeof(*s)) + len = sizeof(*s); + sigemptyset(s); + if (umoven(tcp, addr, len, (char *)s) < 0) + return -1; + return 0; +} + +/* Original sigset is unsigned long */ +#define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(long)) + +static const char * +sprintsigmask(const char *str, sigset_t *mask, int rt) +/* set might include realtime sigs */ +{ + /* Was [8 * sizeof(sigset_t) * 8], but + * glibc sigset_t is huge (1024 bits = 128 *bytes*), + * and we were ending up with 8k (!) buffer here. + * + * No Unix system can have sig > 255 + * (waitpid API won't be able to indicate death from one) + * and sig 0 doesn't exist either. + * Therefore max possible no of sigs is 255: 1..255 + */ + static char outstr[8 * (255 * 2 / 3)]; + + int i, nsigs; + int maxsigs; + int show_members; + char sep; + char *s; + + maxsigs = nsignals; +#ifdef __SIGRTMAX + if (rt) + maxsigs = __SIGRTMAX; /* instead */ +#endif + s = stpcpy(outstr, str); + nsigs = 0; + for (i = 1; i < maxsigs; i++) { + if (sigismember(mask, i) == 1) + nsigs++; + } + + /* 1: show mask members, 0: show those which are NOT in mask */ + show_members = (nsigs < nsignals * 2 / 3); + if (!show_members) + *s++ = '~'; + + sep = '['; + for (i = 1; i < maxsigs; i++) { + if (sigismember(mask, i) == show_members) { + /* real-time signals on solaris don't have + * signalent entries + */ + char tsig[40]; + *s++ = sep; + if (i < nsignals) { + s = stpcpy(s, signalent[i] + 3); + } +#ifdef SIGRTMIN + else if (i >= __SIGRTMIN && i <= __SIGRTMAX) { + sprintf(tsig, "RT_%u", i - __SIGRTMIN); + s = stpcpy(s, tsig); + } +#endif /* SIGRTMIN */ + else { + sprintf(tsig, "%u", i); + s = stpcpy(s, tsig); + } + sep = ' '; + } + } + if (sep == '[') + *s++ = sep; + *s++ = ']'; + *s = '\0'; + return outstr; +} + +static void +printsigmask(sigset_t *mask, int rt) +{ + tprints(sprintsigmask("", mask, rt)); +} + +void +printsignal(int nr) +{ + tprints(signame(nr)); +} + +void +print_sigset(struct tcb *tcp, long addr, int rt) +{ + sigset_t ss; + + if (!addr) + tprints("NULL"); + else if (copy_sigset(tcp, addr, &ss) < 0) + tprintf("%#lx", addr); + else + printsigmask(&ss, rt); +} + +#ifndef ILL_ILLOPC +#define ILL_ILLOPC 1 /* illegal opcode */ +#define ILL_ILLOPN 2 /* illegal operand */ +#define ILL_ILLADR 3 /* illegal addressing mode */ +#define ILL_ILLTRP 4 /* illegal trap */ +#define ILL_PRVOPC 5 /* privileged opcode */ +#define ILL_PRVREG 6 /* privileged register */ +#define ILL_COPROC 7 /* coprocessor error */ +#define ILL_BADSTK 8 /* internal stack error */ +#define FPE_INTDIV 1 /* integer divide by zero */ +#define FPE_INTOVF 2 /* integer overflow */ +#define FPE_FLTDIV 3 /* floating point divide by zero */ +#define FPE_FLTOVF 4 /* floating point overflow */ +#define FPE_FLTUND 5 /* floating point underflow */ +#define FPE_FLTRES 6 /* floating point inexact result */ +#define FPE_FLTINV 7 /* floating point invalid operation */ +#define FPE_FLTSUB 8 /* subscript out of range */ +#define SEGV_MAPERR 1 /* address not mapped to object */ +#define SEGV_ACCERR 2 /* invalid permissions for mapped object */ +#define BUS_ADRALN 1 /* invalid address alignment */ +#define BUS_ADRERR 2 /* non-existant physical address */ +#define BUS_OBJERR 3 /* object specific hardware error */ +#define TRAP_BRKPT 1 /* process breakpoint */ +#define TRAP_TRACE 2 /* process trace trap */ +#define CLD_EXITED 1 /* child has exited */ +#define CLD_KILLED 2 /* child was killed */ +#define CLD_DUMPED 3 /* child terminated abnormally */ +#define CLD_TRAPPED 4 /* traced child has trapped */ +#define CLD_STOPPED 5 /* child has stopped */ +#define CLD_CONTINUED 6 /* stopped child has continued */ +#define POLL_IN 1 /* data input available */ +#define POLL_OUT 2 /* output buffers available */ +#define POLL_MSG 3 /* input message available */ +#define POLL_ERR 4 /* i/o error */ +#define POLL_PRI 5 /* high priority input available */ +#define POLL_HUP 6 /* device disconnected */ +#define SI_KERNEL 0x80 /* sent by kernel */ +#define SI_USER 0 /* sent by kill, sigsend, raise */ +#define SI_QUEUE -1 /* sent by sigqueue */ +#define SI_TIMER -2 /* sent by timer expiration */ +#define SI_MESGQ -3 /* sent by real time mesq state change */ +#define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by SIGIO */ +#define SI_TKILL -6 /* sent by tkill */ +#define SI_ASYNCNL -60 /* sent by asynch name lookup completion */ +#endif + +#ifndef SI_FROMUSER +# define SI_FROMUSER(sip) ((sip)->si_code <= 0) +#endif + +static const struct xlat siginfo_codes[] = { +#ifdef SI_KERNEL + { SI_KERNEL, "SI_KERNEL" }, +#endif +#ifdef SI_USER + { SI_USER, "SI_USER" }, +#endif +#ifdef SI_QUEUE + { SI_QUEUE, "SI_QUEUE" }, +#endif +#ifdef SI_TIMER + { SI_TIMER, "SI_TIMER" }, +#endif +#ifdef SI_MESGQ + { SI_MESGQ, "SI_MESGQ" }, +#endif +#ifdef SI_ASYNCIO + { SI_ASYNCIO, "SI_ASYNCIO" }, +#endif +#ifdef SI_SIGIO + { SI_SIGIO, "SI_SIGIO" }, +#endif +#ifdef SI_TKILL + { SI_TKILL, "SI_TKILL" }, +#endif +#ifdef SI_ASYNCNL + { SI_ASYNCNL, "SI_ASYNCNL" }, +#endif +#ifdef SI_NOINFO + { SI_NOINFO, "SI_NOINFO" }, +#endif +#ifdef SI_LWP + { SI_LWP, "SI_LWP" }, +#endif + { 0, NULL }, +}; + +static const struct xlat sigill_codes[] = { + { ILL_ILLOPC, "ILL_ILLOPC" }, + { ILL_ILLOPN, "ILL_ILLOPN" }, + { ILL_ILLADR, "ILL_ILLADR" }, + { ILL_ILLTRP, "ILL_ILLTRP" }, + { ILL_PRVOPC, "ILL_PRVOPC" }, + { ILL_PRVREG, "ILL_PRVREG" }, + { ILL_COPROC, "ILL_COPROC" }, + { ILL_BADSTK, "ILL_BADSTK" }, + { 0, NULL }, +}; + +static const struct xlat sigfpe_codes[] = { + { FPE_INTDIV, "FPE_INTDIV" }, + { FPE_INTOVF, "FPE_INTOVF" }, + { FPE_FLTDIV, "FPE_FLTDIV" }, + { FPE_FLTOVF, "FPE_FLTOVF" }, + { FPE_FLTUND, "FPE_FLTUND" }, + { FPE_FLTRES, "FPE_FLTRES" }, + { FPE_FLTINV, "FPE_FLTINV" }, + { FPE_FLTSUB, "FPE_FLTSUB" }, + { 0, NULL }, +}; + +static const struct xlat sigtrap_codes[] = { + { TRAP_BRKPT, "TRAP_BRKPT" }, + { TRAP_TRACE, "TRAP_TRACE" }, + { 0, NULL }, +}; + +static const struct xlat sigchld_codes[] = { + { CLD_EXITED, "CLD_EXITED" }, + { CLD_KILLED, "CLD_KILLED" }, + { CLD_DUMPED, "CLD_DUMPED" }, + { CLD_TRAPPED, "CLD_TRAPPED" }, + { CLD_STOPPED, "CLD_STOPPED" }, + { CLD_CONTINUED,"CLD_CONTINUED" }, + { 0, NULL }, +}; + +static const struct xlat sigpoll_codes[] = { + { POLL_IN, "POLL_IN" }, + { POLL_OUT, "POLL_OUT" }, + { POLL_MSG, "POLL_MSG" }, + { POLL_ERR, "POLL_ERR" }, + { POLL_PRI, "POLL_PRI" }, + { POLL_HUP, "POLL_HUP" }, + { 0, NULL }, +}; + +static const struct xlat sigprof_codes[] = { +#ifdef PROF_SIG + { PROF_SIG, "PROF_SIG" }, +#endif + { 0, NULL }, +}; + +#ifdef SIGEMT +static const struct xlat sigemt_codes[] = { +#ifdef EMT_TAGOVF + { EMT_TAGOVF, "EMT_TAGOVF" }, +#endif + { 0, NULL }, +}; +#endif + +static const struct xlat sigsegv_codes[] = { + { SEGV_MAPERR, "SEGV_MAPERR" }, + { SEGV_ACCERR, "SEGV_ACCERR" }, + { 0, NULL }, +}; + +static const struct xlat sigbus_codes[] = { + { BUS_ADRALN, "BUS_ADRALN" }, + { BUS_ADRERR, "BUS_ADRERR" }, + { BUS_OBJERR, "BUS_OBJERR" }, + { 0, NULL }, +}; + +void +printsiginfo(siginfo_t *sip, int verbose) +{ + const char *code; + + if (sip->si_signo == 0) { + tprints("{}"); + return; + } + tprints("{si_signo="); + printsignal(sip->si_signo); + code = xlookup(siginfo_codes, sip->si_code); + if (!code) { + switch (sip->si_signo) { + case SIGTRAP: + code = xlookup(sigtrap_codes, sip->si_code); + break; + case SIGCHLD: + code = xlookup(sigchld_codes, sip->si_code); + break; + case SIGPOLL: + code = xlookup(sigpoll_codes, sip->si_code); + break; + case SIGPROF: + code = xlookup(sigprof_codes, sip->si_code); + break; + case SIGILL: + code = xlookup(sigill_codes, sip->si_code); + break; +#ifdef SIGEMT + case SIGEMT: + code = xlookup(sigemt_codes, sip->si_code); + break; +#endif + case SIGFPE: + code = xlookup(sigfpe_codes, sip->si_code); + break; + case SIGSEGV: + code = xlookup(sigsegv_codes, sip->si_code); + break; + case SIGBUS: + code = xlookup(sigbus_codes, sip->si_code); + break; + } + } + if (code) + tprintf(", si_code=%s", code); + else + tprintf(", si_code=%#x", sip->si_code); +#ifdef SI_NOINFO + if (sip->si_code != SI_NOINFO) +#endif + { + if (sip->si_errno) { + if (sip->si_errno < 0 || sip->si_errno >= nerrnos) + tprintf(", si_errno=%d", sip->si_errno); + else + tprintf(", si_errno=%s", + errnoent[sip->si_errno]); + } +#ifdef SI_FROMUSER + if (SI_FROMUSER(sip)) { + tprintf(", si_pid=%lu, si_uid=%lu", + (unsigned long) sip->si_pid, + (unsigned long) sip->si_uid); + switch (sip->si_code) { +#ifdef SI_USER + case SI_USER: + break; +#endif +#ifdef SI_TKILL + case SI_TKILL: + break; +#endif +#ifdef SI_TIMER + case SI_TIMER: + tprintf(", si_value=%d", sip->si_int); + break; +#endif + default: + if (!sip->si_ptr) + break; + if (!verbose) + tprints(", ..."); + else + tprintf(", si_value={int=%u, ptr=%#lx}", + sip->si_int, + (unsigned long) sip->si_ptr); + break; + } + } + else +#endif /* SI_FROMUSER */ + { + switch (sip->si_signo) { + case SIGCHLD: + tprintf(", si_pid=%ld, si_status=", + (long) sip->si_pid); + if (sip->si_code == CLD_EXITED) + tprintf("%d", sip->si_status); + else + printsignal(sip->si_status); + if (!verbose) + tprints(", ..."); + else + tprintf(", si_utime=%llu, si_stime=%llu", + (unsigned long long) sip->si_utime, + (unsigned long long) sip->si_stime); + break; + case SIGILL: case SIGFPE: + case SIGSEGV: case SIGBUS: + tprintf(", si_addr=%#lx", + (unsigned long) sip->si_addr); + break; + case SIGPOLL: + switch (sip->si_code) { + case POLL_IN: case POLL_OUT: case POLL_MSG: + tprintf(", si_band=%ld", + (long) sip->si_band); + break; + } + break; + default: + if (sip->si_pid || sip->si_uid) + tprintf(", si_pid=%lu, si_uid=%lu", + (unsigned long) sip->si_pid, + (unsigned long) sip->si_uid); + if (!sip->si_ptr) + break; + if (!verbose) + tprints(", ..."); + else { + tprintf(", si_value={int=%u, ptr=%#lx}", + sip->si_int, + (unsigned long) sip->si_ptr); + } + + } + } + } + tprints("}"); +} + +void +printsiginfo_at(struct tcb *tcp, long addr) +{ + siginfo_t si; + if (!addr) { + tprints("NULL"); + return; + } + if (syserror(tcp)) { + tprintf("%#lx", addr); + return; + } + if (umove(tcp, addr, &si) < 0) { + tprints("{???}"); + return; + } + printsiginfo(&si, verbose(tcp)); +} + +int +sys_sigsetmask(struct tcb *tcp) +{ + if (entering(tcp)) { + sigset_t sigm; + long_to_sigset(tcp->u_arg[0], &sigm); + printsigmask(&sigm, 0); + } + else if (!syserror(tcp)) { + sigset_t sigm; + long_to_sigset(tcp->u_rval, &sigm); + tcp->auxstr = sprintsigmask("old mask ", &sigm, 0); + + return RVAL_HEX | RVAL_STR; + } + return 0; +} + +#ifdef HAVE_SIGACTION + +struct old_sigaction { + /* sa_handler may be a libc #define, need to use other name: */ + void (*__sa_handler)(int); + unsigned long sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +int +sys_sigaction(struct tcb *tcp) +{ + long addr; + sigset_t sigset; + struct old_sigaction sa; + + if (entering(tcp)) { + printsignal(tcp->u_arg[0]); + tprints(", "); + addr = tcp->u_arg[1]; + } else + addr = tcp->u_arg[2]; + if (addr == 0) + tprints("NULL"); + else if (!verbose(tcp)) + tprintf("%#lx", addr); + else if (umove(tcp, addr, &sa) < 0) + tprints("{...}"); + else { + /* 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. */ + if ((long)sa.__sa_handler == (long)SIG_ERR) + tprints("{SIG_ERR, "); + else if ((long)sa.__sa_handler == (long)SIG_DFL) + tprints("{SIG_DFL, "); + else if ((long)sa.__sa_handler == (long)SIG_IGN) + tprints("{SIG_IGN, "); + else + tprintf("{%#lx, ", (long) sa.__sa_handler); + long_to_sigset(sa.sa_mask, &sigset); + printsigmask(&sigset, 0); + tprints(", "); + printflags(sigact_flags, sa.sa_flags, "SA_???"); +#ifdef SA_RESTORER + if (sa.sa_flags & SA_RESTORER) + tprintf(", %p", sa.sa_restorer); +#endif + tprints("}"); + } + if (entering(tcp)) + tprints(", "); + else + tprintf(", %#lx", (unsigned long) sa.sa_restorer); + return 0; +} + +int +sys_signal(struct tcb *tcp) +{ + if (entering(tcp)) { + printsignal(tcp->u_arg[0]); + tprints(", "); + switch (tcp->u_arg[1]) { + case (long) SIG_ERR: + tprints("SIG_ERR"); + break; + case (long) SIG_DFL: + tprints("SIG_DFL"); + break; + case (long) SIG_IGN: + tprints("SIG_IGN"); + break; + default: + tprintf("%#lx", tcp->u_arg[1]); + } + return 0; + } + else if (!syserror(tcp)) { + switch (tcp->u_rval) { + case (long) SIG_ERR: + tcp->auxstr = "SIG_ERR"; break; + case (long) SIG_DFL: + tcp->auxstr = "SIG_DFL"; break; + case (long) SIG_IGN: + tcp->auxstr = "SIG_IGN"; break; + default: + tcp->auxstr = NULL; + } + return RVAL_HEX | RVAL_STR; + } + return 0; +} + +#endif /* HAVE_SIGACTION */ + +int +sys_sigreturn(struct tcb *tcp) +{ +#if defined(ARM) + if (entering(tcp)) { + struct sigcontext_struct sc; + sigset_t sigm; + if (umove(tcp, arm_regs.ARM_sp, &sc) < 0) + return 0; + long_to_sigset(sc.oldmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(S390) || defined(S390X) + if (entering(tcp)) { + long usp; + struct sigcontext_struct sc; + if (upeek(tcp, PT_GPR15, &usp) < 0) + return 0; + if (umove(tcp, usp + __SIGNAL_FRAMESIZE, &sc) < 0) + return 0; + tprints(sprintsigmask(") (mask ", (sigset_t *)&sc.oldmask[0], 0)); + } +#elif defined(I386) + if (entering(tcp)) { + struct sigcontext_struct sc; + /* Note: on i386, sc is followed on stack by struct fpstate + * and after it an additional u32 extramask[1] which holds + * upper half of the mask. We can fetch it there + * if/when we'd want to display the full mask... + */ + sigset_t sigm; + if (umove(tcp, i386_regs.esp, &sc) < 0) + return 0; + long_to_sigset(sc.oldmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(IA64) + if (entering(tcp)) { + struct sigcontext sc; + long sp; + sigset_t sigm; + /* offset of sigcontext in the kernel's sigframe structure: */ +# define SIGFRAME_SC_OFFSET 0x90 + if (upeek(tcp, PT_R12, &sp) < 0) + return 0; + if (umove(tcp, sp + 16 + SIGFRAME_SC_OFFSET, &sc) < 0) + return 0; + sigemptyset(&sigm); + memcpy(&sigm, &sc.sc_mask, NSIG / 8); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(POWERPC) + if (entering(tcp)) { + long esp; + struct sigcontext_struct sc; + sigset_t sigm; + if (upeek(tcp, sizeof(unsigned long) * PT_R1, &esp) < 0) + return 0; + /* Skip dummy stack frame. */ +#ifdef POWERPC64 + if (current_personality == 0) + esp += 128; + else + esp += 64; +#else + esp += 64; +#endif + if (umove(tcp, esp, &sc) < 0) + return 0; + long_to_sigset(sc.oldmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(M68K) + if (entering(tcp)) { + long usp; + struct sigcontext sc; + sigset_t sigm; + if (upeek(tcp, 4*PT_USP, &usp) < 0) + return 0; + if (umove(tcp, usp, &sc) < 0) + return 0; + long_to_sigset(sc.sc_mask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(ALPHA) + if (entering(tcp)) { + long fp; + struct sigcontext_struct sc; + sigset_t sigm; + if (upeek(tcp, REG_FP, &fp) < 0) + return 0; + if (umove(tcp, fp, &sc) < 0) + return 0; + long_to_sigset(sc.sc_mask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(SPARC) || defined(SPARC64) + if (entering(tcp)) { + long i1; + m_siginfo_t si; + sigset_t sigm; + i1 = sparc_regs.u_regs[U_REG_O1]; + if (umove(tcp, i1, &si) < 0) { + perror_msg("sigreturn: umove"); + return 0; + } + long_to_sigset(si.si_mask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64) + /* This decodes rt_sigreturn. The 64-bit ABIs do not have + sigreturn. */ + if (entering(tcp)) { + long sp; + struct ucontext uc; + sigset_t sigm; + if (upeek(tcp, REG_SP, &sp) < 0) + return 0; + /* There are six words followed by a 128-byte siginfo. */ + sp = sp + 6 * 4 + 128; + if (umove(tcp, sp, &uc) < 0) + return 0; + long_to_sigset(*(long *) &uc.uc_sigmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(MIPS) + if (entering(tcp)) { + long sp; + struct pt_regs regs; + m_siginfo_t si; + sigset_t sigm; + if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)®s, 0) < 0) { + perror_msg("sigreturn: PTRACE_GETREGS"); + return 0; + } + sp = regs.regs[29]; + if (umove(tcp, sp, &si) < 0) + return 0; + long_to_sigset(si.si_mask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(CRISV10) || defined(CRISV32) + if (entering(tcp)) { + struct sigcontext sc; + long regs[PT_MAX+1]; + sigset_t sigm; + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) { + perror_msg("sigreturn: PTRACE_GETREGS"); + return 0; + } + if (umove(tcp, regs[PT_USP], &sc) < 0) + return 0; + long_to_sigset(sc.oldmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(TILE) + if (entering(tcp)) { + struct ucontext uc; + sigset_t sigm; + + /* offset of ucontext in the kernel's sigframe structure */ +# define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(siginfo_t) + if (umove(tcp, tile_regs.sp + SIGFRAME_UC_OFFSET, &uc) < 0) + return 0; + sigemptyset(&sigm); + memcpy(&sigm, &uc.uc_sigmask, NSIG / 8); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(MICROBLAZE) + /* TODO: Verify that this is correct... */ + if (entering(tcp)) { + struct sigcontext sc; + long sp; + sigset_t sigm; + /* Read r1, the stack pointer. */ + if (upeek(tcp, 1 * 4, &sp) < 0) + return 0; + if (umove(tcp, sp, &sc) < 0) + return 0; + long_to_sigset(sc.oldmask, &sigm); + tprints(sprintsigmask(") (mask ", &sigm, 0)); + } +#elif defined(X86_64) + /* no need to remind */ +#elif defined(XTENSA) + /* Xtensa only has rt_sys_sigreturn */ +#else +# warning No sys_sigreturn() for this architecture +# warning (no problem, just a reminder :-) +#endif + return 0; +} + +int +sys_siggetmask(struct tcb *tcp) +{ + if (exiting(tcp)) { + sigset_t sigm; + long_to_sigset(tcp->u_rval, &sigm); + tcp->auxstr = sprintsigmask("mask ", &sigm, 0); + } + return RVAL_HEX | RVAL_STR; +} + +int +sys_sigsuspend(struct tcb *tcp) +{ + if (entering(tcp)) { + sigset_t sigm; + long_to_sigset(tcp->u_arg[2], &sigm); + printsigmask(&sigm, 0); + } + return 0; +} + +#if !defined SS_ONSTACK +#define SS_ONSTACK 1 +#define SS_DISABLE 2 +#endif + +static const struct xlat sigaltstack_flags[] = { + { SS_ONSTACK, "SS_ONSTACK" }, + { SS_DISABLE, "SS_DISABLE" }, + { 0, NULL }, +}; + +static void +print_stack_t(struct tcb *tcp, unsigned long addr) +{ + stack_t ss; + + if (!addr) { + tprints("NULL"); + } else if (umove(tcp, addr, &ss) < 0) { + tprintf("%#lx", addr); + } else { + tprintf("{ss_sp=%#lx, ss_flags=", (unsigned long) ss.ss_sp); + printflags(sigaltstack_flags, ss.ss_flags, "SS_???"); + tprintf(", ss_size=%lu}", (unsigned long) ss.ss_size); + } +} + +int +sys_sigaltstack(struct tcb *tcp) +{ + if (entering(tcp)) { + print_stack_t(tcp, tcp->u_arg[0]); + } + else { + tprints(", "); + print_stack_t(tcp, tcp->u_arg[1]); + } + return 0; +} + +#ifdef HAVE_SIGACTION + +int +sys_sigprocmask(struct tcb *tcp) +{ +#ifdef ALPHA + sigset_t ss; + if (entering(tcp)) { + /* + * Alpha/OSF is different: it doesn't pass in two pointers, + * but rather passes in the new bitmask as an argument and + * then returns the old bitmask. This "works" because we + * only have 64 signals to worry about. If you want more, + * use of the rt_sigprocmask syscall is required. + * Alpha: + * old = osf_sigprocmask(how, new); + * Everyone else: + * ret = sigprocmask(how, &new, &old, ...); + */ + memcpy(&ss, &tcp->u_arg[1], sizeof(long)); + printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); + tprints(", "); + printsigmask(&ss, 0); + } + else if (!syserror(tcp)) { + memcpy(&ss, &tcp->u_rval, sizeof(long)); + tcp->auxstr = sprintsigmask("old mask ", &ss, 0); + return RVAL_HEX | RVAL_STR; + } +#else /* !ALPHA */ + if (entering(tcp)) { + printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); + tprints(", "); + print_sigset(tcp, tcp->u_arg[1], 0); + tprints(", "); + } + else { + if (!tcp->u_arg[2]) + tprints("NULL"); + else if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[2]); + else + print_sigset(tcp, tcp->u_arg[2], 0); + } +#endif /* !ALPHA */ + return 0; +} + +#endif /* HAVE_SIGACTION */ + +int +sys_kill(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %s", + widen_to_long(tcp->u_arg[0]), + signame(tcp->u_arg[1]) + ); + } + return 0; +} + +int +sys_tgkill(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%ld, %ld, %s", + widen_to_long(tcp->u_arg[0]), + widen_to_long(tcp->u_arg[1]), + signame(tcp->u_arg[2]) + ); + } + return 0; +} + +int +sys_sigpending(struct tcb *tcp) +{ + sigset_t sigset; + + if (exiting(tcp)) { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0) + tprints("[?]"); + else + printsigmask(&sigset, 0); + } + return 0; +} + +int +sys_rt_sigprocmask(struct tcb *tcp) +{ + sigset_t sigset; + + /* Note: arg[3] is the length of the sigset. */ + if (entering(tcp)) { + printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); + tprints(", "); + if (!tcp->u_arg[1]) + tprints("NULL, "); + else if (copy_sigset_len(tcp, tcp->u_arg[1], &sigset, tcp->u_arg[3]) < 0) + tprintf("%#lx, ", tcp->u_arg[1]); + else { + printsigmask(&sigset, 1); + tprints(", "); + } + } + else { + if (!tcp->u_arg[2]) + tprints("NULL"); + else if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[2]); + else if (copy_sigset_len(tcp, tcp->u_arg[2], &sigset, tcp->u_arg[3]) < 0) + tprints("[?]"); + else + printsigmask(&sigset, 1); + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} + +/* Structure describing the action to be taken when a signal arrives. */ +struct new_sigaction +{ + /* sa_handler may be a libc #define, need to use other name: */ + void (*__sa_handler)(int); + unsigned long sa_flags; + void (*sa_restorer)(void); + /* Kernel treats sa_mask as an array of longs. */ + unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1]; +}; +/* Same for i386-on-x86_64 and similar cases */ +struct new_sigaction32 +{ + uint32_t __sa_handler; + uint32_t sa_flags; + uint32_t sa_restorer; + uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)]; +}; + +int +sys_rt_sigaction(struct tcb *tcp) +{ + struct new_sigaction sa; + sigset_t sigset; + long addr; + int r; + + if (entering(tcp)) { + printsignal(tcp->u_arg[0]); + tprints(", "); + addr = tcp->u_arg[1]; + } else + addr = tcp->u_arg[2]; + + if (addr == 0) { + tprints("NULL"); + goto after_sa; + } + if (!verbose(tcp)) { + tprintf("%#lx", addr); + goto after_sa; + } +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize != sizeof(sa.sa_flags) && current_wordsize == 4) { + struct new_sigaction32 sa32; + r = umove(tcp, addr, &sa32); + if (r >= 0) { + memset(&sa, 0, sizeof(sa)); + sa.__sa_handler = (void*)(unsigned long)sa32.__sa_handler; + sa.sa_flags = sa32.sa_flags; + sa.sa_restorer = (void*)(unsigned long)sa32.sa_restorer; + /* Kernel treats sa_mask as an array of longs. + * For 32-bit process, "long" is uint32_t, thus, for example, + * 32th bit in sa_mask will end up as bit 0 in sa_mask[1]. + * But for (64-bit) kernel, 32th bit in sa_mask is + * 32th bit in 0th (64-bit) long! + * For little-endian, it's the same. + * For big-endian, we swap 32-bit words. + */ + sa.sa_mask[0] = sa32.sa_mask[0] + ((long)(sa32.sa_mask[1]) << 32); + } + } else +#endif + { + r = umove(tcp, addr, &sa); + } + if (r < 0) { + tprints("{...}"); + goto after_sa; + } + /* 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. */ + if ((long)sa.__sa_handler == (long)SIG_ERR) + tprints("{SIG_ERR, "); + else if ((long)sa.__sa_handler == (long)SIG_DFL) + tprints("{SIG_DFL, "); + else if ((long)sa.__sa_handler == (long)SIG_IGN) + tprints("{SIG_IGN, "); + else + tprintf("{%#lx, ", (long) sa.__sa_handler); + /* Questionable code below. + * Kernel won't handle sys_rt_sigaction + * with wrong sigset size (just returns EINVAL) + * therefore tcp->u_arg[3(4)] _must_ be NSIG / 8 here, + * and we always use smaller memcpy. */ + sigemptyset(&sigset); +#if defined(SPARC) || defined(SPARC64) + if (tcp->u_arg[4] <= sizeof(sigset)) + memcpy(&sigset, &sa.sa_mask, tcp->u_arg[4]); +#else + if (tcp->u_arg[3] <= sizeof(sigset)) + memcpy(&sigset, &sa.sa_mask, tcp->u_arg[3]); +#endif + else + memcpy(&sigset, &sa.sa_mask, sizeof(sigset)); + printsigmask(&sigset, 1); + tprints(", "); + printflags(sigact_flags, sa.sa_flags, "SA_???"); +#ifdef SA_RESTORER + if (sa.sa_flags & SA_RESTORER) + tprintf(", %p", sa.sa_restorer); +#endif + tprints("}"); + + after_sa: + if (entering(tcp)) + tprints(", "); + else +#if defined(SPARC) || defined(SPARC64) + tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]); +#elif defined(ALPHA) + tprintf(", %lu, %#lx", tcp->u_arg[3], tcp->u_arg[4]); +#else + tprintf(", %lu", tcp->u_arg[3]); +#endif + return 0; +} + +int +sys_rt_sigpending(struct tcb *tcp) +{ + sigset_t sigset; + + if (exiting(tcp)) { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[0]); + else if (copy_sigset_len(tcp, tcp->u_arg[0], + &sigset, tcp->u_arg[1]) < 0) + tprints("[?]"); + else + printsigmask(&sigset, 1); + } + return 0; +} + +int +sys_rt_sigsuspend(struct tcb *tcp) +{ + if (entering(tcp)) { + sigset_t sigm; + if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0) + tprints("[?]"); + else + printsigmask(&sigm, 1); + } + return 0; +} + +static void +print_sigqueueinfo(struct tcb *tcp, int sig, unsigned long uinfo) +{ + printsignal(sig); + tprints(", "); + printsiginfo_at(tcp, uinfo); +} + +int +sys_rt_sigqueueinfo(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, ", tcp->u_arg[0]); + print_sigqueueinfo(tcp, tcp->u_arg[1], tcp->u_arg[2]); + } + return 0; +} + +int +sys_rt_tgsigqueueinfo(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); + print_sigqueueinfo(tcp, tcp->u_arg[2], tcp->u_arg[3]); + } + return 0; +} + +int sys_rt_sigtimedwait(struct tcb *tcp) +{ + if (entering(tcp)) { + sigset_t sigset; + + if (copy_sigset_len(tcp, tcp->u_arg[0], + &sigset, tcp->u_arg[3]) < 0) + tprints("[?]"); + else + printsigmask(&sigset, 1); + tprints(", "); + /* This is the only "return" parameter, */ + if (tcp->u_arg[1] != 0) + return 0; + /* ... if it's NULL, can decode all on entry */ + tprints("NULL, "); + } + else if (tcp->u_arg[1] != 0) { + /* syscall exit, and u_arg[1] wasn't NULL */ + printsiginfo_at(tcp, tcp->u_arg[1]); + tprints(", "); + } + else { + /* syscall exit, and u_arg[1] was NULL */ + return 0; + } + print_timespec(tcp, tcp->u_arg[2]); + tprintf(", %d", (int) tcp->u_arg[3]); + return 0; +}; + +int +sys_restart_syscall(struct tcb *tcp) +{ + if (entering(tcp)) + tprints("<... resuming interrupted call ...>"); + return 0; +} + +static int +do_signalfd(struct tcb *tcp, int flags_arg) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + print_sigset(tcp, tcp->u_arg[1], 1); + tprintf(", %lu", tcp->u_arg[2]); + if (flags_arg >= 0) { + tprints(", "); + printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???"); + } + } + return 0; +} + +int +sys_signalfd(struct tcb *tcp) +{ + return do_signalfd(tcp, -1); +} + +int +sys_signalfd4(struct tcb *tcp) +{ + return do_signalfd(tcp, 3); +} diff --git a/alice-strace/signalent.sh b/alice-strace/signalent.sh new file mode 100755 index 0000000..62ae786 --- /dev/null +++ b/alice-strace/signalent.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# Copyright (c) 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. + +cat $* | + sed -n -e 's/\/\*.*\*\// /' -e 's/^#[ ]*define[ ][ ]*SIG\([^_ ]*\)[ ][ ]*\([0-9][0-9]*\)[ ]*$/\1 \2/p' | + sort -k2n | uniq | + awk ' + BEGIN { + tabs = "\t\t\t\t\t\t\t\t" + signal = -1; + } + $2 <= 256 { + if (signal == $2) + next + while (++signal < $2) { + n = "\"SIG_" signal "\"" + s = "\t" n "," + s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8)) + s = s "/* " signal " */" + print s + } + if (signal == $2) + n = "\"SIG" $1 "\"" + n = "\"SIG" $1 "\"" + s = "\t" n "," + s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8)) + s = s "/* " signal " */" + print s + } + ' diff --git a/alice-strace/sock.c b/alice-strace/sock.c new file mode 100644 index 0000000..9c6fe96 --- /dev/null +++ b/alice-strace/sock.c @@ -0,0 +1,287 @@ +/* + * 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 +#include +#include +#if defined(ALPHA) || defined(SH) || defined(SH64) +# if defined(HAVE_SYS_IOCTL_H) +# include +# elif defined(HAVE_IOCTLS_H) +# include +# endif +#endif +#include + +static const struct xlat iffflags[] = { + { IFF_UP, "IFF_UP" }, + { IFF_BROADCAST, "IFF_BROADCAST" }, + { IFF_DEBUG, "IFF_DEBUG" }, + { IFF_LOOPBACK, "IFF_LOOPBACK" }, + { IFF_POINTOPOINT, "IFF_POINTOPOINT" }, + { IFF_NOTRAILERS, "IFF_NOTRAILERS" }, + { IFF_RUNNING, "IFF_RUNNING" }, + { IFF_NOARP, "IFF_NOARP" }, + { IFF_PROMISC, "IFF_PROMISC" }, + { IFF_ALLMULTI, "IFF_ALLMULTI" }, + { IFF_MASTER, "IFF_MASTER" }, + { IFF_SLAVE, "IFF_SLAVE" }, + { IFF_MULTICAST, "IFF_MULTICAST" }, + { IFF_PORTSEL, "IFF_PORTSEL" }, + { IFF_AUTOMEDIA, "IFF_AUTOMEDIA" }, + { 0, NULL } +}; + +static void +print_addr(struct tcb *tcp, long addr, struct ifreq *ifr) +{ + if (ifr->ifr_addr.sa_family == AF_INET) { + struct sockaddr_in *sinp; + sinp = (struct sockaddr_in *) &ifr->ifr_addr; + tprintf("inet_addr(\"%s\")", inet_ntoa(sinp->sin_addr)); + } else + printstr(tcp, addr, sizeof(ifr->ifr_addr.sa_data)); +} + +int +sock_ioctl(struct tcb *tcp, long code, long arg) +{ + struct ifreq ifr; + struct ifconf ifc; + const char *str = NULL; + unsigned char *bytes; + + if (entering(tcp)) { + if (code == SIOCGIFCONF) { + if (umove(tcp, tcp->u_arg[2], &ifc) >= 0 + && ifc.ifc_buf == NULL) + tprintf(", {%d -> ", ifc.ifc_len); + else + tprints(", {"); + } + return 0; + } + + switch (code) { +#ifdef SIOCSHIWAT + case SIOCSHIWAT: +#endif +#ifdef SIOCGHIWAT + case SIOCGHIWAT: +#endif +#ifdef SIOCSLOWAT + case SIOCSLOWAT: +#endif +#ifdef SIOCGLOWAT + case SIOCGLOWAT: +#endif +#ifdef FIOSETOWN + case FIOSETOWN: +#endif +#ifdef FIOGETOWN + case FIOGETOWN: +#endif +#ifdef SIOCSPGRP + case SIOCSPGRP: +#endif +#ifdef SIOCGPGRP + case SIOCGPGRP: +#endif +#ifdef SIOCATMARK + case SIOCATMARK: +#endif + printnum(tcp, arg, ", %#d"); + return 1; + case SIOCGIFNAME: + case SIOCSIFNAME: + case SIOCGIFINDEX: + case SIOCGIFADDR: + case SIOCSIFADDR: + case SIOCGIFDSTADDR: + case SIOCSIFDSTADDR: + case SIOCGIFBRDADDR: + case SIOCSIFBRDADDR: + case SIOCGIFNETMASK: + case SIOCSIFNETMASK: + case SIOCGIFFLAGS: + case SIOCSIFFLAGS: + case SIOCGIFMETRIC: + case SIOCSIFMETRIC: + case SIOCGIFMTU: + case SIOCSIFMTU: + case SIOCGIFSLAVE: + case SIOCSIFSLAVE: + case SIOCGIFHWADDR: + case SIOCSIFHWADDR: + case SIOCGIFTXQLEN: + case SIOCSIFTXQLEN: + case SIOCGIFMAP: + case SIOCSIFMAP: + if (umove(tcp, tcp->u_arg[2], &ifr) < 0) + tprintf(", %#lx", tcp->u_arg[2]); + else if (syserror(tcp)) { + if (code == SIOCGIFNAME || code == SIOCSIFNAME) + tprintf(", {ifr_index=%d, ifr_name=???}", ifr.ifr_ifindex); + else + tprintf(", {ifr_name=\"%s\", ???}", ifr.ifr_name); + } else if (code == SIOCGIFNAME || code == SIOCSIFNAME) + tprintf(", {ifr_index=%d, ifr_name=\"%s\"}", + ifr.ifr_ifindex, ifr.ifr_name); + else { + tprintf(", {ifr_name=\"%s\", ", ifr.ifr_name); + switch (code) { + case SIOCGIFINDEX: + tprintf("ifr_index=%d", ifr.ifr_ifindex); + break; + case SIOCGIFADDR: + case SIOCSIFADDR: + str = "ifr_addr"; + case SIOCGIFDSTADDR: + case SIOCSIFDSTADDR: + if (!str) + str = "ifr_dstaddr"; + case SIOCGIFBRDADDR: + case SIOCSIFBRDADDR: + if (!str) + str = "ifr_broadaddr"; + case SIOCGIFNETMASK: + case SIOCSIFNETMASK: + if (!str) + str = "ifr_netmask"; + tprintf("%s={", str); + printxval(addrfams, + ifr.ifr_addr.sa_family, + "AF_???"); + tprints(", "); + print_addr(tcp, ((long) tcp->u_arg[2] + + offsetof(struct ifreq, + ifr_addr.sa_data)), + &ifr); + tprints("}"); + break; + case SIOCGIFHWADDR: + case SIOCSIFHWADDR: + /* XXX Are there other hardware addresses + than 6-byte MACs? */ + bytes = (unsigned char *) &ifr.ifr_hwaddr.sa_data; + tprintf("ifr_hwaddr=%02x:%02x:%02x:%02x:%02x:%02x", + bytes[0], bytes[1], bytes[2], + bytes[3], bytes[4], bytes[5]); + break; + case SIOCGIFFLAGS: + case SIOCSIFFLAGS: + tprints("ifr_flags="); + printflags(iffflags, ifr.ifr_flags, "IFF_???"); + break; + case SIOCGIFMETRIC: + case SIOCSIFMETRIC: + tprintf("ifr_metric=%d", ifr.ifr_metric); + break; + case SIOCGIFMTU: + case SIOCSIFMTU: + tprintf("ifr_mtu=%d", ifr.ifr_mtu); + break; + case SIOCGIFSLAVE: + case SIOCSIFSLAVE: + tprintf("ifr_slave=\"%s\"", ifr.ifr_slave); + break; + case SIOCGIFTXQLEN: + case SIOCSIFTXQLEN: + tprintf("ifr_qlen=%d", ifr.ifr_qlen); + break; + case SIOCGIFMAP: + case SIOCSIFMAP: + tprintf("ifr_map={mem_start=%#lx, " + "mem_end=%#lx, base_addr=%#x, " + "irq=%u, dma=%u, port=%u}", + ifr.ifr_map.mem_start, + ifr.ifr_map.mem_end, + (unsigned) ifr.ifr_map.base_addr, + (unsigned) ifr.ifr_map.irq, + (unsigned) ifr.ifr_map.dma, + (unsigned) ifr.ifr_map.port); + break; + } + tprints("}"); + } + return 1; + case SIOCGIFCONF: + if (umove(tcp, tcp->u_arg[2], &ifc) < 0) { + tprints("???}"); + return 1; + } + tprintf("%d, ", ifc.ifc_len); + if (syserror(tcp)) { + tprintf("%lx", (unsigned long) ifc.ifc_buf); + } else if (ifc.ifc_buf == NULL) { + tprints("NULL"); + } else { + int i; + unsigned nifra = ifc.ifc_len / sizeof(struct ifreq); + struct ifreq ifra[nifra]; + + if (umoven(tcp, (unsigned long) ifc.ifc_buf, + sizeof(ifra), (char *) ifra) < 0) { + tprintf("%lx}", (unsigned long) ifc.ifc_buf); + return 1; + } + tprints("{"); + for (i = 0; i < nifra; ++i ) { + if (i > 0) + tprints(", "); + tprintf("{\"%s\", {", + ifra[i].ifr_name); + if (verbose(tcp)) { + printxval(addrfams, + ifra[i].ifr_addr.sa_family, + "AF_???"); + tprints(", "); + print_addr(tcp, ((long) tcp->u_arg[2] + + offsetof(struct ifreq, + ifr_addr.sa_data) + + ((char *) &ifra[i] + - (char *) &ifra[0])), + &ifra[i]); + } else + tprints("..."); + tprints("}}"); + } + tprints("}"); + } + tprints("}"); + return 1; + default: + return 0; + } +} + +int +sys_socketcall(struct tcb *tcp) +{ + return printargs(tcp); +} diff --git a/alice-strace/stream.c b/alice-strace/stream.c new file mode 100644 index 0000000..8c90838 --- /dev/null +++ b/alice-strace/stream.c @@ -0,0 +1,437 @@ +/* + * 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" +#ifdef HAVE_POLL_H +# include +#endif +#ifdef HAVE_SYS_POLL_H +# include +#endif +#ifdef HAVE_SYS_CONF_H +# include +#endif + +/* Who has STREAMS syscalls? + * Linux hasn't. Solaris has (had?). + * Just in case I miss something, retain in for Sparc... + */ +#if defined(SPARC) || defined(SPARC64) + +# ifdef HAVE_STROPTS_H +# include +# else +# define RS_HIPRI 1 +struct strbuf { + int maxlen; /* no. of bytes in buffer */ + int len; /* no. of bytes returned */ + const char *buf; /* pointer to data */ +}; +# define MORECTL 1 +# define MOREDATA 2 +# endif + +static const struct xlat msgflags[] = { + { RS_HIPRI, "RS_HIPRI" }, + { 0, NULL }, +}; + +static void +printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting) +{ + if (sbp->maxlen == -1 && getting) + tprints("{maxlen=-1}"); + else { + tprints("{"); + if (getting) + tprintf("maxlen=%d, ", sbp->maxlen); + tprintf("len=%d, buf=", sbp->len); + printstr(tcp, (unsigned long) sbp->buf, sbp->len); + tprints("}"); + } +} + +static void +printstrbufarg(struct tcb *tcp, long arg, int getting) +{ + struct strbuf buf; + + if (arg == 0) + tprints("NULL"); + else if (umove(tcp, arg, &buf) < 0) + tprints("{...}"); + else + printstrbuf(tcp, &buf, getting); + tprints(", "); +} + +int +sys_putmsg(struct tcb *tcp) +{ + int i; + + if (entering(tcp)) { + /* fd */ + tprintf("%ld, ", tcp->u_arg[0]); + /* control and data */ + for (i = 1; i < 3; i++) + printstrbufarg(tcp, tcp->u_arg[i], 0); + /* flags */ + printflags(msgflags, tcp->u_arg[3], "RS_???"); + } + return 0; +} + +int +sys_getmsg(struct tcb *tcp) +{ + int i, flags; + + if (entering(tcp)) { + /* fd */ + tprintf("%lu, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) { + tprintf("%#lx, %#lx, %#lx", + tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + return 0; + } + /* control and data */ + for (i = 1; i < 3; i++) + printstrbufarg(tcp, tcp->u_arg[i], 1); + /* pointer to flags */ + if (tcp->u_arg[3] == 0) + tprints("NULL"); + else if (umove(tcp, tcp->u_arg[3], &flags) < 0) + tprints("[?]"); + else { + tprints("["); + printflags(msgflags, flags, "RS_???"); + tprints("]"); + } + /* decode return value */ + switch (tcp->u_rval) { + case MORECTL: + tcp->auxstr = "MORECTL"; + break; + case MORECTL|MOREDATA: + tcp->auxstr = "MORECTL|MOREDATA"; + break; + case MOREDATA: + tcp->auxstr = "MORECTL"; + break; + default: + tcp->auxstr = NULL; + break; + } + } + return RVAL_HEX | RVAL_STR; +} + +# if defined SYS_putpmsg || defined SYS_getpmsg +static const struct xlat pmsgflags[] = { +# ifdef MSG_HIPRI + { MSG_HIPRI, "MSG_HIPRI" }, +# endif +# ifdef MSG_AND + { MSG_ANY, "MSG_ANY" }, +# endif +# ifdef MSG_BAND + { MSG_BAND, "MSG_BAND" }, +# endif + { 0, NULL }, +}; +# ifdef SYS_putpmsg +int +sys_putpmsg(struct tcb *tcp) +{ + int i; + + if (entering(tcp)) { + /* fd */ + tprintf("%ld, ", tcp->u_arg[0]); + /* control and data */ + for (i = 1; i < 3; i++) + printstrbufarg(tcp, tcp->u_arg[i], 0); + /* band */ + tprintf("%ld, ", tcp->u_arg[3]); + /* flags */ + printflags(pmsgflags, tcp->u_arg[4], "MSG_???"); + } + return 0; +} +# endif +# ifdef SYS_getpmsg +int +sys_getpmsg(struct tcb *tcp) +{ + int i, flags; + + if (entering(tcp)) { + /* fd */ + tprintf("%lu, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) { + tprintf("%#lx, %#lx, %#lx, %#lx", tcp->u_arg[1], + tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[4]); + return 0; + } + /* control and data */ + for (i = 1; i < 3; i++) + printstrbufarg(tcp, tcp->u_arg[i], 1); + /* pointer to band */ + printnum(tcp, tcp->u_arg[3], "%d"); + tprints(", "); + /* pointer to flags */ + if (tcp->u_arg[4] == 0) + tprints("NULL"); + else if (umove(tcp, tcp->u_arg[4], &flags) < 0) + tprints("[?]"); + else { + tprints("["); + printflags(pmsgflags, flags, "MSG_???"); + tprints("]"); + } + /* decode return value */ + switch (tcp->u_rval) { + case MORECTL: + tcp->auxstr = "MORECTL"; + break; + case MORECTL|MOREDATA: + tcp->auxstr = "MORECTL|MOREDATA"; + break; + case MOREDATA: + tcp->auxstr = "MORECTL"; + break; + default: + tcp->auxstr = NULL; + break; + } + } + return RVAL_HEX | RVAL_STR; +} +# endif +# endif /* getpmsg/putpmsg */ + +#endif /* STREAMS syscalls support */ + + +#ifdef HAVE_SYS_POLL_H + +static const struct xlat pollflags[] = { +# ifdef POLLIN + { POLLIN, "POLLIN" }, + { POLLPRI, "POLLPRI" }, + { POLLOUT, "POLLOUT" }, +# ifdef POLLRDNORM + { POLLRDNORM, "POLLRDNORM" }, +# endif +# ifdef POLLWRNORM + { POLLWRNORM, "POLLWRNORM" }, +# endif +# ifdef POLLRDBAND + { POLLRDBAND, "POLLRDBAND" }, +# endif +# ifdef POLLWRBAND + { POLLWRBAND, "POLLWRBAND" }, +# endif + { POLLERR, "POLLERR" }, + { POLLHUP, "POLLHUP" }, + { POLLNVAL, "POLLNVAL" }, +# endif + { 0, NULL }, +}; + +static int +decode_poll(struct tcb *tcp, long pts) +{ + struct pollfd fds; + unsigned nfds; + unsigned long size, start, cur, end, abbrev_end; + int failed = 0; + + if (entering(tcp)) { + nfds = tcp->u_arg[1]; + size = sizeof(fds) * nfds; + start = tcp->u_arg[0]; + end = start + size; + if (nfds == 0 || size / sizeof(fds) != nfds || end < start) { + tprintf("%#lx, %d, ", + tcp->u_arg[0], nfds); + return 0; + } + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(fds); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + tprints("["); + for (cur = start; cur < end; cur += sizeof(fds)) { + if (cur > start) + tprints(", "); + if (cur >= abbrev_end) { + tprints("..."); + break; + } + if (umoven(tcp, cur, sizeof fds, (char *) &fds) < 0) { + tprints("?"); + failed = 1; + break; + } + if (fds.fd < 0) { + tprintf("{fd=%d}", fds.fd); + continue; + } + tprints("{fd="); + printfd(tcp, fds.fd); + tprints(", events="); + printflags(pollflags, fds.events, "POLL???"); + tprints("}"); + } + tprints("]"); + if (failed) + tprintf(" %#lx", start); + tprintf(", %d, ", nfds); + return 0; + } else { + static char outstr[1024]; + char *outptr; +#define end_outstr (outstr + sizeof(outstr)) + const char *flagstr; + + if (syserror(tcp)) + return 0; + if (tcp->u_rval == 0) { + tcp->auxstr = "Timeout"; + return RVAL_STR; + } + + nfds = tcp->u_arg[1]; + size = sizeof(fds) * nfds; + start = tcp->u_arg[0]; + end = start + size; + if (nfds == 0 || size / sizeof(fds) != nfds || end < start) + return 0; + if (abbrev(tcp)) { + abbrev_end = start + max_strlen * sizeof(fds); + if (abbrev_end < start) + abbrev_end = end; + } else { + abbrev_end = end; + } + + outptr = outstr; + + for (cur = start; cur < end; cur += sizeof(fds)) { + if (umoven(tcp, cur, sizeof fds, (char *) &fds) < 0) { + if (outptr < end_outstr - 2) + *outptr++ = '?'; + failed = 1; + break; + } + if (!fds.revents) + continue; + if (outptr == outstr) { + *outptr++ = '['; + } else { + if (outptr < end_outstr - 3) + outptr = stpcpy(outptr, ", "); + } + if (cur >= abbrev_end) { + if (outptr < end_outstr - 4) + outptr = stpcpy(outptr, "..."); + break; + } + if (outptr < end_outstr - (sizeof("{fd=%d, revents=") + sizeof(int)*3) + 1) + outptr += sprintf(outptr, "{fd=%d, revents=", fds.fd); + flagstr = sprintflags("", pollflags, fds.revents); + if (outptr < end_outstr - (strlen(flagstr) + 2)) { + outptr = stpcpy(outptr, flagstr); + *outptr++ = '}'; + } + } + if (failed) + return 0; + + if (outptr != outstr /* && outptr < end_outstr - 1 (always true)*/) + *outptr++ = ']'; + + *outptr = '\0'; + if (pts) { + if (outptr < end_outstr - (10 + TIMESPEC_TEXT_BUFSIZE)) { + outptr = stpcpy(outptr, outptr == outstr ? "left " : ", left "); + sprint_timespec(outptr, tcp, pts); + } + } + + if (outptr == outstr) + return 0; + + tcp->auxstr = outstr; + return RVAL_STR; +#undef end_outstr + } +} + +int +sys_poll(struct tcb *tcp) +{ + int rc = decode_poll(tcp, 0); + if (entering(tcp)) { +# ifdef INFTIM + if (tcp->u_arg[2] == INFTIM) + tprints("INFTIM"); + else +# endif + tprintf("%ld", tcp->u_arg[2]); + } + return rc; +} + +int +sys_ppoll(struct tcb *tcp) +{ + int rc = decode_poll(tcp, tcp->u_arg[2]); + if (entering(tcp)) { + print_timespec(tcp, tcp->u_arg[2]); + tprints(", "); + print_sigset(tcp, tcp->u_arg[3], 0); + tprintf(", %lu", tcp->u_arg[4]); + } + return rc; +} + +#else /* !HAVE_SYS_POLL_H */ +int +sys_poll(struct tcb *tcp) +{ + return 0; +} +#endif diff --git a/alice-strace/syscall.c b/alice-strace/syscall.c new file mode 100644 index 0000000..f15434b --- /dev/null +++ b/alice-strace/syscall.c @@ -0,0 +1,3016 @@ +/* + * 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) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 + +#ifdef HAVE_SYS_REG_H +# include +# ifndef PTRACE_PEEKUSR +# define PTRACE_PEEKUSR PTRACE_PEEKUSER +# endif +#elif defined(HAVE_LINUX_PTRACE_H) +# undef PTRACE_SYSCALL +# ifdef HAVE_STRUCT_IA64_FPREG +# define ia64_fpreg XXX_ia64_fpreg +# endif +# ifdef HAVE_STRUCT_PT_ALL_USER_REGS +# define pt_all_user_regs XXX_pt_all_user_regs +# endif +# include +# undef ia64_fpreg +# undef pt_all_user_regs +#endif + +#if defined(SPARC64) +# undef PTRACE_GETREGS +# define PTRACE_GETREGS PTRACE_GETREGS64 +# undef PTRACE_SETREGS +# define PTRACE_SETREGS PTRACE_SETREGS64 +#endif + +#if defined(IA64) +# include +# include +#endif + +/* for struct iovec */ +#include +/* for NT_PRSTATUS */ +#ifdef HAVE_ELF_H +# include +#endif + +#if defined(AARCH64) +# include +#endif + +#if defined(XTENSA) +# include +#endif + +#ifndef ERESTARTSYS +# define ERESTARTSYS 512 +#endif +#ifndef ERESTARTNOINTR +# define ERESTARTNOINTR 513 +#endif +#ifndef ERESTARTNOHAND +# define ERESTARTNOHAND 514 /* restart if no handler */ +#endif +#ifndef ERESTART_RESTARTBLOCK +# define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ +#endif + +#ifndef NSIG +# warning: NSIG is not defined, using 32 +# define NSIG 32 +#endif +#ifdef ARM +/* Ugh. Is this really correct? ARM has no RT signals?! */ +# undef NSIG +# define NSIG 32 +#endif + +#include "syscall.h" + +/* Define these shorthand notations to simplify the syscallent files. */ +#define TD TRACE_DESC +#define TF TRACE_FILE +#define TI TRACE_IPC +#define TN TRACE_NETWORK +#define TP TRACE_PROCESS +#define TS TRACE_SIGNAL +#define TM TRACE_MEMORY +#define NF SYSCALL_NEVER_FAILS +#define MA MAX_ARGS + +const struct_sysent sysent0[] = { +#include "syscallent.h" +}; + +#if SUPPORTED_PERSONALITIES > 1 +static const struct_sysent sysent1[] = { +# include "syscallent1.h" +}; +#endif + +#if SUPPORTED_PERSONALITIES > 2 +static const struct_sysent sysent2[] = { +# include "syscallent2.h" +}; +#endif + +/* Now undef them since short defines cause wicked namespace pollution. */ +#undef TD +#undef TF +#undef TI +#undef TN +#undef TP +#undef TS +#undef TM +#undef NF +#undef MA + +/* + * `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary + * program `ioctlsort', such that the list is sorted by the `code' field. + * This has the side-effect of resolving the _IO.. macros into + * plain integers, eliminating the need to include here everything + * in "/usr/include". + */ + +const char *const errnoent0[] = { +#include "errnoent.h" +}; +const char *const signalent0[] = { +#include "signalent.h" +}; +const struct_ioctlent ioctlent0[] = { +#include "ioctlent.h" +}; + +#if SUPPORTED_PERSONALITIES > 1 +static const char *const errnoent1[] = { +# include "errnoent1.h" +}; +static const char *const signalent1[] = { +# include "signalent1.h" +}; +static const struct_ioctlent ioctlent1[] = { +# include "ioctlent1.h" +}; +#endif + +#if SUPPORTED_PERSONALITIES > 2 +static const char *const errnoent2[] = { +# include "errnoent2.h" +}; +static const char *const signalent2[] = { +# include "signalent2.h" +}; +static const struct_ioctlent ioctlent2[] = { +# include "ioctlent2.h" +}; +#endif + +enum { + nsyscalls0 = ARRAY_SIZE(sysent0) +#if SUPPORTED_PERSONALITIES > 1 + , nsyscalls1 = ARRAY_SIZE(sysent1) +# if SUPPORTED_PERSONALITIES > 2 + , nsyscalls2 = ARRAY_SIZE(sysent2) +# endif +#endif +}; + +enum { + nerrnos0 = ARRAY_SIZE(errnoent0) +#if SUPPORTED_PERSONALITIES > 1 + , nerrnos1 = ARRAY_SIZE(errnoent1) +# if SUPPORTED_PERSONALITIES > 2 + , nerrnos2 = ARRAY_SIZE(errnoent2) +# endif +#endif +}; + +enum { + nsignals0 = ARRAY_SIZE(signalent0) +#if SUPPORTED_PERSONALITIES > 1 + , nsignals1 = ARRAY_SIZE(signalent1) +# if SUPPORTED_PERSONALITIES > 2 + , nsignals2 = ARRAY_SIZE(signalent2) +# endif +#endif +}; + +enum { + nioctlents0 = ARRAY_SIZE(ioctlent0) +#if SUPPORTED_PERSONALITIES > 1 + , nioctlents1 = ARRAY_SIZE(ioctlent1) +# if SUPPORTED_PERSONALITIES > 2 + , nioctlents2 = ARRAY_SIZE(ioctlent2) +# endif +#endif +}; + +#if SUPPORTED_PERSONALITIES > 1 +const struct_sysent *sysent = sysent0; +const char *const *errnoent = errnoent0; +const char *const *signalent = signalent0; +const struct_ioctlent *ioctlent = ioctlent0; +#endif +unsigned nsyscalls = nsyscalls0; +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] = { + nsyscalls0, +#if SUPPORTED_PERSONALITIES > 1 + nsyscalls1, +#endif +#if SUPPORTED_PERSONALITIES > 2 + nsyscalls2, +#endif +}; +static const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES] = { + sysent0, +#if SUPPORTED_PERSONALITIES > 1 + sysent1, +#endif +#if SUPPORTED_PERSONALITIES > 2 + sysent2, +#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; + +# ifndef current_wordsize +unsigned current_wordsize; +static const int personality_wordsize[SUPPORTED_PERSONALITIES] = { + PERSONALITY0_WORDSIZE, + PERSONALITY1_WORDSIZE, +# if SUPPORTED_PERSONALITIES > 2 + PERSONALITY2_WORDSIZE, +# endif +}; +# endif + +void +set_personality(int personality) +{ + nsyscalls = nsyscall_vec[personality]; + sysent = sysent_vec[personality]; + + switch (personality) { + case 0: + errnoent = errnoent0; + nerrnos = nerrnos0; + ioctlent = ioctlent0; + nioctlents = nioctlents0; + signalent = signalent0; + nsignals = nsignals0; + break; + + case 1: + errnoent = errnoent1; + nerrnos = nerrnos1; + ioctlent = ioctlent1; + nioctlents = nioctlents1; + signalent = signalent1; + nsignals = nsignals1; + break; + +# if SUPPORTED_PERSONALITIES > 2 + case 2: + errnoent = errnoent2; + nerrnos = nerrnos2; + ioctlent = ioctlent2; + nioctlents = nioctlents2; + signalent = signalent2; + nsignals = nsignals2; + break; +# endif + } + + current_personality = personality; +# ifndef current_wordsize + current_wordsize = personality_wordsize[personality]; +# endif +} + +static void +update_personality(struct tcb *tcp, int personality) +{ + if (personality == current_personality) + return; + set_personality(personality); + + if (personality == tcp->currpers) + return; + tcp->currpers = personality; + +# if defined(POWERPC64) + if (!qflag) { + static const char *const names[] = {"64 bit", "32 bit"}; + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n", + tcp->pid, names[personality]); + } +# elif defined(X86_64) + if (!qflag) { + static const char *const names[] = {"64 bit", "32 bit", "x32"}; + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n", + tcp->pid, names[personality]); + } +# elif defined(X32) + if (!qflag) { + static const char *const names[] = {"x32", "32 bit"}; + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n", + tcp->pid, names[personality]); + } +# elif defined(AARCH64) + if (!qflag) { + static const char *const names[] = {"32-bit", "AArch64"}; + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n", + tcp->pid, names[personality]); + } +# elif defined(TILE) + if (!qflag) { + static const char *const names[] = {"64-bit", "32-bit"}; + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n", + tcp->pid, names[personality]); + } +# endif +} +#endif + +static int qual_syscall(), qual_signal(), qual_desc(); + +static const struct qual_options { + 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(int n) +{ + unsigned p; + qualbits_t *qp; + for (p = 0; p < SUPPORTED_PERSONALITIES; p++) { + qp = qual_vec[p] = realloc(qual_vec[p], n * sizeof(qualbits_t)); + if (!qp) + die_out_of_memory(); + memset(&qp[num_quals], 0, (n - num_quals) * sizeof(qualbits_t)); + } + num_quals = n; +} + +static void +qualify_one(int n, int bitflag, int not, int pers) +{ + unsigned 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 +qual_syscall(const char *s, int bitflag, int not) +{ + unsigned p; + unsigned i; + int rc = -1; + + 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, int bitflag, int not) +{ + 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, int bitflag, 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; +} + +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; +} + +void +qualify(const char *s) +{ + const struct qual_options *opt; + int not; + char *copy; + const char *p; + int i, n; + + if (num_quals == 0) + reallocate_qual(MIN_QUALS); + + opt = &qual_options[0]; + for (i = 0; (p = qual_options[i].option_name); i++) { + n = strlen(p); + if (strncmp(s, p, n) == 0 && s[n] == '=') { + opt = &qual_options[i]; + s += n + 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 = strdup(s); + if (!copy) + die_out_of_memory(); + for (p = strtok(copy, ","); p; p = strtok(NULL, ",")) { + if (opt->bitflag == QUAL_TRACE && (n = lookup_class(p)) > 0) { + unsigned pers; + for (pers = 0; pers < SUPPORTED_PERSONALITIES; pers++) { + for (i = 0; i < nsyscall_vec[pers]; i++) + if (sysent_vec[pers][i].sys_flags & n) + qualify_one(i, opt->bitflag, not, pers); + } + continue; + } + 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) +{ + unsigned long addr; + unsigned int i, n, size; + + if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= SYS_socket_nsubcalls) + return; + + tcp->scno = SYS_socket_subcall + tcp->u_arg[0]; + tcp->qual_flg = qual_flags[tcp->scno]; + tcp->s_ent = &sysent[tcp->scno]; + addr = tcp->u_arg[1]; + size = current_wordsize; + n = tcp->s_ent->nargs; + for (i = 0; i < n; ++i) { + if (size == sizeof(int)) { + unsigned int arg; + if (umove(tcp, addr, &arg) < 0) + arg = 0; + tcp->u_arg[i] = arg; + } + else { + unsigned long arg; + if (umove(tcp, addr, &arg) < 0) + arg = 0; + tcp->u_arg[i] = arg; + } + addr += size; + } +} +#endif + +#ifdef SYS_ipc_subcall +static void +decode_ipc_subcall(struct tcb *tcp) +{ + unsigned int i, n; + + if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= SYS_ipc_nsubcalls) + return; + + tcp->scno = SYS_ipc_subcall + tcp->u_arg[0]; + tcp->qual_flg = qual_flags[tcp->scno]; + tcp->s_ent = &sysent[tcp->scno]; + n = tcp->s_ent->nargs; + for (i = 0; i < n; i++) + tcp->u_arg[i] = tcp->u_arg[i + 1]; +} +#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%#lx", i ? ", " : "", tcp->u_arg[i]); + } + return 0; +} + +int +printargs_lu(struct tcb *tcp) +{ + if (entering(tcp)) { + int i; + int n = tcp->s_ent->nargs; + for (i = 0; i < n; i++) + tprintf("%s%lu", i ? ", " : "", tcp->u_arg[i]); + } + return 0; +} + +int +printargs_ld(struct tcb *tcp) +{ + if (entering(tcp)) { + int i; + int n = tcp->s_ent->nargs; + for (i = 0; i < n; i++) + tprintf("%s%ld", i ? ", " : "", tcp->u_arg[i]); + } + return 0; +} + +#if defined(SPARC) || defined(SPARC64) || defined(IA64) || defined(SH) +long +getrval2(struct tcb *tcp) +{ + long val; + +# if defined(SPARC) || defined(SPARC64) + val = sparc_regs.u_regs[U_REG_O1]; +# elif defined(SH) + if (upeek(tcp, 4*(REG_REG0+1), &val) < 0) + return -1; +# elif defined(IA64) + if (upeek(tcp, PT_R9, &val) < 0) + return -1; +# endif + + return val; +} +#endif + +int +is_restart_error(struct tcb *tcp) +{ + switch (tcp->u_error) { + case ERESTARTSYS: + case ERESTARTNOINTR: + case ERESTARTNOHAND: + case ERESTART_RESTARTBLOCK: + return 1; + default: + break; + } + return 0; +} + +#if defined(I386) +struct user_regs_struct i386_regs; +# define ARCH_REGS_FOR_GETREGSET i386_regs +#elif defined(X86_64) || defined(X32) +/* + * On i386, pt_regs and user_regs_struct are the same, + * but on 64 bit x86, user_regs_struct has six more fields: + * fs_base, gs_base, ds, es, fs, gs. + * PTRACE_GETREGS fills them too, so struct pt_regs would overflow. + */ +struct i386_user_regs_struct { + uint32_t ebx; + uint32_t ecx; + uint32_t edx; + uint32_t esi; + uint32_t edi; + uint32_t ebp; + uint32_t eax; + uint32_t xds; + uint32_t xes; + uint32_t xfs; + uint32_t xgs; + uint32_t orig_eax; + uint32_t eip; + uint32_t xcs; + uint32_t eflags; + uint32_t esp; + uint32_t xss; +}; +static union { + struct user_regs_struct x86_64_r; + struct i386_user_regs_struct i386_r; +} x86_regs_union; +# define x86_64_regs x86_regs_union.x86_64_r +# define i386_regs x86_regs_union.i386_r +static struct iovec x86_io = { + .iov_base = &x86_regs_union +}; +#elif defined(IA64) +long ia32 = 0; /* not static */ +static long ia64_r8, ia64_r10; +#elif defined(POWERPC) +static long ppc_result; +#elif defined(M68K) +static long m68k_d0; +#elif defined(BFIN) +static long bfin_r0; +#elif defined(ARM) +struct pt_regs arm_regs; /* not static */ +# define ARCH_REGS_FOR_GETREGSET arm_regs +#elif defined(AARCH64) +static union { + struct user_pt_regs aarch64_r; + struct arm_pt_regs arm_r; +} arm_regs_union; +# define aarch64_regs arm_regs_union.aarch64_r +# define arm_regs arm_regs_union.arm_r +static struct iovec aarch64_io = { + .iov_base = &arm_regs_union +}; +#elif defined(ALPHA) +static long alpha_r0; +static long alpha_a3; +#elif defined(AVR32) +static struct pt_regs avr32_regs; +#elif defined(SPARC) || defined(SPARC64) +struct pt_regs sparc_regs; /* not static */ +#elif defined(LINUX_MIPSN32) +static long long mips_a3; +static long long mips_r2; +#elif defined(MIPS) +static long mips_a3; +static long mips_r2; +#elif defined(S390) || defined(S390X) +static long gpr2; +static long syscall_mode; +#elif defined(HPPA) +static long hppa_r28; +#elif defined(SH) +static long sh_r0; +#elif defined(SH64) +static long sh64_r9; +#elif defined(CRISV10) || defined(CRISV32) +static long cris_r10; +#elif defined(TILE) +struct pt_regs tile_regs; +#elif defined(MICROBLAZE) +static long microblaze_r3; +#elif defined(OR1K) +static struct user_regs_struct or1k_regs; +# define ARCH_REGS_FOR_GETREGSET or1k_regs +#elif defined(METAG) +static struct user_gp_regs metag_regs; +# define ARCH_REGS_FOR_GETREGSET metag_regs +#elif defined(XTENSA) +static long xtensa_a2; +#endif + +void +printcall(struct tcb *tcp) +{ +#define PRINTBADPC tprintf(sizeof(long) == 4 ? "[????????] " : \ + sizeof(long) == 8 ? "[????????????????] " : \ + NULL /* crash */) + if (get_regs_error) { + PRINTBADPC; + return; + } +#if defined(I386) + tprintf("[%08lx] ", i386_regs.eip); +#elif defined(S390) || defined(S390X) + long psw; + if (upeek(tcp, PT_PSWADDR, &psw) < 0) { + PRINTBADPC; + return; + } +# ifdef S390 + tprintf("[%08lx] ", psw); +# elif S390X + tprintf("[%016lx] ", psw); +# endif +#elif defined(X86_64) || defined(X32) + if (x86_io.iov_len == sizeof(i386_regs)) { + tprintf("[%08x] ", (unsigned) i386_regs.eip); + } else { +# if defined(X86_64) + tprintf("[%016lx] ", (unsigned long) x86_64_regs.rip); +# elif defined(X32) + /* Note: this truncates 64-bit rip to 32 bits */ + tprintf("[%08lx] ", (unsigned long) x86_64_regs.rip); +# endif + } +#elif defined(IA64) + long ip; + if (upeek(tcp, PT_B0, &ip) < 0) { + PRINTBADPC; + return; + } + tprintf("[%08lx] ", ip); +#elif defined(POWERPC) + long pc; + if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &pc) < 0) { + PRINTBADPC; + return; + } +# ifdef POWERPC64 + tprintf("[%016lx] ", pc); +# else + tprintf("[%08lx] ", pc); +# endif +#elif defined(M68K) + long pc; + if (upeek(tcp, 4*PT_PC, &pc) < 0) { + tprints("[????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(ALPHA) + long pc; + if (upeek(tcp, REG_PC, &pc) < 0) { + tprints("[????????????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(SPARC) + tprintf("[%08lx] ", sparc_regs.pc); +#elif defined(SPARC64) + tprintf("[%08lx] ", sparc_regs.tpc); +#elif defined(HPPA) + long pc; + if (upeek(tcp, PT_IAOQ0, &pc) < 0) { + tprints("[????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(MIPS) + long pc; + if (upeek(tcp, REG_EPC, &pc) < 0) { + tprints("[????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(SH) + long pc; + if (upeek(tcp, 4*REG_PC, &pc) < 0) { + tprints("[????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(SH64) + long pc; + if (upeek(tcp, REG_PC, &pc) < 0) { + tprints("[????????????????] "); + return; + } + tprintf("[%08lx] ", pc); +#elif defined(ARM) + tprintf("[%08lx] ", arm_regs.ARM_pc); +#elif defined(AARCH64) + /* tprintf("[%016lx] ", aarch64_regs.regs[???]); */ +#elif defined(AVR32) + tprintf("[%08lx] ", avr32_regs.pc); +#elif defined(BFIN) + long pc; + if (upeek(tcp, PT_PC, &pc) < 0) { + PRINTBADPC; + return; + } + tprintf("[%08lx] ", pc); +#elif defined(CRISV10) + long pc; + if (upeek(tcp, 4*PT_IRP, &pc) < 0) { + PRINTBADPC; + return; + } + tprintf("[%08lx] ", pc); +#elif defined(CRISV32) + long pc; + if (upeek(tcp, 4*PT_ERP, &pc) < 0) { + PRINTBADPC; + return; + } + tprintf("[%08lx] ", pc); +#elif defined(TILE) +# ifdef _LP64 + tprintf("[%016lx] ", (unsigned long) tile_regs.pc); +# else + tprintf("[%08lx] ", (unsigned long) tile_regs.pc); +# endif +#elif defined(OR1K) + tprintf("[%08lx] ", or1k_regs.pc); +#elif defined(METAG) + tprintf("[%08lx] ", metag_regs.pc); +#elif defined(XTENSA) + long pc; + if (upeek(tcp, REG_PC, &pc) < 0) { + PRINTBADPC; + return; + } + tprintf("[%08lx] ", pc); +#endif /* architecture */ +} + +/* Shuffle syscall numbers so that we don't have huge gaps in syscall table. + * The shuffling should be reversible: shuffle_scno(shuffle_scno(n)) == n. + */ +#if defined(ARM) /* So far only ARM needs this */ +static long +shuffle_scno(unsigned long scno) +{ + if (scno <= ARM_LAST_ORDINARY_SYSCALL) + return scno; + + /* __ARM_NR_cmpxchg? Swap with LAST_ORDINARY+1 */ + if (scno == 0x000ffff0) + return ARM_LAST_ORDINARY_SYSCALL+1; + if (scno == ARM_LAST_ORDINARY_SYSCALL+1) + return 0x000ffff0; + + /* Is it ARM specific syscall? + * Swap with [LAST_ORDINARY+2, LAST_ORDINARY+2 + LAST_SPECIAL] range. + */ + if (scno >= 0x000f0000 + && scno <= 0x000f0000 + ARM_LAST_SPECIAL_SYSCALL + ) { + return scno - 0x000f0000 + (ARM_LAST_ORDINARY_SYSCALL+2); + } + if (/* scno >= ARM_LAST_ORDINARY_SYSCALL+2 - always true */ 1 + && scno <= (ARM_LAST_ORDINARY_SYSCALL+2) + ARM_LAST_SPECIAL_SYSCALL + ) { + return scno + 0x000f0000 - (ARM_LAST_ORDINARY_SYSCALL+2); + } + + return scno; +} +#else +# define shuffle_scno(scno) ((long)(scno)) +#endif + +static char* +undefined_scno_name(struct tcb *tcp) +{ + static char buf[sizeof("syscall_%lu") + sizeof(long)*3]; + + sprintf(buf, "syscall_%lu", shuffle_scno(tcp->scno)); + return buf; +} + +#ifndef get_regs +long get_regs_error; + +#if defined(PTRACE_GETREGSET) && defined(NT_PRSTATUS) +static void get_regset(pid_t pid) +{ +/* constant iovec */ +# if defined(ARM) \ + || defined(I386) \ + || defined(METAG) \ + || defined(OR1K) + static struct iovec io = { + .iov_base = &ARCH_REGS_FOR_GETREGSET, + .iov_len = sizeof(ARCH_REGS_FOR_GETREGSET) + }; + get_regs_error = ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &io); + +/* variable iovec */ +# elif defined(X86_64) || defined(X32) + /* x86_io.iov_base = &x86_regs_union; - already is */ + x86_io.iov_len = sizeof(x86_regs_union); + get_regs_error = ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &x86_io); +# elif defined(AARCH64) + /* aarch64_io.iov_base = &arm_regs_union; - already is */ + aarch64_io.iov_len = sizeof(arm_regs_union); + get_regs_error = ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &aarch64_io); +# else +# warning both PTRACE_GETREGSET and NT_PRSTATUS are available but not yet used +# endif +} +#endif /* PTRACE_GETREGSET && NT_PRSTATUS */ + +void +get_regs(pid_t pid) +{ +/* PTRACE_GETREGSET only */ +# if defined(METAG) || defined(OR1K) || defined(X32) || defined(AARCH64) + get_regset(pid); + +/* PTRACE_GETREGS only */ +# elif defined(AVR32) + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &avr32_regs); +# elif defined(TILE) + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &tile_regs); +# elif defined(SPARC) || defined(SPARC64) + get_regs_error = ptrace(PTRACE_GETREGS, pid, (char *)&sparc_regs, 0); + +/* try PTRACE_GETREGSET first, fallback to PTRACE_GETREGS */ +# else +# if defined(PTRACE_GETREGSET) && defined(NT_PRSTATUS) + static int getregset_support; + + if (getregset_support >= 0) { + get_regset(pid); + if (getregset_support > 0) + return; + if (get_regs_error >= 0) { + getregset_support = 1; + return; + } + if (errno == EPERM || errno == ESRCH) + return; + getregset_support = -1; + } +# endif /* PTRACE_GETREGSET && NT_PRSTATUS */ +# if defined(ARM) + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &arm_regs); +# elif defined(I386) + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &i386_regs); +# elif defined(X86_64) + /* Use old method, with unreliable heuristical detection of 32-bitness. */ + x86_io.iov_len = sizeof(x86_64_regs); + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &x86_64_regs); + if (!get_regs_error && x86_64_regs.cs == 0x23) { + x86_io.iov_len = sizeof(i386_regs); + /* + * The order is important: i386_regs and x86_64_regs + * are overlaid in memory! + */ + i386_regs.ebx = x86_64_regs.rbx; + i386_regs.ecx = x86_64_regs.rcx; + i386_regs.edx = x86_64_regs.rdx; + i386_regs.esi = x86_64_regs.rsi; + i386_regs.edi = x86_64_regs.rdi; + i386_regs.ebp = x86_64_regs.rbp; + i386_regs.eax = x86_64_regs.rax; + /* i386_regs.xds = x86_64_regs.ds; unused by strace */ + /* i386_regs.xes = x86_64_regs.es; ditto... */ + /* i386_regs.xfs = x86_64_regs.fs; */ + /* i386_regs.xgs = x86_64_regs.gs; */ + i386_regs.orig_eax = x86_64_regs.orig_rax; + i386_regs.eip = x86_64_regs.rip; + /* i386_regs.xcs = x86_64_regs.cs; */ + /* i386_regs.eflags = x86_64_regs.eflags; */ + i386_regs.esp = x86_64_regs.rsp; + /* i386_regs.xss = x86_64_regs.ss; */ + } +# else +# error unhandled architecture +# endif /* ARM || I386 || X86_64 */ +# endif +} +#endif /* !get_regs */ + +/* Returns: + * 0: "ignore this ptrace stop", bail out of trace_syscall_entering() silently. + * 1: ok, continue in trace_syscall_entering(). + * other: error, trace_syscall_entering() should print error indicator + * ("????" etc) and bail out. + */ +static int +get_scno(struct tcb *tcp) +{ + long scno = 0; + +#if defined(S390) || defined(S390X) + if (upeek(tcp, PT_GPR2, &syscall_mode) < 0) + return -1; + + if (syscall_mode != -ENOSYS) { + /* + * Since kernel version 2.5.44 the scno gets passed in gpr2. + */ + scno = syscall_mode; + } else { + /* + * Old style of "passing" the scno via the SVC instruction. + */ + long psw; + long opcode, offset_reg, tmp; + void *svc_addr; + static const int gpr_offset[16] = { + PT_GPR0, PT_GPR1, PT_ORIGGPR2, PT_GPR3, + PT_GPR4, PT_GPR5, PT_GPR6, PT_GPR7, + PT_GPR8, PT_GPR9, PT_GPR10, PT_GPR11, + PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15 + }; + + if (upeek(tcp, PT_PSWADDR, &psw) < 0) + return -1; + errno = 0; + opcode = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)(psw - sizeof(long)), 0); + if (errno) { + perror_msg("peektext(psw-oneword)"); + return -1; + } + + /* + * We have to check if the SVC got executed directly or via an + * EXECUTE instruction. In case of EXECUTE it is necessary to do + * instruction decoding to derive the system call number. + * Unfortunately the opcode sizes of EXECUTE and SVC are differently, + * so that this doesn't work if a SVC opcode is part of an EXECUTE + * opcode. Since there is no way to find out the opcode size this + * is the best we can do... + */ + if ((opcode & 0xff00) == 0x0a00) { + /* SVC opcode */ + scno = opcode & 0xff; + } + else { + /* SVC got executed by EXECUTE instruction */ + + /* + * Do instruction decoding of EXECUTE. If you really want to + * understand this, read the Principles of Operations. + */ + svc_addr = (void *) (opcode & 0xfff); + + tmp = 0; + offset_reg = (opcode & 0x000f0000) >> 16; + if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0)) + return -1; + svc_addr += tmp; + + tmp = 0; + offset_reg = (opcode & 0x0000f000) >> 12; + if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0)) + return -1; + svc_addr += tmp; + + scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, svc_addr, 0); + if (errno) + return -1; +# if defined(S390X) + scno >>= 48; +# else + scno >>= 16; +# endif + tmp = 0; + offset_reg = (opcode & 0x00f00000) >> 20; + if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0)) + return -1; + + scno = (scno | tmp) & 0xff; + } + } +#elif defined(POWERPC) + if (upeek(tcp, sizeof(unsigned long)*PT_R0, &scno) < 0) + return -1; +# ifdef POWERPC64 + /* TODO: speed up strace by not doing this at every syscall. + * We only need to do it after execve. + */ + int currpers; + long val; + + /* Check for 64/32 bit mode. */ + if (upeek(tcp, sizeof(unsigned long)*PT_MSR, &val) < 0) + return -1; + /* SF is bit 0 of MSR */ + if (val < 0) + currpers = 0; + else + currpers = 1; + update_personality(tcp, currpers); +# endif +#elif defined(AVR32) + scno = avr32_regs.r8; +#elif defined(BFIN) + if (upeek(tcp, PT_ORIG_P0, &scno)) + return -1; +#elif defined(I386) + scno = i386_regs.orig_eax; +#elif defined(X86_64) || defined(X32) +# ifndef __X32_SYSCALL_BIT +# define __X32_SYSCALL_BIT 0x40000000 +# endif + int currpers; +# if 1 + /* GETREGSET of NT_PRSTATUS tells us regset size, + * which unambiguously detects i386. + * + * Linux kernel distinguishes x86-64 and x32 processes + * solely by looking at __X32_SYSCALL_BIT: + * arch/x86/include/asm/compat.h::is_x32_task(): + * if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT) + * return true; + */ + if (x86_io.iov_len == sizeof(i386_regs)) { + scno = i386_regs.orig_eax; + currpers = 1; + } else { + scno = x86_64_regs.orig_rax; + currpers = 0; + if (scno & __X32_SYSCALL_BIT) { + scno -= __X32_SYSCALL_BIT; + currpers = 2; + } + } +# elif 0 + /* cs = 0x33 for long mode (native 64 bit and x32) + * cs = 0x23 for compatibility mode (32 bit) + * ds = 0x2b for x32 mode (x86-64 in 32 bit) + */ + scno = x86_64_regs.orig_rax; + switch (x86_64_regs.cs) { + case 0x23: currpers = 1; break; + case 0x33: + if (x86_64_regs.ds == 0x2b) { + currpers = 2; + scno &= ~__X32_SYSCALL_BIT; + } else + currpers = 0; + break; + default: + fprintf(stderr, "Unknown value CS=0x%08X while " + "detecting personality of process " + "PID=%d\n", (int)x86_64_regs.cs, tcp->pid); + currpers = current_personality; + break; + } +# elif 0 + /* This version analyzes the opcode of a syscall instruction. + * (int 0x80 on i386 vs. syscall on x86-64) + * It works, but is too complicated, and strictly speaking, unreliable. + */ + unsigned long call, rip = x86_64_regs.rip; + /* sizeof(syscall) == sizeof(int 0x80) == 2 */ + rip -= 2; + errno = 0; + call = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)rip, (char *)0); + if (errno) + fprintf(stderr, "ptrace_peektext failed: %s\n", + strerror(errno)); + switch (call & 0xffff) { + /* x86-64: syscall = 0x0f 0x05 */ + case 0x050f: currpers = 0; break; + /* i386: int 0x80 = 0xcd 0x80 */ + case 0x80cd: currpers = 1; break; + default: + currpers = current_personality; + fprintf(stderr, + "Unknown syscall opcode (0x%04X) while " + "detecting personality of process " + "PID=%d\n", (int)call, tcp->pid); + break; + } +# endif + +# ifdef X32 + /* If we are built for a x32 system, then personality 0 is x32 + * (not x86_64), and stracing of x86_64 apps is not supported. + * Stracing of i386 apps is still supported. + */ + if (currpers == 0) { + fprintf(stderr, "syscall_%lu(...) in unsupported " + "64-bit mode of process PID=%d\n", + scno, tcp->pid); + return 0; + } + currpers &= ~2; /* map 2,1 to 0,1 */ +# endif + update_personality(tcp, currpers); +#elif defined(IA64) +# define IA64_PSR_IS ((long)1 << 34) + long psr; + if (upeek(tcp, PT_CR_IPSR, &psr) >= 0) + ia32 = (psr & IA64_PSR_IS) != 0; + if (ia32) { + if (upeek(tcp, PT_R1, &scno) < 0) + return -1; + } else { + if (upeek(tcp, PT_R15, &scno) < 0) + return -1; + } +#elif defined(AARCH64) + switch (aarch64_io.iov_len) { + case sizeof(aarch64_regs): + /* We are in 64-bit mode */ + scno = aarch64_regs.regs[8]; + update_personality(tcp, 1); + break; + case sizeof(arm_regs): + /* We are in 32-bit mode */ + scno = arm_regs.ARM_r7; + update_personality(tcp, 0); + break; + } +#elif defined(ARM) + if (arm_regs.ARM_ip != 0) { + /* It is not a syscall entry */ + fprintf(stderr, "pid %d stray syscall exit\n", tcp->pid); + tcp->flags |= TCB_INSYSCALL; + return 0; + } + /* Note: we support only 32-bit CPUs, not 26-bit */ + + if (arm_regs.ARM_cpsr & 0x20) { + /* Thumb mode */ + scno = arm_regs.ARM_r7; + } else { + /* ARM mode */ + errno = 0; + scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, (void *)(arm_regs.ARM_pc - 4), NULL); + if (errno) + return -1; + + /* EABI syscall convention? */ + if (scno == 0xef000000) { + scno = arm_regs.ARM_r7; /* yes */ + } else { + if ((scno & 0x0ff00000) != 0x0f900000) { + fprintf(stderr, "pid %d unknown syscall trap 0x%08lx\n", + tcp->pid, scno); + return -1; + } + /* Fixup the syscall number */ + scno &= 0x000fffff; + } + } + + scno = shuffle_scno(scno); +#elif defined(M68K) + if (upeek(tcp, 4*PT_ORIG_D0, &scno) < 0) + return -1; +#elif defined(LINUX_MIPSN32) + unsigned long long regs[38]; + + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) ®s) < 0) + return -1; + mips_a3 = regs[REG_A3]; + mips_r2 = regs[REG_V0]; + + scno = mips_r2; + if (!SCNO_IN_RANGE(scno)) { + if (mips_a3 == 0 || mips_a3 == -1) { + if (debug_flag) + fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno); + return 0; + } + } +#elif defined(MIPS) + if (upeek(tcp, REG_A3, &mips_a3) < 0) + return -1; + if (upeek(tcp, REG_V0, &scno) < 0) + return -1; + + if (!SCNO_IN_RANGE(scno)) { + if (mips_a3 == 0 || mips_a3 == -1) { + if (debug_flag) + fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno); + return 0; + } + } +#elif defined(ALPHA) + if (upeek(tcp, REG_A3, &alpha_a3) < 0) + return -1; + if (upeek(tcp, REG_R0, &scno) < 0) + return -1; + + /* + * 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 (debug_flag) + fprintf(stderr, "stray syscall exit: r0 = %ld\n", scno); + return 0; + } + } +#elif defined(SPARC) || defined(SPARC64) + /* Disassemble the syscall trap. */ + /* Retrieve the syscall trap instruction. */ + unsigned long trap; + errno = 0; +# if defined(SPARC64) + trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)sparc_regs.tpc, 0); + trap >>= 32; +# else + trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)sparc_regs.pc, 0); +# endif + if (errno) + return -1; + + /* Disassemble the trap to see what personality to use. */ + switch (trap) { + case 0x91d02010: + /* Linux/SPARC syscall trap. */ + update_personality(tcp, 0); + break; + case 0x91d0206d: + /* Linux/SPARC64 syscall trap. */ + update_personality(tcp, 2); + break; + case 0x91d02000: + /* SunOS syscall trap. (pers 1) */ + fprintf(stderr, "syscall: SunOS no support\n"); + return -1; + case 0x91d02008: + /* Solaris 2.x syscall trap. (per 2) */ + update_personality(tcp, 1); + break; + case 0x91d02009: + /* NetBSD/FreeBSD syscall trap. */ + fprintf(stderr, "syscall: NetBSD/FreeBSD not supported\n"); + return -1; + case 0x91d02027: + /* Solaris 2.x gettimeofday */ + update_personality(tcp, 1); + break; + default: +# if defined(SPARC64) + fprintf(stderr, "syscall: unknown syscall trap %08lx %016lx\n", trap, sparc_regs.tpc); +# else + fprintf(stderr, "syscall: unknown syscall trap %08lx %08lx\n", trap, sparc_regs.pc); +# endif + return -1; + } + + /* Extract the system call number from the registers. */ + if (trap == 0x91d02027) + scno = 156; + else + scno = sparc_regs.u_regs[U_REG_G1]; + if (scno == 0) { + scno = sparc_regs.u_regs[U_REG_O0]; + memmove(&sparc_regs.u_regs[U_REG_O0], &sparc_regs.u_regs[U_REG_O1], 7*sizeof(sparc_regs.u_regs[0])); + } +#elif defined(HPPA) + if (upeek(tcp, PT_GR20, &scno) < 0) + return -1; +#elif defined(SH) + /* + * In the new syscall ABI, the system call number is in R3. + */ + if (upeek(tcp, 4*(REG_REG0+3), &scno) < 0) + return -1; + + if (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); + if (debug_flag) + fprintf(stderr, + "Detected glibc bug: bogus system call" + " number = %ld, correcting to %ld\n", + scno, + correct_scno); + scno = correct_scno; + } +#elif defined(SH64) + if (upeek(tcp, REG_SYSCALL, &scno) < 0) + return -1; + scno &= 0xFFFF; +#elif defined(CRISV10) || defined(CRISV32) + if (upeek(tcp, 4*PT_R9, &scno) < 0) + return -1; +#elif defined(TILE) + int currpers; + scno = tile_regs.regs[10]; +# ifdef __tilepro__ + currpers = 1; +# else +# ifndef PT_FLAGS_COMPAT +# define PT_FLAGS_COMPAT 0x10000 /* from Linux 3.8 on */ +# endif + if (tile_regs.flags & PT_FLAGS_COMPAT) + currpers = 1; + else + currpers = 0; +# endif + update_personality(tcp, currpers); +#elif defined(MICROBLAZE) + if (upeek(tcp, 0, &scno) < 0) + return -1; +#elif defined(OR1K) + scno = or1k_regs.gpr[11]; +#elif defined(METAG) + scno = metag_regs.dx[0][1]; /* syscall number in D1Re0 (D1.0) */ +#elif defined(XTENSA) + if (upeek(tcp, SYSCALL_NR, &scno) < 0) + return -1; +#endif + + tcp->scno = scno; + if (SCNO_IS_VALID(tcp->scno)) { + tcp->s_ent = &sysent[scno]; + tcp->qual_flg = qual_flags[scno]; + } else { + static const struct_sysent unknown = { + .nargs = MAX_ARGS, + .sys_flags = 0, + .sys_func = printargs, + .sys_name = "unknown", /* not used */ + }; + tcp->s_ent = &unknown; + tcp->qual_flg = UNDEFINED_SCNO | QUAL_RAW | DEFAULT_QUAL_FLAGS; + } + return 1; +} + +/* Called at each syscall entry. + * Returns: + * 0: "ignore this ptrace stop", bail out of trace_syscall_entering() silently. + * 1: ok, continue in trace_syscall_entering(). + * other: error, trace_syscall_entering() should print error indicator + * ("????" etc) and bail out. + */ +static int +syscall_fixup_on_sysenter(struct tcb *tcp) +{ + /* A common case of "not a syscall entry" is post-execve SIGTRAP */ +#if defined(I386) + if (i386_regs.eax != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (eax = %ld)\n", i386_regs.eax); + return 0; + } +#elif defined(X86_64) || defined(X32) + { + long rax; + if (x86_io.iov_len == sizeof(i386_regs)) { + /* Sign extend from 32 bits */ + rax = (int32_t)i386_regs.eax; + } else { + /* Note: in X32 build, this truncates 64 to 32 bits */ + rax = x86_64_regs.rax; + } + if (rax != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (rax = %ld)\n", rax); + return 0; + } + } +#elif defined(S390) || defined(S390X) + /* TODO: we already fetched PT_GPR2 in get_scno + * and stored it in syscall_mode, reuse it here + * instead of re-fetching? + */ + if (upeek(tcp, PT_GPR2, &gpr2) < 0) + return -1; + if (syscall_mode != -ENOSYS) + syscall_mode = tcp->scno; + if (gpr2 != syscall_mode) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (gpr2 = %ld)\n", gpr2); + return 0; + } +#elif defined(M68K) + /* TODO? Eliminate upeek's in arches below like we did in x86 */ + if (upeek(tcp, 4*PT_D0, &m68k_d0) < 0) + return -1; + if (m68k_d0 != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (d0 = %ld)\n", m68k_d0); + return 0; + } +#elif defined(IA64) + if (upeek(tcp, PT_R10, &ia64_r10) < 0) + return -1; + if (upeek(tcp, PT_R8, &ia64_r8) < 0) + return -1; + if (ia32 && ia64_r8 != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (r8 = %ld)\n", ia64_r8); + return 0; + } +#elif defined(CRISV10) || defined(CRISV32) + if (upeek(tcp, 4*PT_R10, &cris_r10) < 0) + return -1; + if (cris_r10 != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (r10 = %ld)\n", cris_r10); + return 0; + } +#elif defined(MICROBLAZE) + if (upeek(tcp, 3 * 4, µblaze_r3) < 0) + return -1; + if (microblaze_r3 != -ENOSYS) { + if (debug_flag) + fprintf(stderr, "not a syscall entry (r3 = %ld)\n", microblaze_r3); + return 0; + } +#endif + return 1; +} + +static void +internal_fork(struct tcb *tcp) +{ +#if defined S390 || defined S390X || defined CRISV10 || defined CRISV32 +# define ARG_FLAGS 1 +#else +# define ARG_FLAGS 0 +#endif +#ifndef CLONE_UNTRACED +# define CLONE_UNTRACED 0x00800000 +#endif + if ((ptrace_setoptions + & (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK)) + == (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK)) + return; + + if (!followfork) + return; + + if (entering(tcp)) { + /* + * We won't see the new child if clone is called with + * CLONE_UNTRACED, so we keep the same logic with that option + * and don't trace it. + */ + if ((tcp->s_ent->sys_func == sys_clone) + && (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED) + ) + return; + setbpt(tcp); + } else { + if (tcp->flags & TCB_BPTSET) + clearbpt(tcp); + } +} + +#if defined(TCB_WAITEXECVE) +static void +internal_exec(struct tcb *tcp) +{ + /* Maybe we have post-execve SIGTRAP suppressed? */ + if (ptrace_setoptions & PTRACE_O_TRACEEXEC) + return; /* yes, no need to do anything */ + + if (exiting(tcp) && syserror(tcp)) + /* Error in execve, no post-execve SIGTRAP expected */ + tcp->flags &= ~TCB_WAITEXECVE; + else + tcp->flags |= TCB_WAITEXECVE; +} +#endif + +static void +syscall_fixup_for_fork_exec(struct tcb *tcp) +{ + /* + * We must always trace a few critical system calls in order to + * correctly support following forks in the presence of tracing + * qualifiers. + */ + int (*func)(); + + func = tcp->s_ent->sys_func; + + if ( sys_fork == func + || sys_vfork == func + || sys_clone == func + ) { + internal_fork(tcp); + return; + } + +#if defined(TCB_WAITEXECVE) + if ( sys_execve == func +# if defined(SPARC) || defined(SPARC64) + || sys_execv == func +# endif + ) { + internal_exec(tcp); + return; + } +#endif +} + +/* Return -1 on error or 1 on success (never 0!) */ +static int +get_syscall_args(struct tcb *tcp) +{ + int i, nargs; + + nargs = tcp->s_ent->nargs; + +#if defined(S390) || defined(S390X) + for (i = 0; i < nargs; ++i) + if (upeek(tcp, i==0 ? PT_ORIGGPR2 : PT_GPR2 + i*sizeof(long), &tcp->u_arg[i]) < 0) + return -1; +#elif defined(ALPHA) + for (i = 0; i < nargs; ++i) + if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0) + return -1; +#elif defined(IA64) + if (!ia32) { + unsigned long *out0, cfm, sof, sol; + long rbs_end; + /* be backwards compatible with kernel < 2.4.4... */ +# ifndef PT_RBS_END +# define PT_RBS_END PT_AR_BSP +# endif + + if (upeek(tcp, PT_RBS_END, &rbs_end) < 0) + return -1; + if (upeek(tcp, PT_CFM, (long *) &cfm) < 0) + return -1; + + sof = (cfm >> 0) & 0x7f; + sol = (cfm >> 7) & 0x7f; + out0 = ia64_rse_skip_regs((unsigned long *) rbs_end, -sof + sol); + + for (i = 0; i < nargs; ++i) { + if (umoven(tcp, (unsigned long) ia64_rse_skip_regs(out0, i), + sizeof(long), (char *) &tcp->u_arg[i]) < 0) + return -1; + } + } else { + static const int argreg[MAX_ARGS] = { PT_R11 /* EBX = out0 */, + PT_R9 /* ECX = out1 */, + PT_R10 /* EDX = out2 */, + PT_R14 /* ESI = out3 */, + PT_R15 /* EDI = out4 */, + PT_R13 /* EBP = out5 */}; + + for (i = 0; i < nargs; ++i) { + if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0) + return -1; + /* truncate away IVE sign-extension */ + tcp->u_arg[i] &= 0xffffffff; + } + } +#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64) + /* N32 and N64 both use up to six registers. */ + unsigned long long regs[38]; + + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) ®s) < 0) + return -1; + + for (i = 0; i < nargs; ++i) { + tcp->u_arg[i] = regs[REG_A0 + i]; +# if defined(LINUX_MIPSN32) + tcp->ext_arg[i] = regs[REG_A0 + i]; +# endif + } +#elif defined(MIPS) + if (nargs > 4) { + long sp; + + if (upeek(tcp, REG_SP, &sp) < 0) + return -1; + for (i = 0; i < 4; ++i) + if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0) + return -1; + umoven(tcp, sp + 16, (nargs - 4) * sizeof(tcp->u_arg[0]), + (char *)(tcp->u_arg + 4)); + } else { + for (i = 0; i < nargs; ++i) + if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0) + return -1; + } +#elif defined(POWERPC) +# ifndef PT_ORIG_R3 +# define PT_ORIG_R3 34 +# endif + for (i = 0; i < nargs; ++i) { + if (upeek(tcp, (i==0) ? + (sizeof(unsigned long) * PT_ORIG_R3) : + ((i+PT_R3) * sizeof(unsigned long)), + &tcp->u_arg[i]) < 0) + return -1; + } +#elif defined(SPARC) || defined(SPARC64) + for (i = 0; i < nargs; ++i) + tcp->u_arg[i] = sparc_regs.u_regs[U_REG_O0 + i]; +#elif defined(HPPA) + for (i = 0; i < nargs; ++i) + if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0) + return -1; +#elif defined(ARM) || defined(AARCH64) +# if defined(AARCH64) + if (tcp->currpers == 1) + for (i = 0; i < nargs; ++i) + tcp->u_arg[i] = aarch64_regs.regs[i]; + else +# endif + for (i = 0; i < nargs; ++i) + tcp->u_arg[i] = arm_regs.uregs[i]; +#elif defined(AVR32) + (void)i; + (void)nargs; + tcp->u_arg[0] = avr32_regs.r12; + tcp->u_arg[1] = avr32_regs.r11; + tcp->u_arg[2] = avr32_regs.r10; + tcp->u_arg[3] = avr32_regs.r9; + tcp->u_arg[4] = avr32_regs.r5; + tcp->u_arg[5] = avr32_regs.r3; +#elif defined(BFIN) + static const int argreg[MAX_ARGS] = { PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 }; + + for (i = 0; i < nargs; ++i) + if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0) + return -1; +#elif defined(SH) + static const int syscall_regs[MAX_ARGS] = { + 4 * (REG_REG0+4), 4 * (REG_REG0+5), 4 * (REG_REG0+6), + 4 * (REG_REG0+7), 4 * (REG_REG0 ), 4 * (REG_REG0+1) + }; + + for (i = 0; i < nargs; ++i) + if (upeek(tcp, syscall_regs[i], &tcp->u_arg[i]) < 0) + return -1; +#elif defined(SH64) + int i; + /* Registers used by SH5 Linux system calls for parameters */ + static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 }; + + for (i = 0; i < nargs; ++i) + if (upeek(tcp, REG_GENERAL(syscall_regs[i]), &tcp->u_arg[i]) < 0) + return -1; +#elif defined(I386) + (void)i; + (void)nargs; + tcp->u_arg[0] = i386_regs.ebx; + tcp->u_arg[1] = i386_regs.ecx; + tcp->u_arg[2] = i386_regs.edx; + tcp->u_arg[3] = i386_regs.esi; + tcp->u_arg[4] = i386_regs.edi; + tcp->u_arg[5] = i386_regs.ebp; +#elif defined(X86_64) || defined(X32) + (void)i; + (void)nargs; + 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 + } else { + /* i386 ABI */ + /* Zero-extend from 32 bits */ + /* Use widen_to_long(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; + } +#elif defined(MICROBLAZE) + for (i = 0; i < nargs; ++i) + if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0) + return -1; +#elif defined(CRISV10) || defined(CRISV32) + static const int crisregs[MAX_ARGS] = { + 4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12, + 4*PT_R13 , 4*PT_MOF, 4*PT_SRP + }; + + for (i = 0; i < nargs; ++i) + if (upeek(tcp, crisregs[i], &tcp->u_arg[i]) < 0) + return -1; +#elif defined(TILE) + for (i = 0; i < nargs; ++i) + tcp->u_arg[i] = tile_regs.regs[i]; +#elif defined(M68K) + for (i = 0; i < nargs; ++i) + if (upeek(tcp, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0) + return -1; +#elif defined(OR1K) + (void)nargs; + for (i = 0; i < 6; ++i) + tcp->u_arg[i] = or1k_regs.gpr[3 + i]; +#elif defined(METAG) + for (i = 0; i < nargs; i++) + /* arguments go backwards from D1Ar1 (D1.3) */ + tcp->u_arg[i] = ((unsigned long *)&metag_regs.dx[3][1])[-i]; +#elif defined(XTENSA) + /* arg0: a6, arg1: a3, arg2: a4, arg3: a5, arg4: a8, arg5: a9 */ + static const int xtensaregs[MAX_ARGS] = { 6, 3, 4, 5, 8, 9 }; + for (i = 0; i < nargs; ++i) + if (upeek(tcp, REG_A_BASE + xtensaregs[i], &tcp->u_arg[i]) < 0) + return -1; +#else /* Other architecture (32bits specific) */ + for (i = 0; i < nargs; ++i) + if (upeek(tcp, i*4, &tcp->u_arg[i]) < 0) + return -1; +#endif + return 1; +} + +static void +print_normalized_addr(struct tcb* tcp, unsigned long addr); + +extern int output_stacktraces; +extern int use_libunwind; +#ifdef LIBUNWIND +extern unw_addr_space_t libunwind_as; + +// use libunwind to unwind the stack and print a backtrace: +static void +print_libunwind_backtrace(struct tcb* tcp) +{ + unw_word_t ip; + int n = 0, ret; + unw_cursor_t c; + + EXITIF(unw_init_remote(&c, libunwind_as, tcp->libunwind_ui) < 0); + do { + EXITIF(unw_get_reg(&c, UNW_REG_IP, &ip) < 0); + + print_normalized_addr(tcp, ip); + + ret = unw_step(&c); + + if (++n > 255) { + /* guard against bad unwind info in old libraries... */ + fprintf(stderr, "libunwind warning: too deeply nested---assuming bogus unwind\n"); + break; + } + } while (ret > 0); +} + +#endif + +static void +print_i386_ebp_backtrace(struct tcb* tcp) +{ + struct user_regs_struct cur_regs; + EXITIF(ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)&cur_regs) < 0); + + // Crawl up the stack using frame pointers, which is relatively FAST but + // requires all user and library code to be compiled with a frame pointer + + // Note that personality_wordsize[current_personality] is the wordsize for + // the target process (e.g., 4 bytes or 8 bytes) + + // first print your current instruction pointer ... +#if defined (I386) + print_normalized_addr(tcp, (unsigned long)cur_regs.eip); +#elif defined (X86_64) + print_normalized_addr(tcp, (unsigned long)cur_regs.rip); +#endif + + // then crawl up the stack ... +#if defined (I386) + unsigned long cur_ebp = (unsigned long)cur_regs.ebp; +#elif defined (X86_64) + unsigned long cur_ebp = (unsigned long)cur_regs.rbp; +#endif + unsigned long retaddr = 0; + int ret = 0; + while (ret == 0 && cur_ebp != 0) { + // return address is always at EBP/RBP + + ret = umoven(tcp, + (long)cur_ebp + current_wordsize, + current_wordsize, + (void*)&retaddr); + + print_normalized_addr(tcp, retaddr); + + // the current EBP/RBP points to the EBP/RBP of the next frame up on the stack + ret = umoven(tcp, (long)cur_ebp, current_wordsize, (void*)&cur_ebp); + } +} + +static void +output_stacktrace(int really_output_stacktrace, struct tcb* tcp) +{ + if(really_output_stacktrace == 0) { + tprintstackinfo("[]\n"); + return; + } + + // walk up the stack and print out return addresses: + // personality_wordsize[current_personality] is the wordsize for the target process + + tprintstackinfo("[ "); // opening brace for stack trace + + // caching for efficiency ... + if (!tcp->mmap_cache) { + alloc_mmap_cache(tcp); + } + + /* + #if defined (I386) + printf("defined I386\n"); + #elif defined (X86_64) + printf("defined X86_64\n"); + #endif + + # ifdef LIBUNWIND + printf("defined LIBUNWIND\n"); + #else + printf("undefined LIBUNWIND\n"); + #endif + + if (use_libunwind) { + printf("use_libunwind\n"); + } else { + printf("no use_libunwind\n"); + } + + if (IS_32BIT_EMU) { + printf("32BIT_EMU\n"); + } else { + printf("not 32BIT_EMU\n"); + } + */ + +#if defined (I386) + +# ifdef LIBUNWIND + if (use_libunwind) { + // use libunwind to unwind the stack, which works even for code compiled + // without a frame pointer, but is relatively SLOW + print_libunwind_backtrace(tcp); + } else { +# endif + print_i386_ebp_backtrace(tcp); +# ifdef LIBUNWIND + } +# endif + +#elif defined (X86_64) + +# ifdef LIBUNWIND + // a 64-bit version of libunwind can't parse 32-bit binaries, so we MUST + // resort to using stack crawling when tracking a 32-bit binary: + if (IS_32BIT_EMU || !use_libunwind) { +# endif + print_i386_ebp_backtrace(tcp); +# ifdef LIBUNWIND + } else if (use_libunwind) { + // use libunwind + print_libunwind_backtrace(tcp); + } +# endif + +#else +# error "Unknown architecture (not I386 or X86_64)" +#endif + + tprintstackinfo("]\n"); // closing brace for stack trace +} + +static int +trace_syscall_entering(struct tcb *tcp) +{ + int res, scno_good; + +#if defined TCB_WAITEXECVE + if (tcp->flags & TCB_WAITEXECVE) { + /* This is the post-execve SIGTRAP. */ + tcp->flags &= ~TCB_WAITEXECVE; + return 0; + } +#endif + + scno_good = res = (get_regs_error ? -1 : get_scno(tcp)); + if (res == 0) + return res; + if (res == 1) { + res = syscall_fixup_on_sysenter(tcp); + if (res == 0) + return res; + if (res == 1) + res = get_syscall_args(tcp); + } + + if (res != 1) { + printleader(tcp); + if (scno_good != 1) + tprints("????" /* anti-trigraph gap */ "("); + else if (tcp->qual_flg & UNDEFINED_SCNO) + tprintf("%s(", undefined_scno_name(tcp)); + else + tprintf("%s(", tcp->s_ent->sys_name); + /* + * " " will be added later by the code which + * detects ptrace errors. + */ + goto ret; + } + + if ( sys_execve == tcp->s_ent->sys_func +# if defined(SPARC) || defined(SPARC64) + || sys_execv == tcp->s_ent->sys_func +# endif + ) { + hide_log_until_execve = 0; + } + +#if defined(SYS_socket_subcall) || defined(SYS_ipc_subcall) + while (1) { +# ifdef SYS_socket_subcall + if (tcp->s_ent->sys_func == sys_socketcall) { + decode_socket_subcall(tcp); + break; + } +# endif +# ifdef SYS_ipc_subcall + if (tcp->s_ent->sys_func == sys_ipc) { + decode_ipc_subcall(tcp); + break; + } +# endif + break; + } +#endif + + if (need_fork_exec_workarounds) + syscall_fixup_for_fork_exec(tcp); + + if (!(tcp->qual_flg & QUAL_TRACE) + || (tracing_paths && !pathtrace_match(tcp)) + ) { + tcp->flags |= TCB_INSYSCALL | TCB_FILTERED; + return 0; + } + + tcp->flags &= ~TCB_FILTERED; + + if (cflag == CFLAG_ONLY_STATS || hide_log_until_execve) { + res = 0; + goto ret; + } + + printleader(tcp); + int really_output_stacktrace = 1; + if (tcp->qual_flg & UNDEFINED_SCNO) { + tprintf("%s(", undefined_scno_name(tcp)); + really_output_stacktrace = 0; + } else { + tprintf("%s(", tcp->s_ent->sys_name); + if((strcmp("fstat", tcp->s_ent->sys_name) == 0) || + (strcmp("mmap", tcp->s_ent->sys_name) == 0) || + (strcmp("munmap", tcp->s_ent->sys_name) == 0) || + (strcmp("gettid", tcp->s_ent->sys_name) == 0) || + (strcmp("close", tcp->s_ent->sys_name) == 0) || + (strcmp("gettid", tcp->s_ent->sys_name) == 0) || + (strcmp("lseek", tcp->s_ent->sys_name) == 0) || + (strcmp("rt_sigprocmask", tcp->s_ent->sys_name) == 0) || + (strcmp("gettimeofday", tcp->s_ent->sys_name) == 0) || + (strcmp("stat", tcp->s_ent->sys_name) == 0) || + (strcmp("mprotect", tcp->s_ent->sys_name) == 0) + ) { + really_output_stacktrace = 0; + } + } + + if (output_stacktraces) { + output_stacktrace(really_output_stacktrace, tcp); + } + + if ((tcp->qual_flg & QUAL_RAW) && tcp->s_ent->sys_func != sys_exit) + res = printargs(tcp); + else + res = tcp->s_ent->sys_func(tcp); + + fflush(tcp->outf); + ret: + tcp->flags |= TCB_INSYSCALL; + /* Measure the entrance time as late as possible to avoid errors. */ + if (Tflag || cflag) + gettimeofday(&tcp->etime, NULL); + return res; +} + +/* Returns: + * 1: ok, continue in trace_syscall_exiting(). + * -1: error, trace_syscall_exiting() should print error indicator + * ("????" etc) and bail out. + */ +static int +get_syscall_result(struct tcb *tcp) +{ +#if defined(S390) || defined(S390X) + if (upeek(tcp, PT_GPR2, &gpr2) < 0) + return -1; +#elif defined(POWERPC) +# define SO_MASK 0x10000000 + { + long flags; + if (upeek(tcp, sizeof(unsigned long)*PT_CCR, &flags) < 0) + return -1; + if (upeek(tcp, sizeof(unsigned long)*PT_R3, &ppc_result) < 0) + return -1; + if (flags & SO_MASK) + ppc_result = -ppc_result; + } +#elif defined(AVR32) + /* already done by get_regs */ +#elif defined(BFIN) + if (upeek(tcp, PT_R0, &bfin_r0) < 0) + return -1; +#elif defined(I386) + /* already done by get_regs */ +#elif defined(X86_64) || defined(X32) + /* already done by get_regs */ +#elif defined(IA64) +# define IA64_PSR_IS ((long)1 << 34) + long psr; + if (upeek(tcp, PT_CR_IPSR, &psr) >= 0) + ia32 = (psr & IA64_PSR_IS) != 0; + if (upeek(tcp, PT_R8, &ia64_r8) < 0) + return -1; + if (upeek(tcp, PT_R10, &ia64_r10) < 0) + return -1; +#elif defined(ARM) + /* already done by get_regs */ +#elif defined(AARCH64) + /* register reading already done by get_regs */ + + /* Used to do this, but we did it on syscall entry already: */ + /* We are in 64-bit mode (personality 1) if register struct is aarch64_regs, + * else it's personality 0. + */ + /*update_personality(tcp, aarch64_io.iov_len == sizeof(aarch64_regs));*/ +#elif defined(M68K) + if (upeek(tcp, 4*PT_D0, &m68k_d0) < 0) + return -1; +#elif defined(LINUX_MIPSN32) + unsigned long long regs[38]; + + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) ®s) < 0) + return -1; + mips_a3 = regs[REG_A3]; + mips_r2 = regs[REG_V0]; +#elif defined(MIPS) + if (upeek(tcp, REG_A3, &mips_a3) < 0) + return -1; + if (upeek(tcp, REG_V0, &mips_r2) < 0) + return -1; +#elif defined(ALPHA) + if (upeek(tcp, REG_A3, &alpha_a3) < 0) + return -1; + if (upeek(tcp, REG_R0, &alpha_r0) < 0) + return -1; +#elif defined(SPARC) || defined(SPARC64) + /* already done by get_regs */ +#elif defined(HPPA) + if (upeek(tcp, PT_GR28, &hppa_r28) < 0) + return -1; +#elif defined(SH) + /* new syscall ABI returns result in R0 */ + if (upeek(tcp, 4*REG_REG0, (long *)&sh_r0) < 0) + return -1; +#elif defined(SH64) + /* ABI defines result returned in r9 */ + if (upeek(tcp, REG_GENERAL(9), (long *)&sh64_r9) < 0) + return -1; +#elif defined(CRISV10) || defined(CRISV32) + if (upeek(tcp, 4*PT_R10, &cris_r10) < 0) + return -1; +#elif defined(TILE) + /* already done by get_regs */ +#elif defined(MICROBLAZE) + if (upeek(tcp, 3 * 4, µblaze_r3) < 0) + return -1; +#elif defined(OR1K) + /* already done by get_regs */ +#elif defined(METAG) + /* already done by get_regs */ +#elif defined(XTENSA) + if (upeek(tcp, REG_A_BASE + 2, &xtensa_a2) < 0) + return -1; +#endif + return 1; +} + +/* Called at each syscall exit */ +static void +syscall_fixup_on_sysexit(struct tcb *tcp) +{ +#if defined(S390) || defined(S390X) + if (syscall_mode != -ENOSYS) + syscall_mode = tcp->scno; + if ((tcp->flags & TCB_WAITEXECVE) + && (gpr2 == -ENOSYS || gpr2 == tcp->scno)) { + /* + * Return from execve. + * Fake a return value of zero. We leave the TCB_WAITEXECVE + * flag set for the post-execve SIGTRAP to see and reset. + */ + gpr2 = 0; + } +#endif +} + +/* + * Check the syscall return value register value for whether it is + * a negated errno code indicating an error, or a success return value. + */ +static inline int +is_negated_errno(unsigned long int val) +{ + unsigned long int max = -(long int) nerrnos; +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize < sizeof(val)) { + val = (unsigned int) val; + max = (unsigned int) max; + } +#endif + return val > max; +} + +#if defined(X32) +static inline int +is_negated_errno_x32(unsigned long long val) +{ + unsigned long long max = -(long long) nerrnos; + /* + * current_wordsize is 4 even in personality 0 (native X32) + * but truncation _must not_ be done in it. + * can't check current_wordsize here! + */ + if (current_personality != 0) { + val = (uint32_t) val; + max = (uint32_t) max; + } + return val > max; +} +#endif + +/* Returns: + * 1: ok, continue in trace_syscall_exiting(). + * -1: error, trace_syscall_exiting() should print error indicator + * ("????" etc) and bail out. + */ +static void +get_error(struct tcb *tcp) +{ + int u_error = 0; + int check_errno = 1; + if (tcp->s_ent->sys_flags & SYSCALL_NEVER_FAILS) { + check_errno = 0; + } +#if defined(S390) || defined(S390X) + if (check_errno && is_negated_errno(gpr2)) { + tcp->u_rval = -1; + u_error = -gpr2; + } + else { + tcp->u_rval = gpr2; + } +#elif defined(I386) + if (check_errno && is_negated_errno(i386_regs.eax)) { + tcp->u_rval = -1; + u_error = -i386_regs.eax; + } + else { + tcp->u_rval = i386_regs.eax; + } +#elif defined(X86_64) + long rax; + if (x86_io.iov_len == sizeof(i386_regs)) { + /* Sign extend from 32 bits */ + rax = (int32_t)i386_regs.eax; + } else { + rax = x86_64_regs.rax; + } + if (check_errno && is_negated_errno(rax)) { + tcp->u_rval = -1; + u_error = -rax; + } + else { + tcp->u_rval = rax; + } +#elif defined(X32) + /* In X32, return value is 64-bit (llseek uses one). + * Using merely "long rax" would not work. + */ + long long rax; + if (x86_io.iov_len == sizeof(i386_regs)) { + /* Sign extend from 32 bits */ + rax = (int32_t)i386_regs.eax; + } else { + rax = x86_64_regs.rax; + } + /* Careful: is_negated_errno() works only on longs */ + if (check_errno && is_negated_errno_x32(rax)) { + tcp->u_rval = -1; + u_error = -rax; + } + else { + tcp->u_rval = rax; /* truncating */ + tcp->u_lrval = rax; + } +#elif defined(IA64) + if (ia32) { + int err; + + err = (int)ia64_r8; + if (check_errno && is_negated_errno(err)) { + tcp->u_rval = -1; + u_error = -err; + } + else { + tcp->u_rval = err; + } + } else { + if (check_errno && ia64_r10) { + tcp->u_rval = -1; + u_error = ia64_r8; + } else { + tcp->u_rval = ia64_r8; + } + } +#elif defined(MIPS) + if (check_errno && mips_a3) { + tcp->u_rval = -1; + u_error = mips_r2; + } else { + tcp->u_rval = mips_r2; +# if defined(LINUX_MIPSN32) + tcp->u_lrval = mips_r2; +# endif + } +#elif defined(POWERPC) + if (check_errno && is_negated_errno(ppc_result)) { + tcp->u_rval = -1; + u_error = -ppc_result; + } + else { + tcp->u_rval = ppc_result; + } +#elif defined(M68K) + if (check_errno && is_negated_errno(m68k_d0)) { + tcp->u_rval = -1; + u_error = -m68k_d0; + } + else { + tcp->u_rval = m68k_d0; + } +#elif defined(ARM) || defined(AARCH64) +# if defined(AARCH64) + if (tcp->currpers == 1) { + if (check_errno && is_negated_errno(aarch64_regs.regs[0])) { + tcp->u_rval = -1; + u_error = -aarch64_regs.regs[0]; + } + else { + tcp->u_rval = aarch64_regs.regs[0]; + } + } + else +# endif + { + if (check_errno && is_negated_errno(arm_regs.ARM_r0)) { + tcp->u_rval = -1; + u_error = -arm_regs.ARM_r0; + } + else { + tcp->u_rval = arm_regs.ARM_r0; + } + } +#elif defined(AVR32) + if (check_errno && avr32_regs.r12 && (unsigned) -avr32_regs.r12 < nerrnos) { + tcp->u_rval = -1; + u_error = -avr32_regs.r12; + } + else { + tcp->u_rval = avr32_regs.r12; + } +#elif defined(BFIN) + if (check_errno && is_negated_errno(bfin_r0)) { + tcp->u_rval = -1; + u_error = -bfin_r0; + } else { + tcp->u_rval = bfin_r0; + } +#elif defined(ALPHA) + if (check_errno && alpha_a3) { + tcp->u_rval = -1; + u_error = alpha_r0; + } + else { + tcp->u_rval = alpha_r0; + } +#elif defined(SPARC) + if (check_errno && sparc_regs.psr & PSR_C) { + tcp->u_rval = -1; + u_error = sparc_regs.u_regs[U_REG_O0]; + } + else { + tcp->u_rval = sparc_regs.u_regs[U_REG_O0]; + } +#elif defined(SPARC64) + if (check_errno && sparc_regs.tstate & 0x1100000000UL) { + tcp->u_rval = -1; + u_error = sparc_regs.u_regs[U_REG_O0]; + } + else { + tcp->u_rval = sparc_regs.u_regs[U_REG_O0]; + } +#elif defined(HPPA) + if (check_errno && is_negated_errno(hppa_r28)) { + tcp->u_rval = -1; + u_error = -hppa_r28; + } + else { + tcp->u_rval = hppa_r28; + } +#elif defined(SH) + if (check_errno && is_negated_errno(sh_r0)) { + tcp->u_rval = -1; + u_error = -sh_r0; + } + else { + tcp->u_rval = sh_r0; + } +#elif defined(SH64) + if (check_errno && is_negated_errno(sh64_r9)) { + tcp->u_rval = -1; + u_error = -sh64_r9; + } + else { + tcp->u_rval = sh64_r9; + } +#elif defined(METAG) + /* result pointer in D0Re0 (D0.0) */ + if (check_errno && is_negated_errno(metag_regs.dx[0][0])) { + tcp->u_rval = -1; + u_error = -metag_regs.dx[0][0]; + } + else { + tcp->u_rval = metag_regs.dx[0][0]; + } +#elif defined(CRISV10) || defined(CRISV32) + if (check_errno && cris_r10 && (unsigned) -cris_r10 < nerrnos) { + tcp->u_rval = -1; + u_error = -cris_r10; + } + else { + tcp->u_rval = cris_r10; + } +#elif defined(TILE) + /* + * The standard tile calling convention returns the value (or negative + * errno) in r0, and zero (or positive errno) in r1. + * Until at least kernel 3.8, however, the r1 value is not reflected + * in ptregs at this point, so we use r0 here. + */ + if (check_errno && is_negated_errno(tile_regs.regs[0])) { + tcp->u_rval = -1; + u_error = -tile_regs.regs[0]; + } else { + tcp->u_rval = tile_regs.regs[0]; + } +#elif defined(MICROBLAZE) + if (check_errno && is_negated_errno(microblaze_r3)) { + tcp->u_rval = -1; + u_error = -microblaze_r3; + } + else { + tcp->u_rval = microblaze_r3; + } +#elif defined(OR1K) + if (check_errno && is_negated_errno(or1k_regs.gpr[11])) { + tcp->u_rval = -1; + u_error = -or1k_regs.gpr[11]; + } + else { + tcp->u_rval = or1k_regs.gpr[11]; + } +#elif defined(XTENSA) + if (check_errno && is_negated_errno(xtensa_a2)) { + tcp->u_rval = -1; + u_error = -xtensa_a2; + } + else { + tcp->u_rval = xtensa_a2; + } +#endif + tcp->u_error = u_error; +} + +static void +dumpio(struct tcb *tcp) +{ + int (*func)(); + + if (syserror(tcp)) + return; + if ((unsigned long) tcp->u_arg[0] >= num_quals) + return; + func = tcp->s_ent->sys_func; + if (func == printargs) + return; + if (qual_flags[tcp->u_arg[0]] & QUAL_READ) { + if (func == sys_read || + func == sys_pread || + func == sys_recv || + func == sys_recvfrom) + dumpstr(tcp, tcp->u_arg[1], tcp->u_rval); + else if (func == sys_readv) + dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + return; + } + if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) { + if (func == sys_write || + func == sys_pwrite || + func == sys_send || + func == sys_sendto) + dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); + else if (func == sys_writev) + dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + return; + } +} + +static int +trace_syscall_exiting(struct tcb *tcp) +{ + int sys_res; + struct timeval tv; + int res; + long u_error; + + /* Measure the exit time as early as possible to avoid errors. */ + if (Tflag || cflag) + gettimeofday(&tv, NULL); + +#if SUPPORTED_PERSONALITIES > 1 + update_personality(tcp, tcp->currpers); +#endif + res = (get_regs_error ? -1 : get_syscall_result(tcp)); + if (res == 1) { + syscall_fixup_on_sysexit(tcp); /* never fails */ + get_error(tcp); /* never fails */ + if (need_fork_exec_workarounds) + syscall_fixup_for_fork_exec(tcp); + if (filtered(tcp) || hide_log_until_execve) + goto ret; + } + + if (cflag) { + struct timeval t = tv; + count_syscall(tcp, &t); + if (cflag == CFLAG_ONLY_STATS) { + goto ret; + } + } + + /* If not in -ff mode, and printing_tcp != tcp, + * then the log currently does not end with output + * of _our syscall entry_, but with something else. + * We need to say which syscall's return is this. + * + * Forced reprinting via TCB_REPRINT is used only by + * "strace -ff -oLOG test/threaded_execve" corner case. + * It's the only case when -ff mode needs reprinting. + */ + if ((followfork < 2 && printing_tcp != tcp) || (tcp->flags & TCB_REPRINT)) { + tcp->flags &= ~TCB_REPRINT; + printleader(tcp); + if (tcp->qual_flg & UNDEFINED_SCNO) + tprintf("<... %s resumed> ", undefined_scno_name(tcp)); + else + tprintf("<... %s resumed> ", tcp->s_ent->sys_name); + } + printing_tcp = tcp; + + if (res != 1) { + /* There was error in one of prior ptrace ops */ + tprints(") "); + tabto(); + tprints("= ? \n"); + line_ended(); + tcp->flags &= ~TCB_INSYSCALL; + return res; + } + + sys_res = 0; + if (tcp->qual_flg & QUAL_RAW) { + /* sys_res = printargs(tcp); - but it's nop on sysexit */ + } else { + /* FIXME: not_failing_only (IOW, option -z) is broken: + * failure of syscall is known only after syscall return. + * Thus we end up with something like this on, say, ENOENT: + * open("doesnt_exist", O_RDONLY + * {next syscall decode} + * whereas the intended result is that open(...) line + * is not shown at all. + */ + if (not_failing_only && tcp->u_error) + goto ret; /* ignore failed syscalls */ + sys_res = tcp->s_ent->sys_func(tcp); + } + + tprints(") "); + tabto(); + u_error = tcp->u_error; + if (tcp->qual_flg & QUAL_RAW) { + if (u_error) + tprintf("= -1 (errno %ld)", u_error); + else + tprintf("= %#lx", tcp->u_rval); + } + else if (!(sys_res & RVAL_NONE) && u_error) { + switch (u_error) { + /* Blocked signals do not interrupt any syscalls. + * In this case syscalls don't return ERESTARTfoo codes. + * + * Deadly signals set to SIG_DFL interrupt syscalls + * and kill the process regardless of which of the codes below + * is returned by the interrupted syscall. + * In some cases, kernel forces a kernel-generated deadly + * signal to be unblocked and set to SIG_DFL (and thus cause + * death) if it is blocked or SIG_IGNed: for example, SIGSEGV + * or SIGILL. (The alternative is to leave process spinning + * forever on the faulty instruction - not useful). + * + * SIG_IGNed signals and non-deadly signals set to SIG_DFL + * (for example, SIGCHLD, SIGWINCH) interrupt syscalls, + * but kernel will always restart them. + */ + case ERESTARTSYS: + /* Most common type of signal-interrupted syscall exit code. + * The system call will be restarted with the same arguments + * if SA_RESTART is set; otherwise, it will fail with EINTR. + */ + tprints("= ? ERESTARTSYS (To be restarted if SA_RESTART is set)"); + break; + case ERESTARTNOINTR: + /* Rare. For example, fork() returns this if interrupted. + * SA_RESTART is ignored (assumed set): the restart is unconditional. + */ + tprints("= ? ERESTARTNOINTR (To be restarted)"); + break; + case ERESTARTNOHAND: + /* pause(), rt_sigsuspend() etc use this code. + * SA_RESTART is ignored (assumed not set): + * syscall won't restart (will return EINTR instead) + * even after signal with SA_RESTART set. However, + * after SIG_IGN or SIG_DFL signal it will restart + * (thus the name "restart only if has no handler"). + */ + tprints("= ? ERESTARTNOHAND (To be restarted if no handler)"); + break; + case ERESTART_RESTARTBLOCK: + /* Syscalls like nanosleep(), poll() which can't be + * restarted with their original arguments use this + * code. Kernel will execute restart_syscall() instead, + * which changes arguments before restarting syscall. + * SA_RESTART is ignored (assumed not set) similarly + * to ERESTARTNOHAND. (Kernel can't honor SA_RESTART + * since restart data is saved in "restart block" + * in task struct, and if signal handler uses a syscall + * which in turn saves another such restart block, + * old data is lost and restart becomes impossible) + */ + tprints("= ? ERESTART_RESTARTBLOCK (Interrupted by signal)"); + break; + default: + if (u_error < 0) + tprintf("= -1 E??? (errno %ld)", u_error); + else if (u_error < nerrnos) + tprintf("= -1 %s (%s)", errnoent[u_error], + strerror(u_error)); + else + tprintf("= -1 ERRNO_%ld (%s)", u_error, + strerror(u_error)); + break; + } + if ((sys_res & RVAL_STR) && tcp->auxstr) + tprintf(" (%s)", tcp->auxstr); + } + else { + if (sys_res & RVAL_NONE) + tprints("= ?"); + else { + switch (sys_res & RVAL_MASK) { + case RVAL_HEX: + tprintf("= %#lx", tcp->u_rval); + break; + case RVAL_OCTAL: + tprintf("= %#lo", tcp->u_rval); + break; + case RVAL_UDECIMAL: + tprintf("= %lu", tcp->u_rval); + break; + case RVAL_DECIMAL: + tprintf("= %ld", tcp->u_rval); + break; +#if defined(LINUX_MIPSN32) || defined(X32) + /* + case RVAL_LHEX: + tprintf("= %#llx", tcp->u_lrval); + 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 + default: + fprintf(stderr, + "invalid rval format\n"); + break; + } + } + if ((sys_res & RVAL_STR) && tcp->auxstr) + tprintf(" (%s)", tcp->auxstr); + } + if (Tflag) { + tv_sub(&tv, &tv, &tcp->etime); + tprintf(" <%ld.%06ld>", + (long) tv.tv_sec, (long) tv.tv_usec); + } + tprints("\n"); + dumpio(tcp); + line_ended(); + + ret: + tcp->flags &= ~TCB_INSYSCALL; + return 0; +} + + +// keep a cache of /proc//mmap contents to avoid unnecessary reads +// make sure it's a SORTED array, so that we can do a fast binary search! +void +alloc_mmap_cache(struct tcb* tcp) { + EXITIF(tcp->mmap_cache); + EXITIF(tcp->mmap_cache_size); // make sure this starts at zero + + // start with a small dynamically-allocated array and then use realloc() to + // dynamically expand as needed + int cur_array_size = 10; + struct mmap_cache_t* cache_head = malloc(cur_array_size * sizeof(*cache_head)); + + char filename[30]; + sprintf(filename, "/proc/%d/maps", tcp->pid); + + FILE* f = fopen(filename, "r"); + EXITIF(!f); + char s[300]; + while (fgets(s, sizeof(s), f) != NULL) { + unsigned long start_addr, end_addr, mmap_offset; + char binary_path[512]; + binary_path[0] = '\0'; // 'reset' it just to be paranoid + + // TODO: add support for paths with SPACES in them ... + // right now we assume that filenames have no spaces + sscanf(s, "%lx-%lx %*c%*c%*c%*c %lx %*x:%*x %*d %s", &start_addr, &end_addr, &mmap_offset, binary_path); + + // there are some special 'fake files' like "[vdso]", "[heap]", "[stack]", + // etc., so simply IGNORE those! + if (binary_path[0] == '[' && binary_path[strlen(binary_path) - 1] == ']') { + continue; + } + + // ignore empty string + if (binary_path[0] == '\0') { + continue; + } + + EXITIF(end_addr < start_addr); + + struct mmap_cache_t* cur_entry = &cache_head[tcp->mmap_cache_size]; + cur_entry->start_addr = start_addr; + cur_entry->end_addr = end_addr; + cur_entry->mmap_offset = mmap_offset; + cur_entry->binary_filename = strdup(binary_path); // need to free later! + + // sanity check to make sure that we're storing non-overlapping regions in + // ascending order: + if (tcp->mmap_cache_size > 0) { + struct mmap_cache_t* prev_entry = &cache_head[tcp->mmap_cache_size - 1]; + EXITIF(prev_entry->start_addr >= cur_entry->start_addr); + EXITIF(prev_entry->end_addr > cur_entry->start_addr); // could be == + } + + tcp->mmap_cache_size++; + + // resize: + if (tcp->mmap_cache_size >= cur_array_size) { + cur_array_size *= 2; // double in size! + cache_head = realloc(cache_head, cur_array_size * sizeof(*cache_head)); + } + } + fclose(f); + + tcp->mmap_cache = cache_head; +} + +// remember to delete the mmap cache at the END of any system calls +// that might change /proc//mmap +// examples of such system calls include: mmap, mprotect, munmap, execve +void +delete_mmap_cache(struct tcb* tcp) { + int i; + for (i = 0; i < tcp->mmap_cache_size; i++) { + free(tcp->mmap_cache[i].binary_filename); + } + free(tcp->mmap_cache); + tcp->mmap_cache = NULL; + tcp->mmap_cache_size = 0; +} + + +// given a memory address addr and a pid, tprintf the following string: +// : +// +// e.g., "/lib32/libc-2.11.1.so:0x3asdf " (include trailing whitespace) +// +// TODO: this currently doesn't properly handle paths with SPACES in them! +// +// Pre-condition: tcp->mmap_cache is already initialized +static void +print_normalized_addr(struct tcb* tcp, unsigned long addr) { + EXITIF(!tcp->mmap_cache); + + // since tcp->mmap_cache is sorted, do a binary search to find the cache entry + // that contains addr + int lower = 0; + int upper = tcp->mmap_cache_size; + + while (lower <= upper) { + int mid = (int)((upper + lower) / 2); + struct mmap_cache_t* cur = &tcp->mmap_cache[mid]; + + if (addr >= cur->start_addr && addr < cur->end_addr) { + // calculate the true offset into the binary ... + // but still print out the original address because it can be useful too ... + unsigned long true_offset = addr - cur->start_addr + cur->mmap_offset; + tprintstackinfo("%s:0x%lx:0x%lx ", cur->binary_filename, true_offset, addr); + return; // exit early + } + else if (lower == upper) { + // still can't find the entry, so just exit! + EXITIF(!(lower == mid)); // sanity check + return; + } + else if (addr < cur->start_addr) { + upper = mid - 1; + } + else { + lower = mid + 1; + } + } + +} + +int +trace_syscall(struct tcb *tcp) +{ + return exiting(tcp) ? + trace_syscall_exiting(tcp) : trace_syscall_entering(tcp); +} diff --git a/alice-strace/syscallent.sh b/alice-strace/syscallent.sh new file mode 100755 index 0000000..16dd77f --- /dev/null +++ b/alice-strace/syscallent.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# 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. + +cat ${1+"$@"} | + sed -n 's/^#[ ]*define[ ][ ]*SYS_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p +s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p +s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9()]*(__NR_Linux + \([0-9]*\))$/\1 \2/p' | + sort -k2n | uniq | + awk ' + BEGIN { + tabs = "\t\t\t\t\t\t\t\t" + call = -1; + } + { + while (++call < $2) { + f = "printargs" + n = "SYS_" call + s = "\t{ MA,\t0,\t" + s = s f "," + s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8)) + s = s "\"" n "\"" + s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8)) + s = s "}, /* " call " */" + print s + } + f = "sys_" $1 + n = $1 + s = "\t{ MA,\t0,\t" + s = s f "," + s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8)) + s = s "\"" n "\"" + s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8)) + s = s "}, /* " call " */" + print s + } + END { + limit = call + 100 + while (++call < limit) { + f = "printargs" + n = "SYS_" call + s = "\t{ MA,\t0,\t" + s = s f "," + s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8)) + s = s "\"" n "\"" + s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8)) + s = s "}, /* " call " */" + print s + } + } + ' diff --git a/alice-strace/system.c b/alice-strace/system.c new file mode 100644 index 0000000..26d0d7f --- /dev/null +++ b/alice-strace/system.c @@ -0,0 +1,1088 @@ +/* + * 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" + +#define _LINUX_SOCKET_H +#define _LINUX_FS_H + +#define MS_RDONLY 1 /* Mount read-only */ +#define MS_NOSUID 2 /* Ignore suid and sgid bits */ +#define MS_NODEV 4 /* Disallow access to device special files */ +#define MS_NOEXEC 8 /* Disallow program execution */ +#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ +#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ +#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ +#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ +#define MS_NOATIME 1024 /* Do not update access times. */ +#define MS_NODIRATIME 2048 /* Do not update directory access times */ +#define MS_BIND 4096 +#define MS_MOVE 8192 +#define MS_REC 16384 +#define MS_SILENT 32768 +#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define MS_UNBINDABLE (1<<17) /* change to unbindable */ +#define MS_PRIVATE (1<<18) /* change to private */ +#define MS_SLAVE (1<<19) /* change to slave */ +#define MS_SHARED (1<<20) /* change to shared */ +#define MS_RELATIME (1<<21) +#define MS_KERNMOUNT (1<<22) +#define MS_I_VERSION (1<<23) +#define MS_STRICTATIME (1<<24) +#define MS_NOSEC (1<<28) +#define MS_BORN (1<<29) +#define MS_ACTIVE (1<<30) +#define MS_NOUSER (1<<31) +#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number */ +#define MS_MGC_MSK 0xffff0000 /* Magic flag mask */ + +#include +#include +#include +#ifdef HAVE_LINUX_CAPABILITY_H +# include +#endif +#ifdef HAVE_ASM_CACHECTL_H +# include +#endif +#ifdef HAVE_LINUX_USTNAME_H +# include +#endif +#ifdef HAVE_ASM_SYSMIPS_H +# include +#endif +#include + +static const struct xlat mount_flags[] = { + { MS_MGC_VAL, "MS_MGC_VAL" }, + { MS_RDONLY, "MS_RDONLY" }, + { MS_NOSUID, "MS_NOSUID" }, + { MS_NODEV, "MS_NODEV" }, + { MS_NOEXEC, "MS_NOEXEC" }, + { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"}, + { MS_REMOUNT, "MS_REMOUNT" }, + { MS_RELATIME, "MS_RELATIME" }, + { MS_KERNMOUNT, "MS_KERNMOUNT" }, + { MS_I_VERSION, "MS_I_VERSION" }, + { MS_STRICTATIME,"MS_STRICTATIME"}, + { MS_NOSEC, "MS_NOSEC" }, + { MS_BORN, "MS_BORN" }, + { MS_MANDLOCK, "MS_MANDLOCK" }, + { MS_NOATIME, "MS_NOATIME" }, + { MS_NODIRATIME,"MS_NODIRATIME" }, + { MS_BIND, "MS_BIND" }, + { MS_MOVE, "MS_MOVE" }, + { MS_REC, "MS_REC" }, + { MS_SILENT, "MS_SILENT" }, + { MS_POSIXACL, "MS_POSIXACL" }, + { MS_UNBINDABLE,"MS_UNBINDABLE" }, + { MS_PRIVATE, "MS_PRIVATE" }, + { MS_SLAVE, "MS_SLAVE" }, + { MS_SHARED, "MS_SHARED" }, + { MS_ACTIVE, "MS_ACTIVE" }, + { MS_NOUSER, "MS_NOUSER" }, + { 0, NULL }, +}; + +int +sys_mount(struct tcb *tcp) +{ + if (entering(tcp)) { + int ignore_type = 0, ignore_data = 0; + unsigned long flags = tcp->u_arg[3]; + + /* Discard magic */ + if ((flags & MS_MGC_MSK) == MS_MGC_VAL) + flags &= ~MS_MGC_MSK; + + if (flags & MS_REMOUNT) + ignore_type = 1; + else if (flags & (MS_BIND | MS_MOVE)) + ignore_type = ignore_data = 1; + + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + + printpath(tcp, tcp->u_arg[1]); + tprints(", "); + + if (ignore_type && tcp->u_arg[2]) + tprintf("%#lx", tcp->u_arg[2]); + else + printstr(tcp, tcp->u_arg[2], -1); + tprints(", "); + + printflags(mount_flags, tcp->u_arg[3], "MS_???"); + tprints(", "); + + if (ignore_data && tcp->u_arg[4]) + tprintf("%#lx", tcp->u_arg[4]); + else + printstr(tcp, tcp->u_arg[4], -1); + } + return 0; +} + +#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ +#define MNT_DETACH 0x00000002 /* Just detach from the tree */ +#define MNT_EXPIRE 0x00000004 /* Mark for expiry */ + +static const struct xlat umount_flags[] = { + { MNT_FORCE, "MNT_FORCE" }, + { MNT_DETACH, "MNT_DETACH" }, + { MNT_EXPIRE, "MNT_EXPIRE" }, + { 0, NULL }, +}; + +int +sys_umount2(struct tcb *tcp) +{ + if (entering(tcp)) { + printstr(tcp, tcp->u_arg[0], -1); + tprints(", "); + printflags(umount_flags, tcp->u_arg[1], "MNT_???"); + } + return 0; +} + +/* These are not macros, but enums. We just copy the values by hand + from Linux 2.6.9 here. */ +static const struct xlat personality_options[] = { + { 0, "PER_LINUX" }, + { 0x00800000, "PER_LINUX_32BIT"}, + { 0x04100001, "PER_SVR4" }, + { 0x05000002, "PER_SVR3" }, + { 0x07000003, "PER_SCOSVR3" }, + { 0x06000003, "PER_OSR5" }, + { 0x05000004, "PER_WYSEV386" }, + { 0x04000005, "PER_ISCR4" }, + { 0x00000006, "PER_BSD" }, + { 0x04000006, "PER_SUNOS" }, + { 0x05000007, "PER_XENIX" }, + { 0x00000008, "PER_LINUX32" }, + { 0x08000008, "PER_LINUX32_3GB"}, + { 0x04000009, "PER_IRIX32" }, + { 0x0400000a, "PER_IRIXN32" }, + { 0x0400000b, "PER_IRIX64" }, + { 0x0000000c, "PER_RISCOS" }, + { 0x0400000d, "PER_SOLARIS" }, + { 0x0410000e, "PER_UW7" }, + { 0x0000000f, "PER_OSF4" }, + { 0x00000010, "PER_HPUX" }, + { 0, NULL }, +}; + +int +sys_personality(struct tcb *tcp) +{ + if (entering(tcp)) + printxval(personality_options, tcp->u_arg[0], "PER_???"); + return 0; +} + +enum { + SYSLOG_ACTION_CLOSE = 0, + SYSLOG_ACTION_OPEN, + SYSLOG_ACTION_READ, + SYSLOG_ACTION_READ_ALL, + SYSLOG_ACTION_READ_CLEAR, + SYSLOG_ACTION_CLEAR, + SYSLOG_ACTION_CONSOLE_OFF, + SYSLOG_ACTION_CONSOLE_ON, + SYSLOG_ACTION_CONSOLE_LEVEL, + SYSLOG_ACTION_SIZE_UNREAD, + SYSLOG_ACTION_SIZE_BUFFER +}; + +static const struct xlat syslog_action_type[] = { + { SYSLOG_ACTION_CLOSE, "SYSLOG_ACTION_CLOSE" }, + { SYSLOG_ACTION_OPEN, "SYSLOG_ACTION_OPEN" }, + { SYSLOG_ACTION_READ, "SYSLOG_ACTION_READ" }, + { SYSLOG_ACTION_READ_ALL, "SYSLOG_ACTION_READ_ALL" }, + { SYSLOG_ACTION_READ_CLEAR, "SYSLOG_ACTION_READ_CLEAR" }, + { SYSLOG_ACTION_CLEAR, "SYSLOG_ACTION_CLEAR" }, + { SYSLOG_ACTION_CONSOLE_OFF, "SYSLOG_ACTION_CONSOLE_OFF" }, + { SYSLOG_ACTION_CONSOLE_ON, "SYSLOG_ACTION_CONSOLE_ON" }, + { SYSLOG_ACTION_CONSOLE_LEVEL, "SYSLOG_ACTION_CONSOLE_LEVEL" }, + { SYSLOG_ACTION_SIZE_UNREAD, "SYSLOG_ACTION_SIZE_UNREAD" }, + { SYSLOG_ACTION_SIZE_BUFFER, "SYSLOG_ACTION_SIZE_BUFFER" }, + { 0, NULL } +}; + +int +sys_syslog(struct tcb *tcp) +{ + int type = tcp->u_arg[0]; + + if (entering(tcp)) { + /* type */ + printxval(syslog_action_type, type, "SYSLOG_ACTION_???"); + tprints(", "); + } + + switch (type) { + case SYSLOG_ACTION_READ: + case SYSLOG_ACTION_READ_ALL: + case SYSLOG_ACTION_READ_CLEAR: + if (entering(tcp)) + return 0; + break; + default: + if (entering(tcp)) { + tprintf("%#lx, %lu", + tcp->u_arg[1], tcp->u_arg[2]); + } + return 0; + } + + /* bufp */ + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printstr(tcp, tcp->u_arg[1], tcp->u_rval); + /* len */ + tprintf(", %d", (int) tcp->u_arg[2]); + + return 0; +} + +#include +static const struct xlat bootflags1[] = { + { LINUX_REBOOT_MAGIC1, "LINUX_REBOOT_MAGIC1" }, + { 0, NULL }, +}; + +static const struct xlat bootflags2[] = { + { LINUX_REBOOT_MAGIC2, "LINUX_REBOOT_MAGIC2" }, + { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A" }, + { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B" }, + { 0, NULL }, +}; + +static const struct xlat bootflags3[] = { + { LINUX_REBOOT_CMD_CAD_OFF, "LINUX_REBOOT_CMD_CAD_OFF" }, + { LINUX_REBOOT_CMD_RESTART, "LINUX_REBOOT_CMD_RESTART" }, + { LINUX_REBOOT_CMD_HALT, "LINUX_REBOOT_CMD_HALT" }, + { LINUX_REBOOT_CMD_CAD_ON, "LINUX_REBOOT_CMD_CAD_ON" }, + { LINUX_REBOOT_CMD_POWER_OFF, "LINUX_REBOOT_CMD_POWER_OFF" }, + { LINUX_REBOOT_CMD_RESTART2, "LINUX_REBOOT_CMD_RESTART2" }, + { 0, NULL }, +}; + +int +sys_reboot(struct tcb *tcp) +{ + if (entering(tcp)) { + printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???"); + tprints(", "); + printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???"); + tprints(", "); + printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???"); + if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) { + tprints(", "); + printstr(tcp, tcp->u_arg[3], -1); + } + } + return 0; +} + +#ifdef M68K +static const struct xlat cacheflush_scope[] = { +#ifdef FLUSH_SCOPE_LINE + { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" }, +#endif +#ifdef FLUSH_SCOPE_PAGE + { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" }, +#endif +#ifdef FLUSH_SCOPE_ALL + { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" }, +#endif + { 0, NULL }, +}; + +static const struct xlat cacheflush_flags[] = { +#ifdef FLUSH_CACHE_BOTH + { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" }, +#endif +#ifdef FLUSH_CACHE_DATA + { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" }, +#endif +#ifdef FLUSH_CACHE_INSN + { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" }, +#endif + { 0, NULL }, +}; + +int +sys_cacheflush(struct tcb *tcp) +{ + if (entering(tcp)) { + /* addr */ + tprintf("%#lx, ", tcp->u_arg[0]); + /* scope */ + printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???"); + tprints(", "); + /* flags */ + printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???"); + /* len */ + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} +#endif /* M68K */ + +#ifdef BFIN + +#include + +static const struct xlat sram_alloc_flags[] = { + { L1_INST_SRAM, "L1_INST_SRAM" }, + { L1_DATA_A_SRAM, "L1_DATA_A_SRAM" }, + { L1_DATA_B_SRAM, "L1_DATA_B_SRAM" }, + { L1_DATA_SRAM, "L1_DATA_SRAM" }, + { L2_SRAM, "L2_SRAM" }, + { 0, NULL }, +}; + +int +sys_sram_alloc(struct tcb *tcp) +{ + if (entering(tcp)) { + /* size */ + tprintf("%lu, ", tcp->u_arg[0]); + /* flags */ + printflags(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); + } + return 1; +} + +#include + +static const struct xlat cacheflush_flags[] = { + { ICACHE, "ICACHE" }, + { DCACHE, "DCACHE" }, + { BCACHE, "BCACHE" }, + { 0, NULL }, +}; + +int +sys_cacheflush(struct tcb *tcp) +{ + if (entering(tcp)) { + /* start addr */ + tprintf("%#lx, ", tcp->u_arg[0]); + /* length */ + tprintf("%ld, ", tcp->u_arg[1]); + /* flags */ + printxval(cacheflush_flags, tcp->u_arg[1], "?CACHE"); + } + return 0; +} + +#endif + +#ifdef SH +static const struct xlat cacheflush_flags[] = { +#ifdef CACHEFLUSH_D_INVAL + { CACHEFLUSH_D_INVAL, "CACHEFLUSH_D_INVAL" }, +#endif +#ifdef CACHEFLUSH_D_WB + { CACHEFLUSH_D_WB, "CACHEFLUSH_D_WB" }, +#endif +#ifdef CACHEFLUSH_D_PURGE + { CACHEFLUSH_D_PURGE, "CACHEFLUSH_D_PURGE" }, +#endif +#ifdef CACHEFLUSH_I + { CACHEFLUSH_I, "CACHEFLUSH_I" }, +#endif + { 0, NULL }, +}; + +int +sys_cacheflush(struct tcb *tcp) +{ + if (entering(tcp)) { + /* addr */ + tprintf("%#lx, ", tcp->u_arg[0]); + /* len */ + tprintf("%lu, ", tcp->u_arg[1]); + /* flags */ + printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???"); + } + return 0; +} +#endif /* SH */ + +#ifdef SYS_capget + +static const struct xlat capabilities[] = { + { 1<version, + "_LINUX_CAPABILITY_VERSION_???"); + tprintf(", %d}", arg.p->pid); + } +} + +static void +print_cap_data(struct tcb *tcp, unsigned long addr) +{ + union { cap_user_data_t p; long *a; char *c; } arg; + long a[sizeof(*arg.p) / sizeof(long) + 1]; + arg.a = a; + + if (!addr) + tprints("NULL"); + else if (!verbose(tcp) || + (exiting(tcp) && syserror(tcp)) || + umoven(tcp, addr, sizeof(*arg.p), arg.c) < 0) + tprintf("%#lx", addr); + else { + tprints("{"); + printflags(capabilities, arg.p->effective, "CAP_???"); + tprints(", "); + printflags(capabilities, arg.p->permitted, "CAP_???"); + tprints(", "); + printflags(capabilities, arg.p->inheritable, "CAP_???"); + tprints("}"); + } +} + +int +sys_capget(struct tcb *tcp) +{ + if (entering(tcp)) { + print_cap_header(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + print_cap_data(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_capset(struct tcb *tcp) +{ + if (entering(tcp)) { + print_cap_header(tcp, tcp->u_arg[0]); + tprints(", "); + print_cap_data(tcp, tcp->u_arg[1]); + } + return 0; +} + +#else + +int sys_capget(struct tcb *tcp) +{ + return printargs(tcp); +} + +int sys_capset(struct tcb *tcp) +{ + return printargs(tcp); +} + +#endif + +/* Linux 2.6.18+ headers removed CTL_PROC enum. */ +# define CTL_PROC 4 +# define CTL_CPU 10 /* older headers lack */ +static const struct xlat sysctl_root[] = { + { CTL_KERN, "CTL_KERN" }, + { CTL_VM, "CTL_VM" }, + { CTL_NET, "CTL_NET" }, + { CTL_PROC, "CTL_PROC" }, + { CTL_FS, "CTL_FS" }, + { CTL_DEBUG, "CTL_DEBUG" }, + { CTL_DEV, "CTL_DEV" }, + { CTL_BUS, "CTL_BUS" }, + { CTL_ABI, "CTL_ABI" }, + { CTL_CPU, "CTL_CPU" }, + { 0, NULL } +}; + +static const struct xlat sysctl_kern[] = { + { KERN_OSTYPE, "KERN_OSTYPE" }, + { KERN_OSRELEASE, "KERN_OSRELEASE" }, + { KERN_OSREV, "KERN_OSREV" }, + { KERN_VERSION, "KERN_VERSION" }, + { KERN_SECUREMASK, "KERN_SECUREMASK" }, + { KERN_PROF, "KERN_PROF" }, + { KERN_NODENAME, "KERN_NODENAME" }, + { KERN_DOMAINNAME, "KERN_DOMAINNAME" }, +#ifdef KERN_SECURELVL + { KERN_SECURELVL, "KERN_SECURELVL" }, +#endif + { KERN_PANIC, "KERN_PANIC" }, +#ifdef KERN_REALROOTDEV + { KERN_REALROOTDEV, "KERN_REALROOTDEV" }, +#endif +#ifdef KERN_JAVA_INTERPRETER + { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" }, +#endif +#ifdef KERN_JAVA_APPLETVIEWER + { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" }, +#endif + { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" }, + { KERN_CTLALTDEL, "KERN_CTLALTDEL" }, + { KERN_PRINTK, "KERN_PRINTK" }, + { KERN_NAMETRANS, "KERN_NAMETRANS" }, + { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" }, + { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" }, + { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" }, + { KERN_MODPROBE, "KERN_MODPROBE" }, + { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" }, + { KERN_ACCT, "KERN_ACCT" }, + { KERN_PPC_L2CR, "KERN_PPC_L2CR" }, + { KERN_RTSIGNR, "KERN_RTSIGNR" }, + { KERN_RTSIGMAX, "KERN_RTSIGMAX" }, + { KERN_SHMMAX, "KERN_SHMMAX" }, + { KERN_MSGMAX, "KERN_MSGMAX" }, + { KERN_MSGMNB, "KERN_MSGMNB" }, + { KERN_MSGPOOL, "KERN_MSGPOOL" }, + { 0, NULL } +}; + +static const struct xlat sysctl_vm[] = { +#ifdef VM_SWAPCTL + { VM_SWAPCTL, "VM_SWAPCTL" }, +#endif +#ifdef VM_UNUSED1 + { VM_UNUSED1, "VM_UNUSED1" }, +#endif +#ifdef VM_SWAPOUT + { VM_SWAPOUT, "VM_SWAPOUT" }, +#endif +#ifdef VM_UNUSED2 + { VM_UNUSED2, "VM_UNUSED2" }, +#endif +#ifdef VM_FREEPG + { VM_FREEPG, "VM_FREEPG" }, +#endif +#ifdef VM_UNUSED3 + { VM_UNUSED3, "VM_UNUSED3" }, +#endif +#ifdef VM_BDFLUSH + { VM_BDFLUSH, "VM_BDFLUSH" }, +#endif +#ifdef VM_UNUSED4 + { VM_UNUSED4, "VM_UNUSED4" }, +#endif + { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" }, +#ifdef VM_BUFFERMEM + { VM_BUFFERMEM, "VM_BUFFERMEM" }, +#endif +#ifdef VM_UNUSED5 + { VM_UNUSED5, "VM_UNUSED5" }, +#endif +#ifdef VM_PAGECACHE + { VM_PAGECACHE, "VM_PAGECACHE" }, +#endif +#ifdef VM_UNUSED7 + { VM_UNUSED7, "VM_UNUSED7" }, +#endif +#ifdef VM_PAGERDAEMON + { VM_PAGERDAEMON, "VM_PAGERDAEMON" }, +#endif +#ifdef VM_UNUSED8 + { VM_UNUSED8, "VM_UNUSED8" }, +#endif +#ifdef VM_PGT_CACHE + { VM_PGT_CACHE, "VM_PGT_CACHE" }, +#endif +#ifdef VM_UNUSED9 + { VM_UNUSED9, "VM_UNUSED9" }, +#endif + { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" }, + { 0, NULL }, +}; + +static const struct xlat sysctl_net[] = { + { NET_CORE, "NET_CORE" }, + { NET_ETHER, "NET_ETHER" }, + { NET_802, "NET_802" }, + { NET_UNIX, "NET_UNIX" }, + { NET_IPV4, "NET_IPV4" }, + { NET_IPX, "NET_IPX" }, + { NET_ATALK, "NET_ATALK" }, + { NET_NETROM, "NET_NETROM" }, + { NET_AX25, "NET_AX25" }, + { NET_BRIDGE, "NET_BRIDGE" }, + { NET_ROSE, "NET_ROSE" }, + { NET_IPV6, "NET_IPV6" }, + { NET_X25, "NET_X25" }, + { NET_TR, "NET_TR" }, + { NET_DECNET, "NET_DECNET" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_core[] = { + { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" }, + { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" }, + { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" }, + { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" }, + { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" }, + { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" }, + { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" }, + { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" }, + { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_unix[] = { + { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" }, + { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_ipv4[] = { + { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" }, + { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" }, + { NET_IPV4_CONF, "NET_IPV4_CONF" }, + { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" }, + { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" }, + { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" }, + { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" }, + { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" }, + { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" }, + { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" }, + { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" }, + { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" }, + { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" }, + { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" }, + { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" }, + { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" }, + { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" }, + { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" }, + { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" }, + { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" }, + { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" }, + { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" }, + { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" }, + { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" }, + { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" }, + { NET_TCP_STDURG, "NET_TCP_STDURG" }, + { NET_TCP_RFC1337, "NET_TCP_RFC1337" }, + { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" }, + { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" }, + { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" }, + { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" }, + { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" }, + { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" }, + { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" }, + { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" }, + { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" }, + { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" }, + { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" }, + { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_ipv4_route[] = { + { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" }, + { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" }, + { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" }, + { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" }, + { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" }, + { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" }, + { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" }, + { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" }, + { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" }, + { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" }, + { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" }, + { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" }, + { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" }, + { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_ipv4_conf[] = { + { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" }, + { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" }, + { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" }, + { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" }, + { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" }, + { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" }, + { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" }, + { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" }, + { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" }, + { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" }, + { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_ipv6[] = { + { NET_IPV6_CONF, "NET_IPV6_CONF" }, + { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" }, + { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" }, + { 0, NULL } +}; + +static const struct xlat sysctl_net_ipv6_route[] = { + { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" }, + { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" }, + { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" }, + { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" }, + { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" }, + { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" }, + { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" }, + { 0, NULL } +}; + +int +sys_sysctl(struct tcb *tcp) +{ + struct __sysctl_args info; + int *name; + unsigned long size; + + if (umove(tcp, tcp->u_arg[0], &info) < 0) + return printargs(tcp); + + size = sizeof(int) * (unsigned long) info.nlen; + name = (size / sizeof(int) != info.nlen) ? NULL : malloc(size); + if (name == NULL || + umoven(tcp, (unsigned long) info.name, size, (char *) name) < 0) { + free(name); + if (entering(tcp)) + tprintf("{%p, %d, %p, %p, %p, %lu}", + info.name, info.nlen, info.oldval, + info.oldlenp, info.newval, (unsigned long)info.newlen); + return 0; + } + + if (entering(tcp)) { + int cnt = 0, max_cnt; + + tprints("{{"); + + if (info.nlen == 0) + goto out; + printxval(sysctl_root, name[0], "CTL_???"); + ++cnt; + + if (info.nlen == 1) + goto out; + switch (name[0]) { + case CTL_KERN: + tprints(", "); + printxval(sysctl_kern, name[1], "KERN_???"); + ++cnt; + break; + case CTL_VM: + tprints(", "); + printxval(sysctl_vm, name[1], "VM_???"); + ++cnt; + break; + case CTL_NET: + tprints(", "); + printxval(sysctl_net, name[1], "NET_???"); + ++cnt; + + if (info.nlen == 2) + goto out; + switch (name[1]) { + case NET_CORE: + tprints(", "); + printxval(sysctl_net_core, name[2], + "NET_CORE_???"); + break; + case NET_UNIX: + tprints(", "); + printxval(sysctl_net_unix, name[2], + "NET_UNIX_???"); + break; + case NET_IPV4: + tprints(", "); + printxval(sysctl_net_ipv4, name[2], + "NET_IPV4_???"); + + if (info.nlen == 3) + goto out; + switch (name[2]) { + case NET_IPV4_ROUTE: + tprints(", "); + printxval(sysctl_net_ipv4_route, + name[3], + "NET_IPV4_ROUTE_???"); + break; + case NET_IPV4_CONF: + tprints(", "); + printxval(sysctl_net_ipv4_conf, + name[3], + "NET_IPV4_CONF_???"); + break; + default: + goto out; + } + break; + case NET_IPV6: + tprints(", "); + printxval(sysctl_net_ipv6, name[2], + "NET_IPV6_???"); + + if (info.nlen == 3) + goto out; + switch (name[2]) { + case NET_IPV6_ROUTE: + tprints(", "); + printxval(sysctl_net_ipv6_route, + name[3], + "NET_IPV6_ROUTE_???"); + break; + default: + goto out; + } + break; + default: + goto out; + } + break; + default: + goto out; + } + out: + max_cnt = info.nlen; + if (abbrev(tcp) && max_cnt > max_strlen) + max_cnt = max_strlen; + while (cnt < max_cnt) + tprintf(", %x", name[cnt++]); + if (cnt < info.nlen) + tprints(", ..."); + tprintf("}, %d, ", info.nlen); + } else { + size_t oldlen = 0; + if (info.oldval == NULL) { + tprints("NULL"); + } else if (umove(tcp, (long)info.oldlenp, &oldlen) >= 0 + && info.nlen >= 2 + && ((name[0] == CTL_KERN + && (name[1] == KERN_OSRELEASE + || name[1] == KERN_OSTYPE +#ifdef KERN_JAVA_INTERPRETER + || name[1] == KERN_JAVA_INTERPRETER +#endif +#ifdef KERN_JAVA_APPLETVIEWER + || name[1] == KERN_JAVA_APPLETVIEWER +#endif + )))) { + printpath(tcp, (size_t)info.oldval); + } else { + tprintf("%p", info.oldval); + } + tprintf(", %lu, ", (unsigned long)oldlen); + if (info.newval == NULL) + tprints("NULL"); + else if (syserror(tcp)) + tprintf("%p", info.newval); + else + printpath(tcp, (size_t)info.newval); + tprintf(", %lu", (unsigned long)info.newlen); + } + + free(name); + return 0; +} + +#ifdef MIPS + +#ifndef __NEW_UTS_LEN +#define __NEW_UTS_LEN 64 +#endif + +static const struct xlat sysmips_operations[] = { + { SETNAME, "SETNAME" }, + { FLUSH_CACHE, "FLUSH_CACHE" }, + { MIPS_FIXADE, "MIPS_FIXADE" }, + { MIPS_RDNVRAM, "MIPS_RDNVRAM" }, + { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" }, + { 0, NULL } +}; + +int sys_sysmips(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(sysmips_operations, tcp->u_arg[0], "???"); + if (!verbose(tcp)) { + tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + } else if (tcp->u_arg[0] == SETNAME) { + char nodename[__NEW_UTS_LEN + 1]; + if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1), nodename) < 0) + tprintf(", %#lx", tcp->u_arg[1]); + else + tprintf(", \"%.*s\"", (int)(__NEW_UTS_LEN + 1), nodename); + } else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) { + tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]); + } else if (tcp->u_arg[0] == MIPS_FIXADE) { + tprintf(", 0x%lx", tcp->u_arg[1]); + } else { + tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + } + } + + return 0; +} + +#endif /* MIPS */ + +#ifdef OR1K +#define OR1K_ATOMIC_SWAP 1 +#define OR1K_ATOMIC_CMPXCHG 2 +#define OR1K_ATOMIC_XCHG 3 +#define OR1K_ATOMIC_ADD 4 +#define OR1K_ATOMIC_DECPOS 5 +#define OR1K_ATOMIC_AND 6 +#define OR1K_ATOMIC_OR 7 +#define OR1K_ATOMIC_UMAX 8 +#define OR1K_ATOMIC_UMIN 9 + +static const struct xlat atomic_ops[] = { + { OR1K_ATOMIC_SWAP, "SWAP" }, + { OR1K_ATOMIC_CMPXCHG, "CMPXCHG" }, + { OR1K_ATOMIC_XCHG, "XCHG" }, + { OR1K_ATOMIC_ADD, "ADD" }, + { OR1K_ATOMIC_DECPOS, "DECPOS" }, + { OR1K_ATOMIC_AND, "AND" }, + { OR1K_ATOMIC_OR, "OR" }, + { OR1K_ATOMIC_UMAX, "UMAX" }, + { OR1K_ATOMIC_UMIN, "UMIN" }, + { 0, NULL } +}; + +int sys_or1k_atomic(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(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]); + break; + case OR1K_ATOMIC_CMPXCHG: + tprintf(", 0x%lx, %#lx, %#lx", tcp->u_arg[1], tcp->u_arg[2], + tcp->u_arg[3]); + break; + + case OR1K_ATOMIC_XCHG: + case OR1K_ATOMIC_ADD: + case OR1K_ATOMIC_AND: + case OR1K_ATOMIC_OR: + case OR1K_ATOMIC_UMAX: + case OR1K_ATOMIC_UMIN: + tprintf(", 0x%lx, %#lx", tcp->u_arg[1], tcp->u_arg[2]); + break; + + case OR1K_ATOMIC_DECPOS: + tprintf(", 0x%lx", tcp->u_arg[1]); + break; + + default: + break; + } + } + + return RVAL_HEX; +} + +#endif /* OR1K */ diff --git a/alice-strace/term.c b/alice-strace/term.c new file mode 100644 index 0000000..7b7de74 --- /dev/null +++ b/alice-strace/term.c @@ -0,0 +1,420 @@ +/* + * 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" +/* + * The C library's definition of struct termios might differ from + * the kernel one, and we need to use the kernel layout. + */ +#include +#ifdef HAVE_SYS_FILIO_H +# include +#endif + +static const struct xlat tcxonc_options[] = { + { TCOOFF, "TCOOFF" }, + { TCOON, "TCOON" }, + { TCIOFF, "TCIOFF" }, + { TCION, "TCION" }, + { 0, NULL }, +}; + +#ifdef TCLFLSH +static const struct xlat tcflsh_options[] = { + { TCIFLUSH, "TCIFLUSH" }, + { TCOFLUSH, "TCOFLUSH" }, + { TCIOFLUSH, "TCIOFLUSH" }, + { 0, NULL }, +}; +#endif + +static const struct xlat baud_options[] = { + { B0, "B0" }, + { B50, "B50" }, + { B75, "B75" }, + { B110, "B110" }, + { B134, "B134" }, + { B150, "B150" }, + { B200, "B200" }, + { B300, "B300" }, + { B600, "B600" }, + { B1200, "B1200" }, + { B1800, "B1800" }, + { B2400, "B2400" }, + { B4800, "B4800" }, + { B9600, "B9600" }, +#ifdef B19200 + { B19200, "B19200" }, +#endif +#ifdef B38400 + { B38400, "B38400" }, +#endif +#ifdef B57600 + { B57600, "B57600" }, +#endif +#ifdef B115200 + { B115200, "B115200" }, +#endif +#ifdef B230400 + { B230400, "B230400" }, +#endif +#ifdef B460800 + { B460800, "B460800" }, +#endif +#ifdef B500000 + { B500000, "B500000" }, +#endif +#ifdef B576000 + { B576000, "B576000" }, +#endif +#ifdef B921600 + { B921600, "B921600" }, +#endif +#ifdef B1000000 + { B1000000, "B1000000" }, +#endif +#ifdef B1152000 + { B1152000, "B1152000" }, +#endif +#ifdef B1500000 + { B1500000, "B1500000" }, +#endif +#ifdef B2000000 + { B2000000, "B2000000" }, +#endif +#ifdef B2500000 + { B2500000, "B2500000" }, +#endif +#ifdef B3000000 + { B3000000, "B3000000" }, +#endif +#ifdef B3500000 + { B3500000, "B3500000" }, +#endif +#ifdef B4000000 + { B4000000, "B4000000" }, +#endif +#ifdef EXTA + { EXTA, "EXTA" }, +#endif +#ifdef EXTB + { EXTB, "EXTB" }, +#endif + { 0, NULL }, +}; + +static const struct xlat modem_flags[] = { +#ifdef TIOCM_LE + { TIOCM_LE, "TIOCM_LE", }, +#endif +#ifdef TIOCM_DTR + { TIOCM_DTR, "TIOCM_DTR", }, +#endif +#ifdef TIOCM_RTS + { TIOCM_RTS, "TIOCM_RTS", }, +#endif +#ifdef TIOCM_ST + { TIOCM_ST, "TIOCM_ST", }, +#endif +#ifdef TIOCM_SR + { TIOCM_SR, "TIOCM_SR", }, +#endif +#ifdef TIOCM_CTS + { TIOCM_CTS, "TIOCM_CTS", }, +#endif +#ifdef TIOCM_CAR + { TIOCM_CAR, "TIOCM_CAR", }, +#endif +#ifdef TIOCM_CD + { TIOCM_CD, "TIOCM_CD", }, +#endif +#ifdef TIOCM_RNG + { TIOCM_RNG, "TIOCM_RNG", }, +#endif +#ifdef TIOCM_RI + { TIOCM_RI, "TIOCM_RI", }, +#endif +#ifdef TIOCM_DSR + { TIOCM_DSR, "TIOCM_DSR", }, +#endif + { 0, NULL, }, +}; + +int term_ioctl(struct tcb *tcp, long code, long arg) +{ + struct termios tios; + struct termio tio; + struct winsize ws; +#ifdef TIOCGSIZE + struct ttysize ts; +#endif + int i; + + if (entering(tcp)) + return 0; + + switch (code) { + + /* ioctls with termios or termio args */ + +#ifdef TCGETS + case TCGETS: + if (syserror(tcp)) + return 0; + case TCSETS: + case TCSETSW: + case TCSETSF: + if (!verbose(tcp) || umove(tcp, arg, &tios) < 0) + return 0; + if (abbrev(tcp)) { + tprints(", {"); + printxval(baud_options, tios.c_cflag & CBAUD, "B???"); + tprintf(" %sopost %sisig %sicanon %secho ...}", + (tios.c_oflag & OPOST) ? "" : "-", + (tios.c_lflag & ISIG) ? "" : "-", + (tios.c_lflag & ICANON) ? "" : "-", + (tios.c_lflag & ECHO) ? "" : "-"); + return 1; + } + tprintf(", {c_iflags=%#lx, c_oflags=%#lx, ", + (long) tios.c_iflag, (long) tios.c_oflag); + tprintf("c_cflags=%#lx, c_lflags=%#lx, ", + (long) tios.c_cflag, (long) tios.c_lflag); + tprintf("c_line=%u, ", tios.c_line); + if (!(tios.c_lflag & ICANON)) + tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ", + tios.c_cc[VMIN], tios.c_cc[VTIME]); + tprintf("c_cc=\""); + for (i = 0; i < NCCS; i++) + tprintf("\\x%02x", tios.c_cc[i]); + tprintf("\"}"); + return 1; +#endif /* TCGETS */ + +#ifdef TCGETA + case TCGETA: + if (syserror(tcp)) + return 0; + case TCSETA: + case TCSETAW: + case TCSETAF: + if (!verbose(tcp) || umove(tcp, arg, &tio) < 0) + return 0; + if (abbrev(tcp)) { + tprints(", {"); + printxval(baud_options, tio.c_cflag & CBAUD, "B???"); + tprintf(" %sopost %sisig %sicanon %secho ...}", + (tio.c_oflag & OPOST) ? "" : "-", + (tio.c_lflag & ISIG) ? "" : "-", + (tio.c_lflag & ICANON) ? "" : "-", + (tio.c_lflag & ECHO) ? "" : "-"); + return 1; + } + tprintf(", {c_iflags=%#lx, c_oflags=%#lx, ", + (long) tio.c_iflag, (long) tio.c_oflag); + tprintf("c_cflags=%#lx, c_lflags=%#lx, ", + (long) tio.c_cflag, (long) tio.c_lflag); + tprintf("c_line=%u, ", tio.c_line); +#ifdef _VMIN + if (!(tio.c_lflag & ICANON)) + tprintf("c_cc[_VMIN]=%d, c_cc[_VTIME]=%d, ", + tio.c_cc[_VMIN], tio.c_cc[_VTIME]); +#else /* !_VMIN */ + if (!(tio.c_lflag & ICANON)) + tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ", + tio.c_cc[VMIN], tio.c_cc[VTIME]); +#endif /* !_VMIN */ + tprintf("c_cc=\""); + for (i = 0; i < NCC; i++) + tprintf("\\x%02x", tio.c_cc[i]); + tprintf("\"}"); + return 1; +#endif /* TCGETA */ + + /* ioctls with winsize or ttysize args */ + +#ifdef TIOCGWINSZ + case TIOCGWINSZ: + if (syserror(tcp)) + return 0; + case TIOCSWINSZ: + if (!verbose(tcp) || umove(tcp, arg, &ws) < 0) + return 0; + tprintf(", {ws_row=%d, ws_col=%d, ws_xpixel=%d, ws_ypixel=%d}", + ws.ws_row, ws.ws_col, ws.ws_xpixel, ws.ws_ypixel); + return 1; +#endif /* TIOCGWINSZ */ + +#ifdef TIOCGSIZE + case TIOCGSIZE: + if (syserror(tcp)) + return 0; + case TIOCSSIZE: + if (!verbose(tcp) || umove(tcp, arg, &ts) < 0) + return 0; + tprintf(", {ts_lines=%d, ts_cols=%d}", + ts.ts_lines, ts.ts_cols); + return 1; +#endif + + /* ioctls with a direct decodable arg */ +#ifdef TCXONC + case TCXONC: + tprints(", "); + printxval(tcxonc_options, arg, "TC???"); + return 1; +#endif +#ifdef TCLFLSH + case TCFLSH: + tprints(", "); + printxval(tcflsh_options, arg, "TC???"); + return 1; +#endif +#ifdef TIOCSCTTY + case TIOCSCTTY: + tprintf(", %ld", arg); + return 1; +#endif + + /* ioctls with an indirect parameter displayed as modem flags */ + +#ifdef TIOCMGET + case TIOCMGET: + case TIOCMBIS: + case TIOCMBIC: + case TIOCMSET: + if (umove(tcp, arg, &i) < 0) + return 0; + tprints(", ["); + printflags(modem_flags, i, "TIOCM_???"); + tprints("]"); + return 1; +#endif /* TIOCMGET */ + + /* ioctls with an indirect parameter displayed in decimal */ + + case TIOCSPGRP: + case TIOCGPGRP: +#ifdef TIOCGETPGRP + case TIOCGETPGRP: +#endif +#ifdef TIOCSETPGRP + case TIOCSETPGRP: +#endif +#ifdef FIONREAD + case FIONREAD: +#endif + case TIOCOUTQ: +#ifdef FIONBIO + case FIONBIO: +#endif +#ifdef FIOASYNC + case FIOASYNC: +#endif +#ifdef FIOGETOWN + case FIOGETOWN: +#endif +#ifdef FIOSETOWN + case FIOSETOWN: +#endif +#ifdef TIOCGETD + case TIOCGETD: +#endif +#ifdef TIOCSETD + case TIOCSETD: +#endif +#ifdef TIOCPKT + case TIOCPKT: +#endif +#ifdef TIOCREMOTE + case TIOCREMOTE: +#endif +#ifdef TIOCUCNTL + case TIOCUCNTL: +#endif +#ifdef TIOCTCNTL + case TIOCTCNTL: +#endif +#ifdef TIOCSIGNAL + case TIOCSIGNAL: +#endif +#ifdef TIOCSSOFTCAR + case TIOCSSOFTCAR: +#endif +#ifdef TIOCGSOFTCAR + case TIOCGSOFTCAR: +#endif +#ifdef TIOCISPACE + case TIOCISPACE: +#endif +#ifdef TIOCISIZE + case TIOCISIZE: +#endif +#ifdef TIOCSINTR + case TIOCSINTR: +#endif +#ifdef TIOCSPTLCK + case TIOCSPTLCK: +#endif +#ifdef TIOCGPTN + case TIOCGPTN: +#endif + tprints(", "); + printnum_int(tcp, arg, "%d"); + return 1; + + /* ioctls with an indirect parameter displayed as a char */ + +#ifdef TIOCSTI + case TIOCSTI: +#endif + tprints(", "); + printstr(tcp, arg, 1); + return 1; + + /* ioctls with no parameters */ + +#ifdef TIOCNOTTY + case TIOCNOTTY: +#endif +#ifdef FIOCLEX + case FIOCLEX: +#endif +#ifdef FIONCLEX + case FIONCLEX: +#endif +#ifdef TIOCCONS + case TIOCCONS: +#endif + return 1; + + /* ioctls which are unknown */ + + default: + return 0; + } +} diff --git a/alice-strace/tests/Makefile.am b/alice-strace/tests/Makefile.am new file mode 100644 index 0000000..a7f584d --- /dev/null +++ b/alice-strace/tests/Makefile.am @@ -0,0 +1,11 @@ +# Automake input for strace tests. + +AM_CFLAGS = $(WARN_CFLAGS) + +check_PROGRAMS = net-accept-connect + +TESTS = ptrace_setoptions strace-f qual_syscall stat net + +EXTRA_DIST = init.sh $(TESTS) + +CLEANFILES = check.log diff --git a/alice-strace/tests/Makefile.in b/alice-strace/tests/Makefile.in new file mode 100644 index 0000000..abf8196 --- /dev/null +++ b/alice-strace/tests/Makefile.in @@ -0,0 +1,569 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +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 = net-accept-connect$(EXEEXT) +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/includedir.m4 \ + $(top_srcdir)/m4/long_long.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/statfs.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 = +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +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_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +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_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = net-accept-connect.c +DIST_SOURCES = net-accept-connect.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +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@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +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@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +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@ +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@ +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@ +AM_CFLAGS = $(WARN_CFLAGS) +TESTS = ptrace_setoptions strace-f qual_syscall stat net +EXTRA_DIST = init.sh $(TESTS) +CLEANFILES = check.log +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.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; + +$(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-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) +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) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.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 $< + +.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 `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +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_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: + +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." +clean: clean-am + +clean-am: 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 all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic ctags 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 tags uninstall \ + uninstall-am + + +# 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/alice-strace/tests/alice-strace-f b/alice-strace/tests/alice-strace-f new file mode 100755 index 0000000..0f76afc --- /dev/null +++ b/alice-strace/tests/alice-strace-f @@ -0,0 +1,13 @@ +#!/bin/sh + +# Ensure that strace -f works. + +. "${srcdir=.}/init.sh" + +check_strace +check_timeout +time=/usr/bin/time +check_prog $time + +$TIMEOUT $STRACE -f $time /bin/ls > check.log 2>&1 || + { cat check.log; fail_ 'strace -f does not work'; } diff --git a/alice-strace/tests/init.sh b/alice-strace/tests/init.sh new file mode 100644 index 0000000..db7f102 --- /dev/null +++ b/alice-strace/tests/init.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +ME_="${0##*/}" + +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" +} + +check_strace() +{ + STRACE=${*:-../strace} + $STRACE -V > /dev/null || + framework_failure_ "$STRACE is not available" +} + +timeout_duration=60 +check_timeout() +{ + TIMEOUT="timeout -s 9 $timeout_duration" + $TIMEOUT true > /dev/null 2>&1 || + TIMEOUT= +} diff --git a/alice-strace/tests/net b/alice-strace/tests/net new file mode 100755 index 0000000..64bcc77 --- /dev/null +++ b/alice-strace/tests/net @@ -0,0 +1,47 @@ +#!/bin/sh + +# Check how network syscalls are traced. + +. "${srcdir=.}/init.sh" + +check_strace +check_timeout +check_prog grep +check_prog rm + +rm -f check.log.* + +$TIMEOUT ./net-accept-connect || + fail_ 'net-accept-connect failed' + +args='-tt -ff -o check.log -enetwork ./net-accept-connect' +$TIMEOUT $STRACE $args || + fail_ "strace $args failed" + +"$srcdir"/../strace-log-merge check.log > check.log || { + cat check.log + fail_ 'strace-log-merge failed' +} + +rm -f check.log.* + +grep_log() +{ + local syscall="$1"; shift + local prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +' + + LC_ALL=C grep -E -x "$prefix$syscall$@" check.log > /dev/null || { + cat check.log + fail_ "strace -enetwork failed to trace \"$syscall\" properly" + } +} + +grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0' +grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1' +grep_log bind '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0' +grep_log listen '\(0, 5\) += 0' +grep_log getsockname '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0' +grep_log accept '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1' +grep_log connect '\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0' + +exit 0 diff --git a/alice-strace/tests/net-accept-connect.c b/alice-strace/tests/net-accept-connect.c new file mode 100644 index 0000000..5af7d81 --- /dev/null +++ b/alice-strace/tests/net-accept-connect.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include +#include +#include + +#define SUN_PATH "local-stream" +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; + + unlink(SUN_PATH); + close(0); + close(1); + + assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 0); + assert(bind(0, (struct sockaddr *) &addr, len) == 0); + assert(listen(0, 5) == 0); + + memset(&addr, 0, sizeof addr); + assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); + + pid_t pid = fork(); + assert(pid >= 0); + + if (pid) { + assert(accept(0, (struct sockaddr *) &addr, &len) == 1); + assert(close(0) == 0); + int status; + assert(waitpid(pid, &status, 0) == pid); + assert(status == 0); + assert(close(1) == 0); + } else { + assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 1); + assert(close(0) == 0); + assert(connect(1, (struct sockaddr *) &addr, len) == 0); + assert(close(1) == 0); + return 0; + } + + unlink(SUN_PATH); + return 0; +} diff --git a/alice-strace/tests/ptrace_setoptions b/alice-strace/tests/ptrace_setoptions new file mode 100755 index 0000000..38a2a02 --- /dev/null +++ b/alice-strace/tests/ptrace_setoptions @@ -0,0 +1,28 @@ +#!/bin/sh + +# Ensure that strace tests kernel PTRACE_O_TRACECLONE +# and PTRACE_O_TRACESYSGOOD support properly. + +. "${srcdir=.}/init.sh" + +[ "$(uname -s)" = Linux ] || + skip_ 'The kernel is not a Linux kernel' +case "$(uname -r)" in + 2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;; + *) skip_ 'The kernel is not Linux 2.6.* or newer' ;; +esac + +check_strace +check_timeout + +$TIMEOUT $STRACE -df -enone / 2>&1 | + grep -F -x 'ptrace_setoptions = 0xe' > /dev/null || + fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support' + +$TIMEOUT $STRACE -df -enone / 2>&1 | + grep -F -x 'ptrace_setoptions = 0x1f' > /dev/null || + fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support' + +$TIMEOUT $STRACE -d -enone / 2>&1 | + grep -F -x 'ptrace_setoptions = 0x11' > /dev/null || + fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support' diff --git a/alice-strace/tests/qual_syscall b/alice-strace/tests/qual_syscall new file mode 100755 index 0000000..f382f1a --- /dev/null +++ b/alice-strace/tests/qual_syscall @@ -0,0 +1,27 @@ +#!/bin/sh + +# Ensure that strace -e trace=set works. + +. "${srcdir=.}/init.sh" + +check_strace +check_timeout +check_prog ls +check_prog grep + +$TIMEOUT $STRACE -e execve ls > /dev/null 2> check.log && +grep '^execve(' check.log > /dev/null || + { cat check.log; fail_ 'strace -e execve does not work'; } + +grep -v '^execve(' check.log | +LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null && + { cat check.log; fail_ 'strace -e execve does not work properly'; } + +$TIMEOUT $STRACE -e trace=process ls > /dev/null 2> check.log && +grep '^execve(' check.log > /dev/null || + { cat check.log; fail_ 'strace -e trace=process does not work'; } + +grep '^open' check.log > /dev/null && + { cat check.log; fail_ 'strace -e trace=process does not work properly'; } + +exit 0 diff --git a/alice-strace/tests/stat b/alice-strace/tests/stat new file mode 100755 index 0000000..e0fc379 --- /dev/null +++ b/alice-strace/tests/stat @@ -0,0 +1,37 @@ +#!/bin/sh + +# Check how ftruncate, lseek and stat family syscalls are traced. + +. "${srcdir=.}/init.sh" + +check_strace +check_timeout +check_prog dd +check_prog find +check_prog grep +check_prog rm + +umask 022 +truncate_cmd='dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample' +$truncate_cmd > check.log 2>&1 || + { cat check.log; framework_skip_ 'failed to create a large sparse file'; } +rm -f sample + +$TIMEOUT $STRACE -edesc $truncate_cmd 2>&1 > /dev/null 2> check.log && +LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' check.log > /dev/null || + { cat check.log; fail_ 'strace -edesc failed to trace ftruncate/ftruncate64 properly'; } + +LC_ALL=C grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0' check.log > /dev/null || + { cat check.log; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; } + +$TIMEOUT $STRACE -efile find -L sample > /dev/null 2> check.log && +LC_ALL=C grep -E -x 'stat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, 0\) += 0' check.log > /dev/null || + { cat check.log; fail_ 'strace -efile failed to trace stat/stat64 properly'; } + +$TIMEOUT $STRACE -efile find sample > /dev/null 2> check.log && +LC_ALL=C grep -E -x 'lstat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, AT_SYMLINK_NOFOLLOW\) += 0' check.log > /dev/null || + { cat check.log; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; } + +rm -f sample + +exit 0 diff --git a/alice-strace/time.c b/alice-strace/time.c new file mode 100644 index 0000000..e457a5f --- /dev/null +++ b/alice-strace/time.c @@ -0,0 +1,983 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * 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 +#include +#include +#include + +#ifndef UTIME_NOW +#define UTIME_NOW ((1l << 30) - 1l) +#endif +#ifndef UTIME_OMIT +#define UTIME_OMIT ((1l << 30) - 2l) +#endif + +struct timeval32 +{ + u_int32_t tv_sec, tv_usec; +}; + +static void +tprint_timeval32(struct tcb *tcp, const struct timeval32 *tv) +{ + tprintf("{%u, %u}", tv->tv_sec, tv->tv_usec); +} + +static void +tprint_timeval(struct tcb *tcp, const struct timeval *tv) +{ + tprintf("{%lu, %lu}", + (unsigned long) tv->tv_sec, (unsigned long) tv->tv_usec); +} + +void +printtv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness, int special) +{ + char buf[TIMEVAL_TEXT_BUFSIZE]; + sprinttv(buf, tcp, addr, bitness, special); + tprints(buf); +} + +char * +sprinttv(char *buf, struct tcb *tcp, long addr, enum bitness_t bitness, int special) +{ + int rc; + + if (addr == 0) + return stpcpy(buf, "NULL"); + + if (!verbose(tcp)) + return buf + sprintf(buf, "%#lx", addr); + + if (bitness == BITNESS_32 +#if SUPPORTED_PERSONALITIES > 1 + || current_wordsize == 4 +#endif + ) + { + struct timeval32 tv; + + rc = umove(tcp, addr, &tv); + if (rc >= 0) { + if (special && tv.tv_sec == 0) { + if (tv.tv_usec == UTIME_NOW) + return stpcpy(buf, "UTIME_NOW"); + if (tv.tv_usec == UTIME_OMIT) + return stpcpy(buf, "UTIME_OMIT"); + } + return buf + sprintf(buf, "{%u, %u}", + tv.tv_sec, tv.tv_usec); + } + } else { + struct timeval tv; + + rc = umove(tcp, addr, &tv); + if (rc >= 0) { + if (special && tv.tv_sec == 0) { + if (tv.tv_usec == UTIME_NOW) + return stpcpy(buf, "UTIME_NOW"); + if (tv.tv_usec == UTIME_OMIT) + return stpcpy(buf, "UTIME_OMIT"); + } + return buf + sprintf(buf, "{%lu, %lu}", + (unsigned long) tv.tv_sec, + (unsigned long) tv.tv_usec); + } + } + + return stpcpy(buf, "{...}"); +} + +void +print_timespec(struct tcb *tcp, long addr) +{ + char buf[TIMESPEC_TEXT_BUFSIZE]; + sprint_timespec(buf, tcp, addr); + tprints(buf); +} + +void +sprint_timespec(char *buf, struct tcb *tcp, long addr) +{ + if (addr == 0) + strcpy(buf, "NULL"); + else if (!verbose(tcp)) + sprintf(buf, "%#lx", addr); + else { + int rc; + +#if SUPPORTED_PERSONALITIES > 1 + if (current_wordsize == 4) { + struct timeval32 tv; + + rc = umove(tcp, addr, &tv); + if (rc >= 0) + sprintf(buf, "{%u, %u}", + tv.tv_sec, tv.tv_usec); + } else +#endif + { + struct timespec ts; + + rc = umove(tcp, addr, &ts); + if (rc >= 0) + sprintf(buf, "{%lu, %lu}", + (unsigned long) ts.tv_sec, + (unsigned long) ts.tv_nsec); + } + if (rc < 0) + strcpy(buf, "{...}"); + } +} + +int +sys_time(struct tcb *tcp) +{ + if (exiting(tcp)) { + printnum(tcp, tcp->u_arg[0], "%ld"); + } + return 0; +} + +int +sys_stime(struct tcb *tcp) +{ + if (exiting(tcp)) { + printnum(tcp, tcp->u_arg[0], "%ld"); + } + return 0; +} + +int +sys_gettimeofday(struct tcb *tcp) +{ + if (exiting(tcp)) { + if (syserror(tcp)) { + tprintf("%#lx, %#lx", + tcp->u_arg[0], tcp->u_arg[1]); + return 0; + } + printtv(tcp, tcp->u_arg[0]); + tprints(", "); + printtv(tcp, tcp->u_arg[1]); + } + return 0; +} + +#ifdef ALPHA +int +sys_osf_gettimeofday(struct tcb *tcp) +{ + if (exiting(tcp)) { + if (syserror(tcp)) { + tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]); + return 0; + } + printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0); + tprints(", "); + printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0); + } + return 0; +} +#endif + +int +sys_settimeofday(struct tcb *tcp) +{ + if (entering(tcp)) { + printtv(tcp, tcp->u_arg[0]); + tprints(", "); + printtv(tcp, tcp->u_arg[1]); + } + return 0; +} + +#ifdef ALPHA +int +sys_osf_settimeofday(struct tcb *tcp) +{ + if (entering(tcp)) { + printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0); + tprints(", "); + printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0); + } + return 0; +} +#endif + +int +sys_adjtime(struct tcb *tcp) +{ + if (entering(tcp)) { + printtv(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printtv(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_nanosleep(struct tcb *tcp) +{ + if (entering(tcp)) { + print_timespec(tcp, tcp->u_arg[0]); + tprints(", "); + } else { + /* Second (returned) timespec is only significant + * if syscall was interrupted. We print only its address + * on _success_, since kernel doesn't modify its value. + */ + if (is_restart_error(tcp) || !tcp->u_arg[1]) + /* Interrupted (or NULL) */ + print_timespec(tcp, tcp->u_arg[1]); + else + /* Success */ + tprintf("%#lx", tcp->u_arg[1]); + } + return 0; +} + +static const struct xlat which[] = { + { ITIMER_REAL, "ITIMER_REAL" }, + { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"}, + { ITIMER_PROF, "ITIMER_PROF" }, + { 0, NULL }, +}; + +static void +printitv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness) +{ + if (addr == 0) + tprints("NULL"); + else if (!verbose(tcp)) + tprintf("%#lx", addr); + else { + int rc; + + if (bitness == BITNESS_32 +#if SUPPORTED_PERSONALITIES > 1 + || current_wordsize == 4 +#endif + ) + { + struct { + struct timeval32 it_interval, it_value; + } itv; + + rc = umove(tcp, addr, &itv); + if (rc >= 0) { + tprints("{it_interval="); + tprint_timeval32(tcp, &itv.it_interval); + tprints(", it_value="); + tprint_timeval32(tcp, &itv.it_value); + tprints("}"); + } + } else { + struct itimerval itv; + + rc = umove(tcp, addr, &itv); + if (rc >= 0) { + tprints("{it_interval="); + tprint_timeval(tcp, &itv.it_interval); + tprints(", it_value="); + tprint_timeval(tcp, &itv.it_value); + tprints("}"); + } + } + if (rc < 0) + tprints("{...}"); + } +} + +#define printitv(tcp, addr) \ + printitv_bitness((tcp), (addr), BITNESS_CURRENT) + +int +sys_getitimer(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(which, tcp->u_arg[0], "ITIMER_???"); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printitv(tcp, tcp->u_arg[1]); + } + return 0; +} + +#ifdef ALPHA +int +sys_osf_getitimer(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(which, tcp->u_arg[0], "ITIMER_???"); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printitv_bitness(tcp, tcp->u_arg[1], BITNESS_32); + } + return 0; +} +#endif + +int +sys_setitimer(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(which, tcp->u_arg[0], "ITIMER_???"); + tprints(", "); + printitv(tcp, tcp->u_arg[1]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[2]); + else + printitv(tcp, tcp->u_arg[2]); + } + return 0; +} + +#ifdef ALPHA +int +sys_osf_setitimer(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(which, tcp->u_arg[0], "ITIMER_???"); + tprints(", "); + printitv_bitness(tcp, tcp->u_arg[1], BITNESS_32); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[2]); + else + printitv_bitness(tcp, tcp->u_arg[2], BITNESS_32); + } + return 0; +} +#endif + +static const struct xlat adjtimex_modes[] = { + { 0, "0" }, +#ifdef ADJ_OFFSET + { ADJ_OFFSET, "ADJ_OFFSET" }, +#endif +#ifdef ADJ_FREQUENCY + { ADJ_FREQUENCY, "ADJ_FREQUENCY" }, +#endif +#ifdef ADJ_MAXERROR + { ADJ_MAXERROR, "ADJ_MAXERROR" }, +#endif +#ifdef ADJ_ESTERROR + { ADJ_ESTERROR, "ADJ_ESTERROR" }, +#endif +#ifdef ADJ_STATUS + { ADJ_STATUS, "ADJ_STATUS" }, +#endif +#ifdef ADJ_TIMECONST + { ADJ_TIMECONST, "ADJ_TIMECONST" }, +#endif +#ifdef ADJ_TICK + { ADJ_TICK, "ADJ_TICK" }, +#endif +#ifdef ADJ_OFFSET_SINGLESHOT + { ADJ_OFFSET_SINGLESHOT, "ADJ_OFFSET_SINGLESHOT" }, +#endif + { 0, NULL } +}; + +static const struct xlat adjtimex_status[] = { +#ifdef STA_PLL + { STA_PLL, "STA_PLL" }, +#endif +#ifdef STA_PPSFREQ + { STA_PPSFREQ, "STA_PPSFREQ" }, +#endif +#ifdef STA_PPSTIME + { STA_PPSTIME, "STA_PPSTIME" }, +#endif +#ifdef STA_FLL + { STA_FLL, "STA_FLL" }, +#endif +#ifdef STA_INS + { STA_INS, "STA_INS" }, +#endif +#ifdef STA_DEL + { STA_DEL, "STA_DEL" }, +#endif +#ifdef STA_UNSYNC + { STA_UNSYNC, "STA_UNSYNC" }, +#endif +#ifdef STA_FREQHOLD + { STA_FREQHOLD, "STA_FREQHOLD" }, +#endif +#ifdef STA_PPSSIGNAL + { STA_PPSSIGNAL, "STA_PPSSIGNAL" }, +#endif +#ifdef STA_PPSJITTER + { STA_PPSJITTER, "STA_PPSJITTER" }, +#endif +#ifdef STA_PPSWANDER + { STA_PPSWANDER, "STA_PPSWANDER" }, +#endif +#ifdef STA_PPSERROR + { STA_PPSERROR, "STA_PPSERROR" }, +#endif +#ifdef STA_CLOCKERR + { STA_CLOCKERR, "STA_CLOCKERR" }, +#endif +#ifdef STA_NANO + { STA_NANO, "STA_NANO" }, +#endif +#ifdef STA_MODE + { STA_MODE, "STA_MODE" }, +#endif +#ifdef STA_CLK + { STA_CLK, "STA_CLK" }, +#endif + { 0, NULL } +}; + +static const struct xlat adjtimex_state[] = { +#ifdef TIME_OK + { TIME_OK, "TIME_OK" }, +#endif +#ifdef TIME_INS + { TIME_INS, "TIME_INS" }, +#endif +#ifdef TIME_DEL + { TIME_DEL, "TIME_DEL" }, +#endif +#ifdef TIME_OOP + { TIME_OOP, "TIME_OOP" }, +#endif +#ifdef TIME_WAIT + { TIME_WAIT, "TIME_WAIT" }, +#endif +#ifdef TIME_ERROR + { TIME_ERROR, "TIME_ERROR" }, +#endif + { 0, NULL } +}; + +#if SUPPORTED_PERSONALITIES > 1 +static int +tprint_timex32(struct tcb *tcp, long addr) +{ + struct { + unsigned int modes; + int offset; + int freq; + int maxerror; + int esterror; + int status; + int constant; + int precision; + int tolerance; + struct timeval32 time; + int tick; + int ppsfreq; + int jitter; + int shift; + int stabil; + int jitcnt; + int calcnt; + int errcnt; + int stbcnt; + } tx; + + if (umove(tcp, addr, &tx) < 0) + return -1; + + tprints("{modes="); + printflags(adjtimex_modes, tx.modes, "ADJ_???"); + tprintf(", offset=%d, freq=%d, maxerror=%d, ", + tx.offset, tx.freq, tx.maxerror); + tprintf("esterror=%u, status=", tx.esterror); + printflags(adjtimex_status, tx.status, "STA_???"); + tprintf(", constant=%d, precision=%u, ", + tx.constant, tx.precision); + tprintf("tolerance=%d, time=", tx.tolerance); + tprint_timeval32(tcp, &tx.time); + tprintf(", tick=%d, ppsfreq=%d, jitter=%d", + tx.tick, tx.ppsfreq, tx.jitter); + tprintf(", shift=%d, stabil=%d, jitcnt=%d", + tx.shift, tx.stabil, tx.jitcnt); + tprintf(", calcnt=%d, errcnt=%d, stbcnt=%d", + tx.calcnt, tx.errcnt, tx.stbcnt); + tprints("}"); + return 0; +} +#endif /* SUPPORTED_PERSONALITIES > 1 */ + +static int +tprint_timex(struct tcb *tcp, long addr) +{ + struct timex tx; + +#if SUPPORTED_PERSONALITIES > 1 + if (current_wordsize == 4) + return tprint_timex32(tcp, addr); +#endif + if (umove(tcp, addr, &tx) < 0) + return -1; + +#if LINUX_VERSION_CODE < 66332 + tprintf("{mode=%d, offset=%ld, frequency=%ld, ", + tx.mode, tx.offset, tx.frequency); + tprintf("maxerror=%ld, esterror=%lu, status=%u, ", + tx.maxerror, tx.esterror, tx.status); + tprintf("time_constant=%ld, precision=%lu, ", + tx.time_constant, tx.precision); + tprintf("tolerance=%ld, time=", tx.tolerance); + tprint_timeval(tcp, &tx.time); +#else + tprints("{modes="); + printflags(adjtimex_modes, tx.modes, "ADJ_???"); + tprintf(", offset=%ld, freq=%ld, maxerror=%ld, ", + (long) tx.offset, (long) tx.freq, (long) tx.maxerror); + tprintf("esterror=%lu, status=", (long) tx.esterror); + printflags(adjtimex_status, tx.status, "STA_???"); + tprintf(", constant=%ld, precision=%lu, ", + (long) tx.constant, (long) tx.precision); + tprintf("tolerance=%ld, time=", (long) tx.tolerance); + tprint_timeval(tcp, &tx.time); + tprintf(", tick=%ld, ppsfreq=%ld, jitter=%ld", + (long) tx.tick, (long) tx.ppsfreq, (long) tx.jitter); + tprintf(", shift=%d, stabil=%ld, jitcnt=%ld", + tx.shift, (long) tx.stabil, (long) tx.jitcnt); + tprintf(", calcnt=%ld, errcnt=%ld, stbcnt=%ld", + (long) tx.calcnt, (long) tx.errcnt, (long) tx.stbcnt); +#endif + tprints("}"); + return 0; +} + +static int +do_adjtimex(struct tcb *tcp, long addr) +{ + if (addr == 0) + tprints("NULL"); + else if (syserror(tcp) || !verbose(tcp)) + tprintf("%#lx", addr); + else if (tprint_timex(tcp, addr) < 0) + tprints("{...}"); + if (syserror(tcp)) + return 0; + tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval); + if (tcp->auxstr) + return RVAL_STR; + return 0; +} + +int +sys_adjtimex(struct tcb *tcp) +{ + if (exiting(tcp)) + return do_adjtimex(tcp, tcp->u_arg[0]); + return 0; +} + +static const struct xlat clockflags[] = { + { TIMER_ABSTIME, "TIMER_ABSTIME" }, + { 0, NULL } +}; + +static const struct xlat clocknames[] = { +#ifdef CLOCK_REALTIME + { CLOCK_REALTIME, "CLOCK_REALTIME" }, +#endif +#ifdef CLOCK_MONOTONIC + { CLOCK_MONOTONIC, "CLOCK_MONOTONIC" }, +#endif +#ifdef CLOCK_PROCESS_CPUTIME_ID + { CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID" }, +#endif +#ifdef CLOCK_THREAD_CPUTIME_ID + { CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID" }, +#endif +#ifdef CLOCK_MONOTONIC_RAW + { CLOCK_MONOTONIC_RAW, "CLOCK_MONOTONIC_RAW" }, +#endif +#ifdef CLOCK_REALTIME_COARSE + { CLOCK_REALTIME_COARSE, "CLOCK_REALTIME_COARSE" }, +#endif +#ifdef CLOCK_MONOTONIC_COARSE + { CLOCK_MONOTONIC_COARSE, "CLOCK_MONOTONIC_COARSE" }, +#endif + { 0, NULL } +}; + +int +sys_clock_settime(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + printtv(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_clock_gettime(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printtv(tcp, tcp->u_arg[1]); + } + return 0; +} + +int +sys_clock_nanosleep(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + printflags(clockflags, tcp->u_arg[1], "TIMER_???"); + tprints(", "); + printtv(tcp, tcp->u_arg[2]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[3]); + else + printtv(tcp, tcp->u_arg[3]); + } + return 0; +} + +int +sys_clock_adjtime(struct tcb *tcp) +{ + if (exiting(tcp)) + return do_adjtimex(tcp, tcp->u_arg[1]); + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + return 0; +} + +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif +static const struct xlat sigev_value[] = { + { SIGEV_SIGNAL+1, "SIGEV_SIGNAL" }, + { SIGEV_NONE+1, "SIGEV_NONE" }, + { SIGEV_THREAD+1, "SIGEV_THREAD" }, + { SIGEV_THREAD_ID+1, "SIGEV_THREAD_ID" }, + { 0, NULL } +}; + +#if SUPPORTED_PERSONALITIES > 1 +static void +printsigevent32(struct tcb *tcp, long arg) +{ + struct { + int sigev_value; + int sigev_signo; + int sigev_notify; + + union { + int tid; + struct { + int function, attribute; + } thread; + } un; + } sev; + + if (umove(tcp, arg, &sev) < 0) + tprints("{...}"); + else { + tprintf("{%#x, ", sev.sigev_value); + if (sev.sigev_notify == SIGEV_SIGNAL) + tprintf("%s, ", signame(sev.sigev_signo)); + else + tprintf("%u, ", sev.sigev_signo); + printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???"); + tprints(", "); + if (sev.sigev_notify == SIGEV_THREAD_ID) + tprintf("{%d}", sev.un.tid); + else if (sev.sigev_notify == SIGEV_THREAD) + tprintf("{%#x, %#x}", + sev.un.thread.function, + sev.un.thread.attribute); + else + tprints("{...}"); + tprints("}"); + } +} +#endif + +void +printsigevent(struct tcb *tcp, long arg) +{ + struct sigevent sev; + +#if SUPPORTED_PERSONALITIES > 1 + if (current_wordsize == 4) { + printsigevent32(tcp, arg); + return; + } +#endif + if (umove(tcp, arg, &sev) < 0) + tprints("{...}"); + else { + tprintf("{%p, ", sev.sigev_value.sival_ptr); + if (sev.sigev_notify == SIGEV_SIGNAL) + tprintf("%s, ", signame(sev.sigev_signo)); + else + tprintf("%u, ", sev.sigev_signo); + printxval(sigev_value, sev.sigev_notify+1, "SIGEV_???"); + tprints(", "); + if (sev.sigev_notify == SIGEV_THREAD_ID) + /* _pad[0] is the _tid field which might not be + present in the userlevel definition of the + struct. */ + tprintf("{%d}", sev._sigev_un._pad[0]); + else if (sev.sigev_notify == SIGEV_THREAD) + tprintf("{%p, %p}", sev.sigev_notify_function, + sev.sigev_notify_attributes); + else + tprints("{...}"); + tprints("}"); + } +} + +int +sys_timer_create(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + printsigevent(tcp, tcp->u_arg[1]); + tprints(", "); + } else { + int timer_id; + + if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &timer_id) < 0) + tprintf("%#lx", tcp->u_arg[2]); + else + tprintf("{%d}", timer_id); + } + return 0; +} + +int +sys_timer_settime(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, ", tcp->u_arg[0]); + printflags(clockflags, tcp->u_arg[1], "TIMER_???"); + tprints(", "); + printitv(tcp, tcp->u_arg[2]); + tprints(", "); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[3]); + else + printitv(tcp, tcp->u_arg[3]); + } + return 0; +} + +int +sys_timer_gettime(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lx, ", tcp->u_arg[0]); + } else { + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + printitv(tcp, tcp->u_arg[1]); + } + return 0; +} + +static void +print_rtc(struct tcb *tcp, const struct rtc_time *rt) +{ + tprintf("{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 (!abbrev(tcp)) + tprintf("tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); + else + tprints("...}"); +} + +int +rtc_ioctl(struct tcb *tcp, long code, long arg) +{ + switch (code) { + case RTC_ALM_SET: + case RTC_SET_TIME: + if (entering(tcp)) { + struct rtc_time rt; + if (umove(tcp, arg, &rt) < 0) + tprintf(", %#lx", arg); + else { + tprints(", "); + print_rtc(tcp, &rt); + } + } + break; + case RTC_ALM_READ: + case RTC_RD_TIME: + if (exiting(tcp)) { + struct rtc_time rt; + if (syserror(tcp) || umove(tcp, arg, &rt) < 0) + tprintf(", %#lx", arg); + else { + tprints(", "); + print_rtc(tcp, &rt); + } + } + break; + case RTC_IRQP_SET: + case RTC_EPOCH_SET: + if (entering(tcp)) + tprintf(", %lu", arg); + break; + case RTC_IRQP_READ: + case RTC_EPOCH_READ: + if (exiting(tcp)) + tprintf(", %lu", arg); + break; + case RTC_WKALM_SET: + if (entering(tcp)) { + struct rtc_wkalrm wk; + if (umove(tcp, arg, &wk) < 0) + tprintf(", %#lx", arg); + else { + tprintf(", {enabled=%d, pending=%d, ", + wk.enabled, wk.pending); + print_rtc(tcp, &wk.time); + tprints("}"); + } + } + break; + case RTC_WKALM_RD: + if (exiting(tcp)) { + struct rtc_wkalrm wk; + if (syserror(tcp) || umove(tcp, arg, &wk) < 0) + tprintf(", %#lx", arg); + else { + tprintf(", {enabled=%d, pending=%d, ", + wk.enabled, wk.pending); + print_rtc(tcp, &wk.time); + tprints("}"); + } + } + break; + default: + if (entering(tcp)) + tprintf(", %#lx", arg); + break; + } + return 1; +} + +#ifndef TFD_TIMER_ABSTIME +#define TFD_TIMER_ABSTIME (1 << 0) +#endif + +static const struct xlat timerfdflags[] = { + { TFD_TIMER_ABSTIME, "TFD_TIMER_ABSTIME" }, + { 0, NULL } +}; + +int +sys_timerfd(struct tcb *tcp) +{ + if (entering(tcp)) { + /* It does not matter that the kernel uses itimerspec. */ + tprintf("%ld, ", tcp->u_arg[0]); + printxval(clocknames, tcp->u_arg[1], "CLOCK_???"); + tprints(", "); + printflags(timerfdflags, tcp->u_arg[2], "TFD_???"); + tprints(", "); + printitv(tcp, tcp->u_arg[3]); + } + return 0; +} + +int +sys_timerfd_create(struct tcb *tcp) +{ + if (entering(tcp)) { + printxval(clocknames, tcp->u_arg[0], "CLOCK_???"); + tprints(", "); + printflags(timerfdflags, tcp->u_arg[1], "TFD_???"); + } + return 0; +} + +int +sys_timerfd_settime(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printflags(timerfdflags, tcp->u_arg[1], "TFD_???"); + tprints(", "); + printitv(tcp, tcp->u_arg[2]); + tprints(", "); + printitv(tcp, tcp->u_arg[3]); + } + return 0; +} + +int +sys_timerfd_gettime(struct tcb *tcp) +{ + if (entering(tcp)) { + printfd(tcp, tcp->u_arg[0]); + tprints(", "); + printitv(tcp, tcp->u_arg[1]); + } + return 0; +} diff --git a/alice-strace/util.c b/alice-strace/util.c new file mode 100644 index 0000000..4cf7a36 --- /dev/null +++ b/alice-strace/util.c @@ -0,0 +1,1525 @@ +/* + * 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) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Linux for s390 port by D.J. Barrow + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING 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 +#if HAVE_SYS_UIO_H +# include +#endif + +#if defined(IA64) +# include +# include +#endif + +#ifdef HAVE_SYS_REG_H +# include +# define PTRACE_PEEKUSR PTRACE_PEEKUSER +#elif defined(HAVE_LINUX_PTRACE_H) +# undef PTRACE_SYSCALL +# ifdef HAVE_STRUCT_IA64_FPREG +# define ia64_fpreg XXX_ia64_fpreg +# endif +# ifdef HAVE_STRUCT_PT_ALL_USER_REGS +# define pt_all_user_regs XXX_pt_all_user_regs +# endif +# include +# undef ia64_fpreg +# undef pt_all_user_regs +#endif + +/* macros */ +#ifndef MAX +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef MIN +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +int +string_to_uint(const char *str) +{ + char *error; + long value; + + if (!*str) + return -1; + errno = 0; + value = strtol(str, &error, 10); + if (errno || *error || value < 0 || (long)(int)value != value) + return -1; + return (int)value; +} + +int +tv_nz(struct timeval *a) +{ + return a->tv_sec || a->tv_usec; +} + +int +tv_cmp(struct timeval *a, struct timeval *b) +{ + if (a->tv_sec < b->tv_sec + || (a->tv_sec == b->tv_sec && a->tv_usec < b->tv_usec)) + return -1; + if (a->tv_sec > b->tv_sec + || (a->tv_sec == b->tv_sec && a->tv_usec > b->tv_usec)) + return 1; + return 0; +} + +double +tv_float(struct timeval *tv) +{ + return tv->tv_sec + tv->tv_usec/1000000.0; +} + +void +tv_add(struct timeval *tv, struct timeval *a, struct timeval *b) +{ + tv->tv_sec = a->tv_sec + b->tv_sec; + tv->tv_usec = a->tv_usec + b->tv_usec; + if (tv->tv_usec >= 1000000) { + tv->tv_sec++; + tv->tv_usec -= 1000000; + } +} + +void +tv_sub(struct timeval *tv, struct timeval *a, struct timeval *b) +{ + tv->tv_sec = a->tv_sec - b->tv_sec; + tv->tv_usec = a->tv_usec - b->tv_usec; + if (((long) tv->tv_usec) < 0) { + tv->tv_sec--; + tv->tv_usec += 1000000; + } +} + +void +tv_div(struct timeval *tv, struct timeval *a, int n) +{ + tv->tv_usec = (a->tv_sec % n * 1000000 + a->tv_usec + n / 2) / n; + tv->tv_sec = a->tv_sec / n + tv->tv_usec / 1000000; + tv->tv_usec %= 1000000; +} + +void +tv_mul(struct timeval *tv, struct timeval *a, int n) +{ + tv->tv_usec = a->tv_usec * n; + tv->tv_sec = a->tv_sec * n + tv->tv_usec / 1000000; + tv->tv_usec %= 1000000; +} + +const char * +xlookup(const struct xlat *xlat, int val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +#if !defined HAVE_STPCPY +char * +stpcpy(char *dst, const char *src) +{ + while ((*dst = *src++) != '\0') + dst++; + return dst; +} +#endif + +/* + * Print entry in struct xlat table, if there. + */ +void +printxval(const struct xlat *xlat, int val, const char *dflt) +{ + const char *str = xlookup(xlat, val); + + if (str) + tprints(str); + else + tprintf("%#x /* %s */", val, dflt); +} + +/* + * Print 64bit argument at position arg_no and return the index of the next + * argument. + */ +int +printllval(struct tcb *tcp, const char *format, int arg_no) +{ +#if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG +# if SUPPORTED_PERSONALITIES > 1 + if (current_wordsize > 4) { +# endif + tprintf(format, tcp->u_arg[arg_no]); + arg_no++; +# if SUPPORTED_PERSONALITIES > 1 + } else { +# if defined(AARCH64) || defined(POWERPC64) + /* Align arg_no to the next even number. */ + arg_no = (arg_no + 1) & 0xe; +# endif + tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1])); + arg_no += 2; + } +# endif /* SUPPORTED_PERSONALITIES */ +#elif SIZEOF_LONG > 4 +# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG +#elif defined LINUX_MIPSN32 + tprintf(format, tcp->ext_arg[arg_no]); + arg_no++; +#elif defined X32 + if (current_personality == 0) { + tprintf(format, tcp->ext_arg[arg_no]); + arg_no++; + } else { + tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1])); + arg_no += 2; + } +#else +# if defined __ARM_EABI__ || \ + defined LINUX_MIPSO32 || \ + defined POWERPC || \ + defined XTENSA + /* Align arg_no to the next even number. */ + arg_no = (arg_no + 1) & 0xe; +# endif + tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1])); + arg_no += 2; +#endif + + return arg_no; +} + +/* + * Interpret `xlat' as an array of flags + * print the entries whose bits are on in `flags' + * return # of flags printed. + */ +void +addflags(const struct xlat *xlat, int flags) +{ + for (; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + tprintf("|%s", xlat->str); + flags &= ~xlat->val; + } + } + if (flags) { + tprintf("|%#x", flags); + } +} + +/* + * Interpret `xlat' as an array of flags. + * Print to static string the entries whose bits are on in `flags' + * Return static string. + */ +const char * +sprintflags(const char *prefix, const struct xlat *xlat, int flags) +{ + static char outstr[1024]; + char *outptr; + int found = 0; + + outptr = stpcpy(outstr, prefix); + + for (; xlat->str; xlat++) { + if ((flags & xlat->val) == xlat->val) { + if (found) + *outptr++ = '|'; + outptr = stpcpy(outptr, xlat->str); + found = 1; + flags &= ~xlat->val; + if (!flags) + break; + } + } + if (flags) { + if (found) + *outptr++ = '|'; + outptr += sprintf(outptr, "%#x", flags); + } + + return outstr; +} + +int +printflags(const struct xlat *xlat, int flags, const char *dflt) +{ + int n; + const char *sep; + + if (flags == 0 && xlat->val == 0) { + tprints(xlat->str); + return 1; + } + + sep = ""; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + tprintf("%s%s", sep, xlat->str); + flags &= ~xlat->val; + sep = "|"; + n++; + } + } + + if (n) { + if (flags) { + tprintf("%s%#x", sep, flags); + n++; + } + } else { + if (flags) { + tprintf("%#x", flags); + if (dflt) + tprintf(" /* %s */", dflt); + } else { + if (dflt) + tprints("0"); + } + } + + return n; +} + +void +printnum(struct tcb *tcp, long addr, const char *fmt) +{ + long num; + + if (!addr) { + tprints("NULL"); + return; + } + if (umove(tcp, addr, &num) < 0) { + tprintf("%#lx", addr); + return; + } + tprints("["); + tprintf(fmt, num); + tprints("]"); +} + +void +printnum_int(struct tcb *tcp, long addr, const char *fmt) +{ + int num; + + if (!addr) { + tprints("NULL"); + return; + } + if (umove(tcp, addr, &num) < 0) { + tprintf("%#lx", addr); + return; + } + tprints("["); + tprintf(fmt, num); + tprints("]"); +} + +void +printfd(struct tcb *tcp, int fd) +{ + char path[PATH_MAX + 1]; + + if (show_fd_path && getfdpath(tcp, fd, path, sizeof(path)) >= 0) + tprintf("%d<%s>", fd, path); + else + tprintf("%d", fd); +} + +void +printuid(const char *text, unsigned long uid) +{ + tprintf((uid == -1) ? "%s%ld" : "%s%lu", text, uid); +} + +/* + * Quote string `instr' of length `size' + * Write up to (3 + `size' * 4) bytes to `outstr' buffer. + * If `len' is -1, treat `instr' as a NUL-terminated string + * and quote at most (`size' - 1) bytes. + * + * Returns 0 if len == -1 and NUL was seen, 1 otherwise. + * Note that if len >= 0, always returns 1. + */ +int +string_quote(const char *instr, char *outstr, long len, int size) +{ + const unsigned char *ustr = (const unsigned char *) instr; + char *s = outstr; + int usehex, c, i, eol; + + eol = 0x100; /* this can never match a char */ + if (len == -1) { + size--; + eol = '\0'; + } + + usehex = 0; + if (xflag > 1) + usehex = 1; + else if (xflag) { + /* Check for presence of symbol which require + to hex-quote the whole string. */ + for (i = 0; i < size; ++i) { + c = ustr[i]; + /* Check for NUL-terminated string. */ + if (c == eol) + break; + + /* Force hex unless c is printable or whitespace */ + if (c > 0x7e) { + usehex = 1; + break; + } + /* In ASCII isspace is only these chars: "\t\n\v\f\r". + * They happen to have ASCII codes 9,10,11,12,13. + */ + if (c < ' ' && (unsigned)(c - 9) >= 5) { + usehex = 1; + break; + } + } + } + + *s++ = '\"'; + + if (usehex) { + /* Hex-quote the whole string. */ + for (i = 0; i < size; ++i) { + c = ustr[i]; + /* Check for NUL-terminated string. */ + if (c == eol) + goto asciz_ended; + *s++ = '\\'; + *s++ = 'x'; + *s++ = "0123456789abcdef"[c >> 4]; + *s++ = "0123456789abcdef"[c & 0xf]; + } + } else { + for (i = 0; i < size; ++i) { + c = ustr[i]; + /* Check for NUL-terminated string. */ + if (c == eol) + goto asciz_ended; + switch (c) { + case '\"': case '\\': + *s++ = '\\'; + *s++ = c; + break; + case '\f': + *s++ = '\\'; + *s++ = 'f'; + break; + case '\n': + *s++ = '\\'; + *s++ = 'n'; + break; + case '\r': + *s++ = '\\'; + *s++ = 'r'; + break; + case '\t': + *s++ = '\\'; + *s++ = 't'; + break; + case '\v': + *s++ = '\\'; + *s++ = 'v'; + break; + default: + if (c >= ' ' && c <= 0x7e) + *s++ = c; + else { + /* Print \octal */ + *s++ = '\\'; + if (i + 1 < size + && ustr[i + 1] >= '0' + && ustr[i + 1] <= '9' + ) { + /* Print \ooo */ + *s++ = '0' + (c >> 6); + *s++ = '0' + ((c >> 3) & 0x7); + } else { + /* Print \[[o]o]o */ + if ((c >> 3) != 0) { + if ((c >> 6) != 0) + *s++ = '0' + (c >> 6); + *s++ = '0' + ((c >> 3) & 0x7); + } + } + *s++ = '0' + (c & 0x7); + } + break; + } + } + } + + *s++ = '\"'; + *s = '\0'; + + /* Return zero if we printed entire ASCIZ string (didn't truncate it) */ + if (len == -1 && ustr[i] == '\0') { + /* We didn't see NUL yet (otherwise we'd jump to 'asciz_ended') + * but next char is NUL. + */ + return 0; + } + + return 1; + + asciz_ended: + *s++ = '\"'; + *s = '\0'; + /* Return zero: we printed entire ASCIZ string (didn't truncate it) */ + return 0; +} + +/* + * Print path string specified by address `addr' and length `n'. + * If path length exceeds `n', append `...' to the output. + */ +void +printpathn(struct tcb *tcp, long addr, int n) +{ + char path[MAXPATHLEN + 1]; + int nul_seen; + + if (!addr) { + tprints("NULL"); + return; + } + + /* Cap path length to the path buffer size */ + if (n > sizeof path - 1) + n = sizeof path - 1; + + /* Fetch one byte more to find out whether path length > n. */ + nul_seen = umovestr(tcp, addr, n + 1, path); + if (nul_seen < 0) + tprintf("%#lx", addr); + else { + char *outstr; + + path[n] = '\0'; + n++; + outstr = alloca(4 * n); /* 4*(n-1) + 3 for quotes and NUL */ + string_quote(path, outstr, -1, n); + tprints(outstr); + if (!nul_seen) + tprints("..."); + } +} + +void +printpath(struct tcb *tcp, long addr) +{ + /* Size must correspond to char path[] size in printpathn */ + printpathn(tcp, addr, MAXPATHLEN); +} + +/* + * 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. + */ +void +printstr(struct tcb *tcp, long addr, long len) +{ + static char *str = NULL; + static char *outstr; + int size; + int ellipsis; + + if (!addr) { + tprints("NULL"); + return; + } + /* Allocate static buffers if they are not allocated yet. */ + if (!str) { + unsigned int outstr_size = 4 * max_strlen + /*for quotes and NUL:*/ 3; + + if (outstr_size / 4 != max_strlen) + die_out_of_memory(); + str = malloc(max_strlen + 1); + if (!str) + die_out_of_memory(); + outstr = malloc(outstr_size); + if (!outstr) + die_out_of_memory(); + } + + if (len == -1) { + /* + * Treat as a NUL-terminated string: fetch one byte more + * because string_quote() quotes one byte less. + */ + size = max_strlen + 1; + if (umovestr(tcp, addr, size, str) < 0) { + tprintf("%#lx", addr); + return; + } + } + else { + size = max_strlen; + if (size > (unsigned long)len) + size = (unsigned long)len; + if (umoven(tcp, addr, size, str) < 0) { + tprintf("%#lx", addr); + return; + } + } + + /* 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, len, size) && + (len < 0 || len > max_strlen)); + + tprints(outstr); + if (ellipsis) + tprints("..."); +} + +/* + * Dump bytes specified by address `addr' and length `len'. + */ +void +dump_bytes(struct tcb *tcp, long addr, long len) +{ + char *str; + str = malloc(len + 1); + if (!str) + die_out_of_memory(); + + if (umoven(tcp, addr, len, str) < 0) { + assert(0); + } + + tdump(str, len); + + free(str); +} + + +#if HAVE_SYS_UIO_H +void +dumpiov(struct tcb *tcp, int len, long addr) +{ +#if SUPPORTED_PERSONALITIES > 1 + union { + struct { u_int32_t base; u_int32_t len; } *iov32; + struct { u_int64_t base; u_int64_t len; } *iov64; + } iovu; +#define iov iovu.iov64 +#define sizeof_iov \ + (current_wordsize == 4 ? sizeof(*iovu.iov32) : sizeof(*iovu.iov64)) +#define iov_iov_base(i) \ + (current_wordsize == 4 ? (uint64_t) iovu.iov32[i].base : iovu.iov64[i].base) +#define iov_iov_len(i) \ + (current_wordsize == 4 ? (uint64_t) iovu.iov32[i].len : iovu.iov64[i].len) +#else + struct iovec *iov; +#define sizeof_iov sizeof(*iov) +#define iov_iov_base(i) iov[i].iov_base +#define iov_iov_len(i) iov[i].iov_len +#endif + int i; + unsigned size; + + size = sizeof_iov * len; + /* Assuming no sane program has millions of iovs */ + if ((unsigned)len > 1024*1024 /* insane or negative size? */ + || (iov = malloc(size)) == NULL) { + fprintf(stderr, "Out of memory\n"); + return; + } + if (umoven(tcp, addr, size, (char *) iov) >= 0) { + for (i = 0; i < len; i++) { + /* include the buffer number to make it easy to + * match up the trace with the source */ + tprintf(" * %lu bytes in buffer %d\n", + (unsigned long)iov_iov_len(i), i); + dumpstr(tcp, (long) iov_iov_base(i), + iov_iov_len(i)); + } + } + free(iov); +#undef sizeof_iov +#undef iov_iov_base +#undef iov_iov_len +#undef iov +} +#endif + +void +dumpstr(struct tcb *tcp, long addr, int len) +{ + static int strsize = -1; + static unsigned char *str; + + char outbuf[ + ( + (sizeof( + "xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx " + "1234567890123456") + /*in case I'm off by few:*/ 4) + /*align to 8 to make memset easier:*/ + 7) & -8 + ]; + const unsigned char *src; + int i; + + memset(outbuf, ' ', sizeof(outbuf)); + + if (strsize < len + 16) { + free(str); + str = malloc(len + 16); + if (!str) { + strsize = -1; + fprintf(stderr, "Out of memory\n"); + return; + } + strsize = len + 16; + } + + if (umoven(tcp, addr, len, (char *) str) < 0) + return; + + /* Space-pad to 16 bytes */ + i = len; + while (i & 0xf) + str[i++] = ' '; + + i = 0; + src = str; + while (i < len) { + char *dst = outbuf; + /* Hex dump */ + do { + if (i < len) { + *dst++ = "0123456789abcdef"[*src >> 4]; + *dst++ = "0123456789abcdef"[*src & 0xf]; + } + else { + *dst++ = ' '; + *dst++ = ' '; + } + dst++; /* space is there by memset */ + i++; + if ((i & 7) == 0) + dst++; /* space is there by memset */ + src++; + } while (i & 0xf); + /* ASCII dump */ + i -= 16; + src -= 16; + do { + if (*src >= ' ' && *src < 0x7f) + *dst++ = *src; + else + *dst++ = '.'; + src++; + } while (++i & 0xf); + *dst = '\0'; + tprintf(" | %05x %s |\n", i - 16, outbuf); + } +} + +#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. + * 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, + unsigned long liovcnt, + const struct iovec *rvec, + unsigned long riovcnt, + unsigned long flags) +{ + 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 PAGMASK (~(PAGSIZ - 1)) +/* + * move `len' bytes of data from process `pid' + * at address `addr' to our space at `laddr' + */ +int +umoven(struct tcb *tcp, long addr, int len, char *laddr) +{ + int pid = tcp->pid; + int n, m, nread; + union { + long val; + char x[sizeof(long)]; + } u; + +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize < sizeof(addr)) + addr &= (1ul << 8 * current_wordsize) - 1; +#endif + + if (!process_vm_readv_not_supported) { + struct iovec local[1], remote[1]; + int r; + + local[0].iov_base = laddr; + remote[0].iov_base = (void*)addr; + local[0].iov_len = remote[0].iov_len = len; + r = process_vm_readv(pid, local, 1, remote, 1, 0); + if (r == len) + return 0; + if (r >= 0) { + error_msg("umoven: short read (%d < %d) @0x%lx", + r, len, addr); + return -1; + } + switch (errno) { + case ENOSYS: + process_vm_readv_not_supported = 1; + break; + case ESRCH: + /* the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + return -1; + default: + /* all the rest is strange and should be reported */ + perror_msg("process_vm_readv"); + return -1; + } + } + + nread = 0; + if (addr & (sizeof(long) - 1)) { + /* addr not a multiple of sizeof(long) */ + n = addr - (addr & -sizeof(long)); /* residue */ + addr &= -sizeof(long); /* residue */ + errno = 0; + u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0); + switch (errno) { + case 0: + break; + case ESRCH: case EINVAL: + /* these could be seen if the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + return -1; + default: + /* all the rest is strange and should be reported */ + perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%lx", + pid, addr); + return -1; + } + m = MIN(sizeof(long) - n, len); + memcpy(laddr, &u.x[n], m); + addr += sizeof(long); + laddr += m; + nread += m; + len -= m; + } + while (len) { + errno = 0; + u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0); + switch (errno) { + case 0: + break; + case ESRCH: case EINVAL: + /* these could be seen if the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + if (nread) { + perror_msg("umoven: short read (%d < %d) @0x%lx", + 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", + pid, addr); + return -1; + } + m = MIN(sizeof(long), len); + memcpy(laddr, u.x, m); + addr += sizeof(long); + laddr += m; + nread += m; + len -= m; + } + + return 0; +} + +/* + * Like `umove' but make the additional effort of looking + * for a terminating zero byte. + * + * Returns < 0 on error, > 0 if NUL was seen, + * (TODO if useful: return count of bytes including NUL), + * else 0 if len bytes were read but no NUL byte seen. + * + * Note: there is no guarantee we won't overwrite some bytes + * in laddr[] _after_ terminating NUL (but, of course, + * we never write past laddr[len-1]). + */ +int +umovestr(struct tcb *tcp, long addr, 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 + + int pid = tcp->pid; + int n, m, nread; + union { + unsigned long val; + char x[sizeof(long)]; + } u; + +#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + if (current_wordsize < sizeof(addr)) + addr &= (1ul << 8 * current_wordsize) - 1; +#endif + + nread = 0; + if (!process_vm_readv_not_supported) { + struct iovec local[1], remote[1]; + + local[0].iov_base = laddr; + remote[0].iov_base = (void*)addr; + + while (len > 0) { + int end_in_page; + int r; + int chunk_len; + + /* Don't read kilobytes: most strings are short */ + chunk_len = len; + if (chunk_len > 256) + chunk_len = 256; + /* Don't cross pages. I guess otherwise we can get EFAULT + * and fail to notice that terminating NUL lies + * in the existing (first) page. + * (I hope there aren't arches with pages < 4K) + */ + end_in_page = ((addr + chunk_len) & 4095); + r = chunk_len - end_in_page; + if (r > 0) /* if chunk_len > end_in_page */ + chunk_len = r; /* chunk_len -= end_in_page */ + + local[0].iov_len = remote[0].iov_len = chunk_len; + r = process_vm_readv(pid, local, 1, remote, 1, 0); + if (r > 0) { + if (memchr(local[0].iov_base, '\0', r)) + return 1; + local[0].iov_base += r; + remote[0].iov_base += r; + len -= r; + nread += r; + continue; + } + switch (errno) { + case ENOSYS: + process_vm_readv_not_supported = 1; + goto vm_readv_didnt_work; + case ESRCH: + /* the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + if (nread) { + perror_msg("umovestr: short read (%d < %d) @0x%lx", + nread, nread + len, addr); + } + return -1; + default: + /* all the rest is strange and should be reported */ + perror_msg("process_vm_readv"); + return -1; + } + } + return 0; + } + vm_readv_didnt_work: + + if (addr & (sizeof(long) - 1)) { + /* addr not a multiple of sizeof(long) */ + n = addr - (addr & -sizeof(long)); /* residue */ + addr &= -sizeof(long); /* residue */ + errno = 0; + u.val = ptrace(PTRACE_PEEKDATA, pid, (char *)addr, 0); + switch (errno) { + case 0: + break; + case ESRCH: case EINVAL: + /* these could be seen if the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + return -1; + default: + /* all the rest is strange and should be reported */ + perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%lx", + pid, addr); + return -1; + } + m = MIN(sizeof(long) - n, len); + memcpy(laddr, &u.x[n], m); + while (n & (sizeof(long) - 1)) + if (u.x[n++] == '\0') + return 1; + addr += sizeof(long); + laddr += m; + nread += m; + len -= m; + } + + while (len) { + errno = 0; + u.val = ptrace(PTRACE_PEEKDATA, pid, (char *)addr, 0); + switch (errno) { + case 0: + break; + case ESRCH: case EINVAL: + /* these could be seen if the process is gone */ + return -1; + case EFAULT: case EIO: case EPERM: + /* address space is inaccessible */ + if (nread) { + perror_msg("umovestr: short read (%d < %d) @0x%lx", + 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", + pid, addr); + return -1; + } + m = MIN(sizeof(long), len); + memcpy(laddr, u.x, m); + /* "If a NUL char exists in this word" */ + if ((u.val - x01010101) & ~u.val & x80808080) + return 1; + addr += sizeof(long); + laddr += m; + nread += m; + len -= m; + } + return 0; +} + +int +upeek(struct tcb *tcp, long off, long *res) +{ + long val; + + errno = 0; + val = ptrace(PTRACE_PEEKUSER, tcp->pid, (char *) off, 0); + if (val == -1 && errno) { + if (errno != ESRCH) { + perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", tcp->pid, off); + } + return -1; + } + *res = val; + return 0; +} + +/* Note! On new kernels (about 2.5.46+), we use PTRACE_O_TRACECLONE + * and PTRACE_O_TRACE[V]FORK for tracing children. + * If you are adding a new arch which is only supported by newer kernels, + * you most likely don't need to add any code below + * beside a dummy "return 0" block in change_syscall(). + */ + +/* + * These #if's are huge, please indent them correctly. + * It's easy to get confused otherwise. + */ + +#include "syscall.h" + +#ifndef CLONE_PTRACE +# define CLONE_PTRACE 0x00002000 +#endif +#ifndef CLONE_VFORK +# define CLONE_VFORK 0x00004000 +#endif +#ifndef CLONE_VM +# define CLONE_VM 0x00000100 +#endif + +#ifdef IA64 + +typedef unsigned long *arg_setup_state; + +static int +arg_setup(struct tcb *tcp, arg_setup_state *state) +{ + unsigned long cfm, sof, sol; + long bsp; + + if (ia32) { + /* Satisfy a false GCC warning. */ + *state = NULL; + return 0; + } + + if (upeek(tcp, PT_AR_BSP, &bsp) < 0) + return -1; + if (upeek(tcp, PT_CFM, (long *) &cfm) < 0) + return -1; + + sof = (cfm >> 0) & 0x7f; + sol = (cfm >> 7) & 0x7f; + bsp = (long) ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol); + + *state = (unsigned long *) bsp; + return 0; +} + +# define arg_finish_change(tcp, state) 0 + +static int +get_arg0(struct tcb *tcp, arg_setup_state *state, long *valp) +{ + int ret; + + if (ia32) + ret = upeek(tcp, PT_R11, valp); + else + ret = umoven(tcp, + (unsigned long) ia64_rse_skip_regs(*state, 0), + sizeof(long), (void *) valp); + return ret; +} + +static int +get_arg1(struct tcb *tcp, arg_setup_state *state, long *valp) +{ + int ret; + + if (ia32) + ret = upeek(tcp, PT_R9, valp); + else + ret = umoven(tcp, + (unsigned long) ia64_rse_skip_regs(*state, 1), + sizeof(long), (void *) valp); + return ret; +} + +static int +set_arg0(struct tcb *tcp, arg_setup_state *state, long val) +{ + int req = PTRACE_POKEDATA; + void *ap; + + if (ia32) { + ap = (void *) (intptr_t) PT_R11; /* r11 == EBX */ + req = PTRACE_POKEUSER; + } else + ap = ia64_rse_skip_regs(*state, 0); + errno = 0; + ptrace(req, tcp->pid, ap, val); + return errno ? -1 : 0; +} + +static int +set_arg1(struct tcb *tcp, arg_setup_state *state, long val) +{ + int req = PTRACE_POKEDATA; + void *ap; + + if (ia32) { + ap = (void *) (intptr_t) PT_R9; /* r9 == ECX */ + req = PTRACE_POKEUSER; + } else + ap = ia64_rse_skip_regs(*state, 1); + errno = 0; + ptrace(req, tcp->pid, ap, val); + return errno ? -1 : 0; +} + +/* ia64 does not return the input arguments from functions (and syscalls) + according to ia64 RSE (Register Stack Engine) behavior. */ + +# define restore_arg0(tcp, state, val) ((void) (state), 0) +# define restore_arg1(tcp, state, val) ((void) (state), 0) + +#elif defined(SPARC) || defined(SPARC64) + +# if defined(SPARC64) +# undef PTRACE_GETREGS +# define PTRACE_GETREGS PTRACE_GETREGS64 +# undef PTRACE_SETREGS +# define PTRACE_SETREGS PTRACE_SETREGS64 +# endif + +typedef struct pt_regs arg_setup_state; + +# define arg_setup(tcp, state) \ + (ptrace(PTRACE_GETREGS, (tcp)->pid, (char *) (state), 0)) +# define arg_finish_change(tcp, state) \ + (ptrace(PTRACE_SETREGS, (tcp)->pid, (char *) (state), 0)) + +# define get_arg0(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O0], 0) +# define get_arg1(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O1], 0) +# define set_arg0(tcp, state, val) ((state)->u_regs[U_REG_O0] = (val), 0) +# define set_arg1(tcp, state, val) ((state)->u_regs[U_REG_O1] = (val), 0) +# define restore_arg0(tcp, state, val) 0 + +#else /* other architectures */ + +# if defined S390 || defined S390X +/* Note: this is only true for the `clone' system call, which handles + arguments specially. We could as well say that its first two arguments + are swapped relative to other architectures, but that would just be + another #ifdef in the calls. */ +# define arg0_offset PT_GPR3 +# define arg1_offset PT_ORIGGPR2 +# define restore_arg0(tcp, state, val) ((void) (state), 0) +# define restore_arg1(tcp, state, val) ((void) (state), 0) +# define arg0_index 1 +# define arg1_index 0 +# elif defined(ALPHA) || defined(MIPS) +# define arg0_offset REG_A0 +# define arg1_offset (REG_A0+1) +# elif defined(POWERPC) +# define arg0_offset (sizeof(unsigned long)*PT_R3) +# define arg1_offset (sizeof(unsigned long)*PT_R4) +# define restore_arg0(tcp, state, val) ((void) (state), 0) +# elif defined(HPPA) +# define arg0_offset PT_GR26 +# define arg1_offset (PT_GR26-4) +# elif defined(X86_64) || defined(X32) +# define arg0_offset ((long)(8*(current_personality ? RBX : RDI))) +# define arg1_offset ((long)(8*(current_personality ? RCX : RSI))) +# elif defined(SH) +# define arg0_offset (4*(REG_REG0+4)) +# define arg1_offset (4*(REG_REG0+5)) +# elif defined(SH64) + /* ABI defines arg0 & 1 in r2 & r3 */ +# define arg0_offset (REG_OFFSET+16) +# define arg1_offset (REG_OFFSET+24) +# define restore_arg0(tcp, state, val) 0 +# elif defined CRISV10 || defined CRISV32 +# define arg0_offset (4*PT_R11) +# define arg1_offset (4*PT_ORIG_R10) +# define restore_arg0(tcp, state, val) 0 +# define restore_arg1(tcp, state, val) 0 +# define arg0_index 1 +# define arg1_index 0 +# else +# define arg0_offset 0 +# define arg1_offset 4 +# if defined ARM +# define restore_arg0(tcp, state, val) 0 +# endif +# endif + +typedef int arg_setup_state; + +# define arg_setup(tcp, state) (0) +# define arg_finish_change(tcp, state) 0 +# define get_arg0(tcp, cookie, valp) (upeek((tcp), arg0_offset, (valp))) +# define get_arg1(tcp, cookie, valp) (upeek((tcp), arg1_offset, (valp))) + +static int +set_arg0(struct tcb *tcp, void *cookie, long val) +{ + return ptrace(PTRACE_POKEUSER, tcp->pid, (char*)arg0_offset, val); +} + +static int +set_arg1(struct tcb *tcp, void *cookie, long val) +{ + return ptrace(PTRACE_POKEUSER, tcp->pid, (char*)arg1_offset, val); +} + +#endif /* architectures */ + +#ifndef restore_arg0 +# define restore_arg0(tcp, state, val) set_arg0((tcp), (state), (val)) +#endif +#ifndef restore_arg1 +# define restore_arg1(tcp, state, val) set_arg1((tcp), (state), (val)) +#endif + +#ifndef arg0_index +# define arg0_index 0 +# define arg1_index 1 +#endif + +static int +change_syscall(struct tcb *tcp, arg_setup_state *state, int new) +{ +#if defined(I386) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0) + return -1; + return 0; +#elif defined(X86_64) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_RAX * 8), new) < 0) + return -1; + return 0; +#elif defined(X32) + /* setbpt/clearbpt never used: */ + /* X32 is only supported since about linux-3.0.30 */ +#elif defined(POWERPC) + if (ptrace(PTRACE_POKEUSER, tcp->pid, + (char*)(sizeof(unsigned long)*PT_R0), new) < 0) + return -1; + return 0; +#elif defined(S390) || defined(S390X) + /* s390 linux after 2.4.7 has a hook in entry.S to allow this */ + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR2), new) < 0) + return -1; + return 0; +#elif defined(M68K) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_ORIG_D0), new) < 0) + return -1; + return 0; +#elif defined(SPARC) || defined(SPARC64) + state->u_regs[U_REG_G1] = new; + return 0; +#elif defined(MIPS) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), new) < 0) + return -1; + return 0; +#elif defined(ALPHA) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new) < 0) + return -1; + return 0; +#elif defined(AVR32) + /* setbpt/clearbpt never used: */ + /* AVR32 is only supported since about linux-2.6.19 */ +#elif defined(BFIN) + /* setbpt/clearbpt never used: */ + /* Blackfin is only supported since about linux-2.6.23 */ +#elif defined(IA64) + if (ia32) { + switch (new) { + case 2: + break; /* x86 SYS_fork */ + case SYS_clone: + new = 120; + break; + default: + fprintf(stderr, "%s: unexpected syscall %d\n", + __FUNCTION__, new); + return -1; + } + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R1), new) < 0) + return -1; + } else if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R15), new) < 0) + return -1; + return 0; +#elif defined(HPPA) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GR20), new) < 0) + return -1; + return 0; +#elif defined(SH) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*(REG_REG0+3)), new) < 0) + return -1; + return 0; +#elif defined(SH64) + /* Top half of reg encodes the no. of args n as 0x1n. + Assume 0 args as kernel never actually checks... */ + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_SYSCALL), + 0x100000 | new) < 0) + return -1; + return 0; +#elif defined(CRISV10) || defined(CRISV32) + if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0) + return -1; + return 0; +#elif defined(ARM) + /* Some kernels support this, some (pre-2.6.16 or so) don't. */ +# ifndef PTRACE_SET_SYSCALL +# define PTRACE_SET_SYSCALL 23 +# endif + if (ptrace(PTRACE_SET_SYSCALL, tcp->pid, 0, new & 0xffff) != 0) + return -1; + return 0; +#elif defined(AARCH64) + /* setbpt/clearbpt never used: */ + /* AARCH64 is only supported since about linux-3.0.31 */ +#elif defined(TILE) + /* setbpt/clearbpt never used: */ + /* Tilera CPUs are only supported since about linux-2.6.34 */ +#elif defined(MICROBLAZE) + /* setbpt/clearbpt never used: */ + /* microblaze is only supported since about linux-2.6.30 */ +#elif defined(OR1K) + /* never reached; OR1K is only supported by kernels since 3.1.0. */ +#elif defined(METAG) + /* setbpt/clearbpt never used: */ + /* Meta is only supported since linux-3.7 */ +#elif defined(XTENSA) + /* setbpt/clearbpt never used: */ + /* Xtensa is only supported since linux 2.6.13 */ +#else +#warning Do not know how to handle change_syscall for this architecture +#endif /* architecture */ + return -1; +} + +int +setbpt(struct tcb *tcp) +{ + static int clone_scno[SUPPORTED_PERSONALITIES] = { SYS_clone }; + arg_setup_state state; + + if (tcp->flags & TCB_BPTSET) { + fprintf(stderr, "PANIC: TCB already set in pid %u\n", tcp->pid); + return -1; + } + + /* + * It's a silly kludge to initialize this with a search at runtime. + * But it's better than maintaining another magic thing in the + * godforsaken tables. + */ + if (clone_scno[current_personality] == 0) { + int i; + for (i = 0; i < nsyscalls; ++i) + if (sysent[i].sys_func == sys_clone) { + clone_scno[current_personality] = i; + break; + } + } + + if (tcp->s_ent->sys_func == sys_fork || + tcp->s_ent->sys_func == sys_vfork) { + if (arg_setup(tcp, &state) < 0 + || get_arg0(tcp, &state, &tcp->inst[0]) < 0 + || get_arg1(tcp, &state, &tcp->inst[1]) < 0 + || change_syscall(tcp, &state, + clone_scno[current_personality]) < 0 + || set_arg0(tcp, &state, CLONE_PTRACE|SIGCHLD) < 0 + || set_arg1(tcp, &state, 0) < 0 + || arg_finish_change(tcp, &state) < 0) + return -1; + tcp->u_arg[arg0_index] = CLONE_PTRACE|SIGCHLD; + tcp->u_arg[arg1_index] = 0; + tcp->flags |= TCB_BPTSET; + return 0; + } + + if (tcp->s_ent->sys_func == sys_clone) { + /* ia64 calls directly `clone (CLONE_VFORK | CLONE_VM)' + contrary to x86 vfork above. Even on x86 we turn the + vfork semantics into plain fork - each application must not + depend on the vfork specifics according to POSIX. We would + hang waiting for the parent resume otherwise. We need to + clear also CLONE_VM but only in the CLONE_VFORK case as + otherwise we would break pthread_create. */ + + long new_arg0 = (tcp->u_arg[arg0_index] | CLONE_PTRACE); + if (new_arg0 & CLONE_VFORK) + new_arg0 &= ~(unsigned long)(CLONE_VFORK | CLONE_VM); + if (arg_setup(tcp, &state) < 0 + || set_arg0(tcp, &state, new_arg0) < 0 + || arg_finish_change(tcp, &state) < 0) + return -1; + tcp->inst[0] = tcp->u_arg[arg0_index]; + tcp->inst[1] = tcp->u_arg[arg1_index]; + tcp->flags |= TCB_BPTSET; + return 0; + } + + fprintf(stderr, "PANIC: setbpt for syscall %ld on %u???\n", + tcp->scno, tcp->pid); + return -1; +} + +int +clearbpt(struct tcb *tcp) +{ + arg_setup_state state; + if (arg_setup(tcp, &state) < 0 + || change_syscall(tcp, &state, tcp->scno) < 0 + || restore_arg0(tcp, &state, tcp->inst[0]) < 0 + || restore_arg1(tcp, &state, tcp->inst[1]) < 0 + || arg_finish_change(tcp, &state)) + if (errno != ESRCH) + return -1; + tcp->flags &= ~TCB_BPTSET; + return 0; +} diff --git a/alice-strace/vsprintf.c b/alice-strace/vsprintf.c new file mode 100644 index 0000000..f6019f0 --- /dev/null +++ b/alice-strace/vsprintf.c @@ -0,0 +1,786 @@ +/* + * 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" + +#ifdef USE_CUSTOM_PRINTF + +#include +#include + +#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 = malloc(buflen); + if (!buf) + die_out_of_memory(); + /*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/alice-strace/xlate.el b/alice-strace/xlate.el new file mode 100644 index 0000000..d1645e7 --- /dev/null +++ b/alice-strace/xlate.el @@ -0,0 +1,78 @@ +;; Copyright (c) 1993, 1994, 1995 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. + +;; Description: Automate the construction of strace xlat tables. + +;; Usage: Put point and mark around a set of definitions in a header +;; file. Then grab them with C-c G. Switch to the strace source file +;; and build the xlat table with C-c B. Then type the name of the table. + +(global-set-key "\C-cG" 'grab-xlate) +(global-set-key "\C-cB" 'build-xlate) + +(defvar xlate-list nil + "See grab-xlate and build-xlate.") + +(defun grab-xlate (beg end) + "Grab all of the defined names in the region and save them in xlate-list." + (interactive "r") + (save-excursion + (setq xlate-list nil) + (goto-char beg) + (beginning-of-line) + (while (< (point) end) + (and (looking-at "^#[ \t]*define[ \t]+\\([A-Za-z0-9_]+\\)[ \t]+") + (setq xlate-list (cons (buffer-substring (match-beginning 1) + (match-end 1)) + xlate-list))) + (forward-line))) + (and (fboundp 'deactivate-mark) + (deactivate-mark)) + (setq xlate-list (nreverse xlate-list))) + +(defun build-xlate (&optional list) + "Build and insert an strace xlat table based on the last grab." + (interactive) + (or list + (setq list xlate-list)) + (beginning-of-line) + (save-excursion + (insert "static struct xlat ?[] = {\n") + (while list + (insert "\t{ " (car list) ",\n") + (backward-char) + (move-to-column 24 'force) + (end-of-line) + (insert "\"" (car list) "\"") + (move-to-column 40 'force) + (end-of-line) + (insert "},") + (forward-line) + (setq list (cdr list))) + (insert " { 0, NULL },\n") + (insert "};\n") + (insert "\n")) + (search-forward "?") + (delete-backward-char 1)) diff --git a/alice.py b/alice.py new file mode 100644 index 0000000..15933f0 --- /dev/null +++ b/alice.py @@ -0,0 +1,412 @@ +#!/usr/bin/env python +import re +import math +import pickle +import os +import subprocess +import inspect +import copy +import string +import traceback +import random +import _aliceautotest as auto_test +import signal +import _aliceparsesyscalls +import pdb +import cProfile +import Queue +import threading +import time +import pprint +import code +import sys +import collections +from alicestruct import Struct +from _aliceutils import * +import gc + +print colorize('-------------------------------------------------------------------------------', 1) +print 'ALICE tool version 0.0.1. Please go through the documentation, particularly the' +print 'listed caveats and limitations, before deriving any inferences from this tool. ' +print colorize('-------------------------------------------------------------------------------', 1) + +cached_rows = None +cached_dirinode_map = {} + +# use_cached works only on a single thread +def replay_disk_ops(initial_paths_inode_map, rows, replay_dir, stdout_file, use_cached = False): + def get_stat(path): + try: + return os.stat(path) + except OSError as err: + return False + + def get_inode_file(inode, mode = None): + assert type(inode) == int + if not get_stat(replay_dir + '/.inodes/' + str(inode)): + if mode == None: + mode = 0666 + if type(mode) == str: + mode = safe_string_to_int(mode) + fd = os.open(replay_dir + '/.inodes/' + str(inode), os.O_CREAT | os.O_WRONLY, mode) + assert fd > 0 + os.close(fd) + return replay_dir + '/.inodes/' + str(inode) + + dirinode_map = {} # From initial_inode to replayed_directory_path + def is_linked_inode_directory(inode): + assert type(inode) == int + if inode not in dirinode_map: + return False + if dirinode_map[inode] == replay_dir + '/.inodes/' + str(inode): + return False + return True + + def get_inode_directory(inode, mode = None): + assert type(inode) == int + if inode not in dirinode_map: + if mode == None: + mode = 0777 + if type(mode) == str: + mode = safe_string_to_int(mode) + os.mkdir(replay_dir + '/.inodes/' + str(inode), mode) + dirinode_map[inode] = replay_dir + '/.inodes/' + str(inode) + return dirinode_map[inode] + + def set_inode_directory(inode, dir_path): + assert type(inode) == int + dirinode_map[inode] = dir_path + + def initialize_inode_links(initial_paths_inode_map): + final_paths_inode_map = get_path_inode_map(replay_dir) # This map is used only for assertions + assert len(final_paths_inode_map) == len(initial_paths_inode_map) + + # Asserting there are no hardlinks on the initial list - if there were, 'cp -R' wouldn't have worked correctly. + initial_inodes_list = [inode for (inode, entry_type) in initial_paths_inode_map.values()] + assert len(initial_inodes_list) == len(set(initial_inodes_list)) + + os.system("mkdir " + replay_dir + '/.inodes') + + for path in initial_paths_inode_map.keys(): + final_path = path.replace(aliceconfig().scratchpad_dir, replay_dir, 1) + assert final_path in final_paths_inode_map + (initial_inode, entry_type) = initial_paths_inode_map[path] + (tmp_final_inode, tmp_entry_type) = final_paths_inode_map[final_path] + assert entry_type == tmp_entry_type + if entry_type == 'd': + set_inode_directory(initial_inode, final_path) + else: + os.link(final_path, replay_dir + '/.inodes/' + str(initial_inode)) + + + global cached_rows, cached_dirinode_map + if use_cached: + original_replay_dir = replay_dir + replay_dir = os.path.join(aliceconfig().scratchpad_dir, 'cached_replay_dir') + dirinode_map = cached_dirinode_map + if cached_rows and len(cached_rows) <= len(rows) and rows[0:len(cached_rows)] == cached_rows: + rows = copy.deepcopy(rows[len(cached_rows):]) + cached_rows += rows + else: + cached_rows = copy.deepcopy(rows) + cached_dirinode_map = {} + dirinode_map = cached_dirinode_map + os.system("rm -rf " + replay_dir) + os.system("cp -R " + aliceconfig().initial_snapshot + " " + replay_dir) + initialize_inode_links(initial_paths_inode_map) + else: + os.system("rm -rf " + replay_dir) + os.system("cp -R " + aliceconfig().initial_snapshot + " " + replay_dir) + initialize_inode_links(initial_paths_inode_map) + + output_stdout = open(stdout_file, 'w') + for line in rows: + # print line + if line.op == 'create_dir_entry': + new_path = get_inode_directory(line.parent) + '/' + os.path.basename(line.entry) + if line.entry_type == Struct.TYPE_FILE: + if os.path.exists(new_path): + os.unlink(new_path) + assert not os.path.exists(new_path) + os.link(get_inode_file(line.inode, line.mode), new_path) + else: + assert not is_linked_inode_directory(line.inode) # According to the model, there might + # exist two links to the same directory after FS crash-recovery. However, Linux + # does not allow this to be simulated. Checking for that condition here - if this + # assert is ever triggered in a real workload, we'll have to handle this case + # somehow. Can potentially be handled using symlinks. + os.rename(get_inode_directory(line.inode, line.mode), new_path) + set_inode_directory(line.inode, new_path) + elif line.op == 'delete_dir_entry': + path = get_inode_directory(line.parent) + '/' + os.path.basename(line.entry) + if get_stat(path): + if line.entry_type == Struct.TYPE_FILE: + os.unlink(path) + else: + os.rename(path, replay_dir + '/.inodes/' + str(line.inode)) # Deletion of + # directory is equivalent to moving it back into the '.inodes' directory. + elif line.op == 'truncate': + old_mode = writeable_toggle(get_inode_file(line.inode)) + fd = os.open(get_inode_file(line.inode), os.O_WRONLY) + assert fd > 0 + os.ftruncate(fd, line.final_size) + os.close(fd) + writeable_toggle(get_inode_file(line.inode), old_mode) + elif line.op == 'write': + old_mode = writeable_toggle(get_inode_file(line.inode)) + if line.special_write != None: + if (line.special_write == 'GARBAGE' or line.special_write == 'ZEROS') and line.count > 4096: + if line.count > 4 * 1024 * 1024: + BLOCK_SIZE = 1024 * 1024 + else: + BLOCK_SIZE = 4096 + blocks_byte_offset = int(math.ceil(float(line.offset) / BLOCK_SIZE)) * BLOCK_SIZE + blocks_byte_count = max(0, (line.offset + line.count) - blocks_byte_offset) + blocks_count = int(math.floor(float(blocks_byte_count) / BLOCK_SIZE)) + blocks_byte_count = blocks_count * BLOCK_SIZE + blocks_offset = blocks_byte_offset / BLOCK_SIZE + + pre_blocks_offset = line.offset + pre_blocks_count = blocks_byte_offset - line.offset + if pre_blocks_count > line.count: + assert blocks_byte_count == 0 + pre_blocks_count = line.count + assert pre_blocks_count >= 0 + + post_blocks_count = 0 + if pre_blocks_count < line.count: + post_blocks_offset = (blocks_byte_offset + blocks_byte_count) + assert post_blocks_offset % BLOCK_SIZE == 0 + post_blocks_count = line.offset + line.count - post_blocks_offset + + assert pre_blocks_count >= 0 + assert blocks_count >= 0 + assert post_blocks_count >= 0 + assert pre_blocks_count + blocks_count * BLOCK_SIZE + post_blocks_count == line.count + assert pre_blocks_offset == line.offset + if pre_blocks_count < line.count: + assert blocks_offset * BLOCK_SIZE == pre_blocks_offset + pre_blocks_count + if post_blocks_count > 0: + assert (blocks_offset + blocks_count) * BLOCK_SIZE == post_blocks_offset + + if line.special_write == 'GARBAGE': + cmd = "dd if=/dev/urandom of=\"" + get_inode_file(line.inode) + "\" conv=notrunc conv=nocreat status=noxfer " + else: + cmd = "dd if=/dev/zero of=\"" + get_inode_file(line.inode) + "\" conv=notrunc conv=nocreat status=noxfer " + if pre_blocks_count > 0: + subprocess.check_call(cmd + 'seek=' + str(pre_blocks_offset) + ' count=' + str(pre_blocks_count) + ' bs=1 2>/dev/null', shell=True, ) + if blocks_count > 0: + subprocess.check_call(cmd + 'seek=' + str(blocks_offset) + ' count=' + str(blocks_count) + ' bs=' + str(BLOCK_SIZE) + ' 2>/dev/null', shell=True) + if post_blocks_count > 0: + subprocess.check_call(cmd + 'seek=' + str(post_blocks_offset) + ' count=' + str(post_blocks_count) + ' bs=1 2>/dev/null', shell=True) + elif line.special_write == 'GARBAGE' or line.special_write == 'ZEROS': + if line.special_write == 'GARBAGE': + data = string.ascii_uppercase + string.digits + else: + data = '\0' + buf = ''.join(random.choice(data) for x in range(line.count)) + fd = os.open(get_inode_file(line.inode), os.O_WRONLY) + os.lseek(fd, line.offset, os.SEEK_SET) + os.write(fd, buf) + os.close(fd) + buf = "" + else: + assert False + else: + if line.dump_file == None: + buf = line.override_data + else: + fd = os.open(line.dump_file, os.O_RDONLY) + os.lseek(fd, line.dump_offset, os.SEEK_SET) + buf = os.read(fd, line.count) + os.close(fd) + fd = os.open(get_inode_file(line.inode), os.O_WRONLY) + os.lseek(fd, line.offset, os.SEEK_SET) + os.write(fd, buf) + os.close(fd) + buf = "" + writeable_toggle(get_inode_file(line.inode), old_mode) + elif line.op == 'stdout': + output_stdout.write(line.data) + else: + assert line.op == 'sync' + + if use_cached: + os.system('rm -rf ' + original_replay_dir) + os.system('cp -a ' + replay_dir + ' ' + original_replay_dir) + replay_dir = original_replay_dir + cached_dirinode_map = copy.deepcopy(dirinode_map) + + os.system("rm -rf " + replay_dir + '/.inodes') + + +class Replayer: + def is_legal(self): + assert self.fs_initialized + diskops_index = 0 + included_diskops = [] + for i in range(0, self.__micro_end + 1): + micro_op = self.micro_ops[i] + till = self.__disk_end + 1 if self.__micro_end == i else len(micro_op.hidden_disk_ops) + for j in range(0, till): + if not micro_op.hidden_disk_ops[j].hidden_omitted: + included_diskops.append(diskops_index) + diskops_index += 1 + return self.test_suite.test_combo_validity(included_diskops) + def __init__(self, alice_args): + init_aliceconfig(alice_args) + (self.path_inode_map, self.micro_ops) = _aliceparsesyscalls.get_micro_ops() + cnt = 0 + for i in self.micro_ops: + i.hidden_id = str(cnt) + cnt = cnt + 1 + self.__micro_end = len(self.micro_ops) - 1 + self.__disk_end = 0 # Will be set during the dops_generate() call + + self.saved = dict() + self.fs_initialized = False + + def print_ops(self, show_diskops = False, show_tids = False, show_time = False): + for i in range(0, len(self.micro_ops)): + micro_id = colorize(str(i), 3 if i > self.__micro_end else 2) + tid_info = '' + if show_tids: + tid_info = str(self.micro_ops[i].hidden_pid) + '\t' + str(self.micro_ops[i].hidden_tid) + '\t' + if show_time: + tid_info += self.micro_ops[i].hidden_time + '\t' + print(micro_id + '\t' + tid_info + str(self.micro_ops[i])) + for j in range(0, len(self.micro_ops[i].hidden_disk_ops)): + disk_op_str = str(self.micro_ops[i].hidden_disk_ops[j]) + if self.micro_ops[i].hidden_disk_ops[j].hidden_omitted: + disk_op_str = colorize(disk_op_str, 3) + if show_diskops: + print('\t' + str(j) + '\t' + disk_op_str) + if i == self.__micro_end and j == self.__disk_end: + print(colorize('-------------------------------------', 1)) + def save(self, i): + assert self.fs_initialized + self.saved[int(i)] = copy.deepcopy(Struct(micro_ops = self.micro_ops, + micro_end = self.__micro_end, + disk_end = self.__disk_end, + test_suite = self.test_suite)) + def load(self, i): + assert self.fs_initialized + assert int(i) in self.saved + retrieved = copy.deepcopy(self.saved[int(i)]) + self.micro_ops = retrieved.micro_ops + self.__micro_end = retrieved.micro_end + self.__disk_end = retrieved.disk_end + self.test_suite = retrieved.test_suite + + def construct_crashed_dir(self, dirname, stdout_file): + assert self.fs_initialized + to_replay = [] + for i in range(0, self.__micro_end + 1): + micro_op = self.micro_ops[i] + till = self.__disk_end + 1 if self.__micro_end == i else len(micro_op.hidden_disk_ops) + for j in range(0, till): + if not micro_op.hidden_disk_ops[j].hidden_omitted: + to_replay.append(micro_op.hidden_disk_ops[j]) + replay_disk_ops(self.path_inode_map, to_replay, dirname, stdout_file, use_cached = True) + def get_op(self, i): + assert i <= len(self.micro_ops) + return copy.deepcopy(self.micro_ops[i]) + def dops_end_at(self, i, j = None): + assert self.fs_initialized + if type(i) == tuple: + assert j == None + j = i[1] + i = i[0] + assert j != None + self.__micro_end = i + self.__disk_end = j + def set_fs(self, fs): + all_diskops = [] + for micro_op_id in range(0, len(self.micro_ops)): + fs.get_disk_ops(self.micro_ops[micro_op_id]) + + if micro_op_id == self.__micro_end: + self.__disk_end = len(self.micro_ops[micro_op_id].hidden_disk_ops) - 1 + + cnt = 0 + for disk_op in self.micro_ops[micro_op_id].hidden_disk_ops: + disk_op.hidden_omitted = False + disk_op.hidden_id = cnt + disk_op.hidden_micro_op = self.micro_ops[micro_op_id] + cnt += 1 + + all_diskops += self.micro_ops[micro_op_id].hidden_disk_ops + + for i in range(0, len(all_diskops)): + if all_diskops[i].op == 'stdout': + all_diskops[i] = Struct(op = 'write', inode = -1, offset = 0, count = 1, hidden_actual_op = all_diskops[i]) + + self.test_suite = auto_test.ALCTestSuite(all_diskops) + + for i in range(0, len(all_diskops)): + if all_diskops[i].op == 'write' and all_diskops[i].inode == -1: + all_diskops[i] = all_diskops[i].hidden_actual_op + + fs.get_deps(all_diskops) + dependency_tuples = [] + for i in range(0, len(all_diskops)): + for j in sorted(list(all_diskops[i].hidden_dependencies)): + dependency_tuples.append((i, j)) + self.test_suite.add_deps_to_ops(dependency_tuples) + + + self.fs_initialized = True + self.saved = dict() + self.save(0) + def __dops_get_i_j(self, i, j): + if type(i) == tuple: + assert j == None + j = i[1] + i = i[0] + assert j != None + assert i < len(self.micro_ops) + assert 'hidden_disk_ops' in self.micro_ops[i].__dict__ + assert j < len(self.micro_ops[i].hidden_disk_ops) + return (i, j) + def dops_omit(self, i, j = None): + assert self.fs_initialized + (i, j) = self.__dops_get_i_j(i, j) + if self.micro_ops[i].op != 'stdout': + self.micro_ops[i].hidden_disk_ops[j].hidden_omitted = True + def dops_include(self, i, j = None): + assert self.fs_initialized + (i, j) = self.__dops_get_i_j(i, j) + self.micro_ops[i].hidden_disk_ops[j].hidden_omitted = False + def dops_get_op(self, i, j = None): + assert self.fs_initialized + (i, j) = self.__dops_get_i_j(i, j) + return copy.deepcopy(self.micro_ops[i].hidden_disk_ops[j]) + def dops_len(self, i = None): + assert self.fs_initialized + if i == None: + total = 0 + for micro_op in self.micro_ops: + total += len(micro_op.hidden_disk_ops) + return total + assert i < len(self.micro_ops) + return len(self.micro_ops[i].hidden_disk_ops) + def mops_len(self): + return len(self.micro_ops) + def dops_double(self, single): + assert self.fs_initialized + i = 0 + seen_disk_ops = 0 + for i in range(0, len(self.micro_ops)): + micro_op = self.micro_ops[i] + if single < seen_disk_ops + len(micro_op.hidden_disk_ops): + return (i, single - seen_disk_ops) + seen_disk_ops += len(micro_op.hidden_disk_ops) + assert False + def dops_single(self, double): + assert self.fs_initialized + if double == None: + return -1 + seen_disk_ops = 0 + for micro_op in self.micro_ops[0: double[0]]: + seen_disk_ops += len(micro_op.hidden_disk_ops) + return seen_disk_ops + double[1] diff --git a/alicedefaultexplorer.py b/alicedefaultexplorer.py new file mode 100644 index 0000000..94cf6be --- /dev/null +++ b/alicedefaultexplorer.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python +import os +import subprocess +import cProfile +import Queue +import threading +import time +import pprint +import code +import sys +import collections +import gc +from alice import aliceconfig +from alice import Replayer +from alicedefaultfs import defaultfs + +class MultiThreadedChecker(threading.Thread): + queue = Queue.Queue() + outputs = {} + + def __init__(self, queue): + threading.Thread.__init__(self) + self.queue = MultiThreadedChecker.queue + + def __threaded_check(self, dirname, crashid): + assert type(aliceconfig().checker_tool) in [list, str, tuple] + args = [aliceconfig().checker_tool, dirname, dirname + '.input_stdout'] + output_stdout = dirname + '.output_stdout' + output_stderr = dirname + '.output_stderr' + retcode = subprocess.call(args, stdout = open(output_stdout, 'w'), stderr = open(output_stderr, 'w')) + MultiThreadedChecker.outputs[crashid] = retcode + os.system('rm -rf ' + dirname) + + def run(self): + while True: + task = self.queue.get() + self.__threaded_check(*task) + self.queue.task_done() + + @staticmethod + def check_later(dirname, retcodeid): + MultiThreadedChecker.queue.put((dirname, retcodeid)) + + @staticmethod + def reset(): + assert MultiThreadedChecker.queue.empty() + MultiThreadedChecker.outputs = {} + + @staticmethod + def wait_and_get_outputs(): + MultiThreadedChecker.queue.join() + return MultiThreadedChecker.outputs + +def stack_repr(op): + try: + backtrace = 0 + try: + backtrace = op.hidden_backtrace + except: + pass + found = False + #code.interact(local=dict(globals().items() + locals().items())) + for i in range(0, len(backtrace)): + stack_frame = backtrace[i] + if stack_frame.src_filename != None and 'syscall-template' in stack_frame.src_filename: + continue + if '/libc' in stack_frame.binary_filename: + continue + if stack_frame.func_name != None and 'output_stacktrace' in stack_frame.func_name: + continue + found = True + break + if not found: + raise Exception('Standard stack traverse did not work') + if stack_frame.src_filename == None: + return 'B-' + str(stack_frame.binary_filename) + ':' + str(stack_frame.raw_addr) + '[' + str(stack_frame.func_name).replace('(anonymous namespace)', '()') + ']' + return str(stack_frame.src_filename) + ':' + str(stack_frame.src_line_num) + '[' + str(stack_frame.func_name).replace('(anonymous namespace)', '()') + ']' + except Exception as e: + return 'Unknown (stacktraces not traversable for finding static vulnerabilities):' + op.hidden_id + + +def default_checks(alice_args, threads = 1): + print 'Parsing traces to determine logical operations ...' + replayer = Replayer(alice_args) + replayer.set_fs(defaultfs('count', 1)) + + print 'Logical operations:' + replayer.print_ops() + + assert threads > 0 + for i in range(0, threads): + t = MultiThreadedChecker(MultiThreadedChecker.queue) + t.setDaemon(True) + t.start() + + atomic_patch_middle = set() + + print 'Finding vulnerabilities...' + # Finding across-syscall atomicity + for i in range(0, replayer.mops_len()): + dirname = os.path.join(aliceconfig().scratchpad_dir, 'reconstructeddir-' + str(i)) + replayer.dops_end_at((i, replayer.dops_len(i) - 1)) + replayer.construct_crashed_dir(dirname, dirname + '.input_stdout') + MultiThreadedChecker.check_later(dirname, i) + + checker_outputs = MultiThreadedChecker.wait_and_get_outputs() + staticvuls = set() + i = 0 + while(i < replayer.mops_len()): + if checker_outputs[i] != 0: + patch_start = i + atomic_patch_middle.add(i) + # Go until the last but one mop + while(i < replayer.mops_len() - 1 and checker_outputs[i + 1] != 0): + atomic_patch_middle.add(i) + i += 1 + patch_end = i + 1 + if patch_end >= replayer.mops_len(): + patch_end = replayer.mops_len() - 1 + print 'WARNING: Application found to be inconsistent after the entire workload completes. Recheck workload and checker. Possible bug in ALICE framework if this is not expected.' + print '(Dynamic vulnerability) Across-syscall atomicity, sometimes concerning durability: ' + \ + 'Operations ' + str(patch_start) + ' until ' + str(patch_end) + ' need to be atomically persisted' + staticvuls.add((stack_repr(replayer.get_op(patch_start)), + stack_repr(replayer.get_op(patch_end)))) + i += 1 + + for vul in staticvuls: + print '(Static vulnerability) Across-syscall atomicity: ' + \ + 'Operation ' + vul[0] + ' until ' + vul[1] + + # Finding ordering vulnerabilities + replayer.load(0) + MultiThreadedChecker.reset() + + for i in range(0, replayer.mops_len()): + if replayer.dops_len(i) == 0 or i in atomic_patch_middle or (i - 1) in atomic_patch_middle: + continue + + for j in range(0, replayer.dops_len(i)): + replayer.dops_omit((i, j)) + + for j in range(i + 1, replayer.mops_len()): + if replayer.dops_len(j) == 0 or j in atomic_patch_middle: + continue + replayer.dops_end_at((j, replayer.dops_len(j) - 1)) + if replayer.is_legal(): + dirname = os.path.join(aliceconfig().scratchpad_dir, 'reconstructeddir-' + str(i) + '-' + str(j)) + replayer.construct_crashed_dir(dirname, dirname + '.input_stdout') + MultiThreadedChecker.check_later(dirname, (i, j)) + + for j in range(0, replayer.dops_len(i)): + replayer.dops_include((i, j)) + + checker_outputs = MultiThreadedChecker.wait_and_get_outputs() + staticvuls = set() + for i in range(0, replayer.mops_len()): + for j in range(i + 1, replayer.mops_len()): + if (i, j) in checker_outputs and checker_outputs[(i, j)] != 0: + print '(Dynamic vulnerability) Ordering: ' + \ + 'Operation ' + str(i) + ' needs to be persisted before ' + str(j) + staticvuls.add((stack_repr(replayer.get_op(i)), + stack_repr(replayer.get_op(j)))) + break + + for vul in staticvuls: + print '(Static vulnerability) Ordering: ' + \ + 'Operation ' + vul[0] + ' needed before ' + vul[1] + + # Finding atomicity vulnerabilities + replayer.load(0) + MultiThreadedChecker.reset() + atomicity_explanations = dict() + + for mode in (('count', 1), ('count', 3), ('aligned', 4096)): + replayer.set_fs(defaultfs(*mode)) + for i in range(0, replayer.mops_len()): + if i in atomic_patch_middle or (i - 1) in atomic_patch_middle: + continue + + for j in range(0, replayer.dops_len(i) - 1): + replayer.dops_end_at((i, j)) + if replayer.is_legal(): + dirname = os.path.join(aliceconfig().scratchpad_dir, 'reconstructeddir-' + mode[0] + '-' + str(mode[1]) + '-' + str(i) + '-' + str(j)) + replayer.construct_crashed_dir(dirname, dirname + '.input_stdout') + MultiThreadedChecker.check_later(dirname, (mode, i, j)) + atomicity_explanations[(mode, i, j)] = replayer.get_op(i).hidden_disk_ops[j].atomicity + + if mode != ('aligned', '4096'): # Do not do this for the 4096 aligned case, since a large write might contain a huge number of diskops + for k in range(0, j): + replayer.dops_omit((i, k)) + if replayer.is_legal(): + dirname = os.path.join(aliceconfig().scratchpad_dir, 'reconstructeddir-' + mode[0] + '-' + str(mode[1]) + '-' + str(i) + '-' + str(j) + '-' + str(k)) + replayer.construct_crashed_dir(dirname, dirname + '.input_stdout') + MultiThreadedChecker.check_later(dirname, (mode, i, j, k)) + replayer.dops_include((i, k)) + + + checker_outputs = MultiThreadedChecker.wait_and_get_outputs() + staticvuls = collections.defaultdict(lambda:set()) + for i in range(0, replayer.mops_len()): + dynamicvuls = set() + for j in range(0, replayer.dops_len(i) - 1): + for mode in (('count', 1), ('count', 3), ('aligned', 4096)): + if (mode, i, j) in checker_outputs and checker_outputs[(mode, i, j)] != 0: + dynamicvuls.add(atomicity_explanations[(mode, i, j)]) + + if len(dynamicvuls) == 0: + for j in range(0, replayer.dops_len(i) - 1): + for mode in (('count', 1), ('count', 3), ('aligned', 4096)): + for k in range(0, j): + if (mode, i, j, k) in checker_outputs and checker_outputs[(mode, i, j, k)] != 0: + dynamicvuls.add('???') + + + if len(dynamicvuls) > 0: + print '(Dynamic vulnerability) Atomicity: ' + \ + 'Operation ' + str(i) + '(' + (', '.join(dynamicvuls)) + ')' + staticvuls[stack_repr(replayer.get_op(i))].update(dynamicvuls) + + for vul in staticvuls: + print '(Static vulnerability) Atomicity: ' + \ + 'Operation ' + vul + ' (' + (','.join(staticvuls[vul])) + ')' + + print 'Done finding vulnerabilities.' diff --git a/alicedefaultfs.py b/alicedefaultfs.py new file mode 100644 index 0000000..066d157 --- /dev/null +++ b/alicedefaultfs.py @@ -0,0 +1,246 @@ +from alicestruct import Struct +import math +class defaultfs: + def __init__(self, split_mode, splits): + assert split_mode in ['aligned', 'count'] + self.split_mode = split_mode + self.splits = splits + + def get_disk_ops(self, line): + splits = self.splits + split_mode = self.split_mode + def trunc_disk_ops(inode, initial_size, final_size, append_micro_op = None, atomicity_prefix = ''): + toret = [] + + if initial_size == final_size: + print 'Warning: trunc_disk_ops called for the same initial and final size, ' + str(initial_size) + return toret + + # If we are making the file smaller, follow the same algorithm + # as making the file bigger. But, exchange the initial_size and + # final_size in the beginning, and then reverse the final + # output list. + invert = False + if initial_size > final_size: + t = initial_size + initial_size = final_size + final_size = t + invert = True + + if append_micro_op: + assert not invert + assert append_micro_op.inode == inode + assert append_micro_op.offset == initial_size + assert append_micro_op.count == (final_size - initial_size) + + splits = self.splits + split_mode = self.split_mode + + start = initial_size + remaining = final_size - initial_size + if split_mode == 'count': + per_slice_size = int(math.ceil(float(remaining) / splits)) + + end = 0 + while remaining > 0: + if split_mode == 'aligned': + count = min(splits - (start % splits), remaining) + else: + count = min(per_slice_size, remaining) + end = count + start + + if invert: + # Actually truncate. Final operation (if there is no size-splitting) for size-decreasing truncates. + atomicity = atomicity_prefix + if remaining != count: + atomicity += ' semi-truncated (' + str(splits) + ' ' + split_mode + ' splits)' + disk_op = Struct(op = 'truncate', inode = inode, initial_size = start, final_size = end, atomicity = atomicity) + toret.append(disk_op) + + if append_micro_op: + # Write zeros + atomicity = atomicity_prefix + 'zero written' + if remaining != count: + atomicity += ' semi-expanded (' + str(splits) + ' ' + split_mode + ' splits)' + disk_op = Struct(op = 'write', inode = inode, offset = start, dump_offset = 0, count = count, \ + dump_file = None, override_data = None, special_write = 'ZEROS', atomicity = atomicity) + toret.append(disk_op) + + if not invert: + # Write garbage + atomicity = atomicity_prefix + 'garbage written' + if remaining != count: + atomicity += ' semi-expanded (' + str(splits) + ' ' + split_mode + ' splits)' + disk_op = Struct(op = 'write', inode = inode, offset = start, dump_offset = 0, count = count, \ + dump_file = None, override_data = None, special_write = 'GARBAGE', atomicity = atomicity) + toret.append(disk_op) + + if (not invert) and not append_micro_op: + # Write zeros. Final operation (if there is no size-splitting) for size-increasing truncate. + atomicity = atomicity_prefix + if remaining != count: + atomicity += 'semi-expanded (' + str(splits) + ' ' + split_mode + ' splits)' + disk_op = Struct(op = 'write', inode = inode, offset = start, dump_offset = 0, count = count, \ + dump_file = None, override_data = None, special_write = 'ZEROS', atomicity = atomicity) + toret.append(disk_op) + + if append_micro_op: + # Write data. Final operation (if there is no size-splitting) for appends. + atomicity = atomicity_prefix + if remaining != count: + atomicity += 'semi-expanded (' + str(splits) + ' ' + split_mode + ' splits)' + dump_offset = append_micro_op.dump_offset + (start - append_micro_op.offset) + disk_op = Struct(op = 'write', inode = inode, offset = start, dump_offset = dump_offset, count = count, \ + dump_file = append_micro_op.dump_file, special_write = None, atomicity = atomicity) + toret.append(disk_op) + + remaining -= count + start = end + + assert end == final_size + + if invert == True: + toret.reverse() + for disk_op in toret: + t = disk_op.initial_size + disk_op.initial_size = disk_op.final_size + disk_op.final_size = t + + return toret + + def unlink_disk_ops(parent, inode, name, size, hardlinks, entry_type = Struct.TYPE_FILE, atomicity_prefix = ''): + toret = [] + if hardlinks == 1: + toret += trunc_disk_ops(inode, size, 0, atomicity_prefix = atomicity_prefix) + if len(toret) > 0: + toret[-1].atomicity = atomicity_prefix + 'fully truncated' + disk_op = Struct(op = 'delete_dir_entry', parent = parent, entry = name, inode = inode, entry_type = entry_type) + toret.append(disk_op) + return toret + def link_disk_ops(parent, inode, name, mode = None, entry_type = Struct.TYPE_FILE): + return [Struct(op = 'create_dir_entry', parent = parent, entry = name, inode = inode, mode = mode, entry_type = entry_type)] + + if line.op == 'creat': + line.hidden_disk_ops = link_disk_ops(line.parent, line.inode, line.name, line.mode) + elif line.op == 'unlink': + line.hidden_disk_ops = unlink_disk_ops(line.parent, line.inode, line.name, line.size, line.hardlinks) + elif line.op == 'link': + line.hidden_disk_ops = link_disk_ops(line.dest_parent, line.source_inode, line.dest) + elif line.op == 'rename': + line.hidden_disk_ops = [] + # source: source_inode, dest: dest_inode + if line.dest_hardlinks >= 1: + line.hidden_disk_ops += unlink_disk_ops(line.dest_parent, line.dest_inode, line.dest, line.dest_size, line.dest_hardlinks, atomicity_prefix = 'destination unlinking partial ') + line.hidden_disk_ops[-1].atomicity = 'destination unlinked fully, source untouched' + # source: source_inode, dest: None + line.hidden_disk_ops += unlink_disk_ops(line.source_parent, line.source_inode, line.source, line.source_size, 2, atomicity_prefix = 'destination unlinked fully, source unlinking partial ') # Setting hardlinks as 2 so that trunc does not happen + line.hidden_disk_ops[-1].atomicity = 'destination and source unlinked fully' + # source: None, dest: None + line.hidden_disk_ops += link_disk_ops(line.dest_parent, line.source_inode, line.dest) + # source: None, dest: source_inode + elif line.op == 'trunc': + line.hidden_disk_ops = trunc_disk_ops(line.inode, line.initial_size, line.final_size) + elif line.op == 'append': + line.hidden_disk_ops = trunc_disk_ops(line.inode, line.offset, line.offset + line.count, line) + elif line.op == 'write': + assert line.count > 0 + line.hidden_disk_ops = [] + + offset = line.offset + remaining = line.count + if split_mode == 'count': + per_slice_size = int(math.ceil(float(line.count) / splits)) + + while remaining > 0: + if split_mode == 'aligned': + count = min(splits - (offset % splits), remaining) + else: + count = min(per_slice_size, remaining) + + dump_offset = line.dump_offset + (offset - line.offset) + disk_op = Struct(op = 'write', inode = line.inode, offset = offset, dump_offset = dump_offset, \ + count = count, dump_file = line.dump_file, override_data = None, special_write = None, \ + atomicity = str(splits) + ' ' + split_mode + ' split') + line.hidden_disk_ops.append(disk_op) + remaining -= count + offset += count + elif line.op == 'mkdir': + line.hidden_disk_ops = link_disk_ops(line.parent, line.inode, line.name, eval(line.mode), Struct.TYPE_DIR) + elif line.op == 'rmdir': + line.hidden_disk_ops = unlink_disk_ops(line.parent, line.inode, line.name, 0, 0, Struct.TYPE_DIR) + elif line.op in ['fsync', 'fdatasync', 'file_sync_range']: + line.hidden_disk_ops = [] + if line.op in ['fsync', 'fdatasync']: + offset = 0 + count = line.size + else: + offset = line.offset + count = line.count + disk_op = Struct(op = 'sync', inode = line.inode, offset = offset, count = count) + line.hidden_disk_ops.append(disk_op) + elif line.op == 'stdout': + line.hidden_disk_ops = [Struct(op = line.op, data = line.data)] + else: + assert False + + def get_deps(self, ops): + last_sync = None + for i in range(0, len(ops)): + ops[i].hidden_dependencies = set() + ops[i].hidden_twojournalfs_stuff = Struct(reverse_fsync_dependencies = set()) + if last_sync != None: + ops[i].hidden_dependencies.add(last_sync) + if ops[i].op in ['sync', 'stdout']: + last_sync = i + else: + assert ops[i].op in ['truncate', 'write', 'delete_dir_entry', 'create_dir_entry'] + if ops[i].op == 'sync': + for j in range(i - 1, -1, -1): + if ops[j].op in ['sync', 'write']: + i_final = ops[i].offset + ops[i].count + i_initial = ops[i].offset + j_final = ops[j].offset + ops[j].count + j_initial = ops[j].offset + if ops[j].op == 'sync': + if not ops[j].inode == ops[i].inode: + continue + # If j-sync overlaps i-sync + if j_initial <= i_initial and j_final >= i_final: + break + elif ops[j].op == 'truncate': + if not ops[j].inode == ops[i].inode: + continue + assert ops[i].hidden_micro_op.hidden_parsed_line.syscall in ['fsync', 'fdatasync'] + ops[i].hidden_dependencies.add(j) + ops[j].hidden_twojournalfs_stuff.reverse_fsync_dependencies.add(i) + elif ops[j].op == 'write': + if not ops[j].inode == ops[i].inode: + continue + # If j_initial is within i's range + if j_initial >= i_initial and j_initial <= i_final: + if not (j_final >= i_initial and j_final <= i_final): + if not 'warned_xxxx1' in globals(): + print '----------------------------------------------------------' + print 'WARNING: not (j_final >= i_initial and j_final <= i_final)' + traceback.print_stack(file = sys.stdout) + print '----------------------------------------------------------' + globals()['warned_xxxx1'] = 1 + ops[i].hidden_dependencies.add(j) + ops[j].hidden_twojournalfs_stuff.reverse_fsync_dependencies.add(i) + else: + if (j_final >= i_initial and j_final <= i_final): + if not 'warned_xxxx2' in globals(): + print '----------------------------------------------------------' + print 'WARNING: (j_final >= i_initial and j_final <= i_final)' + traceback.print_stack(file = sys.stdout) + print '----------------------------------------------------------' + globals()['warned_xxxx2'] = 1 + elif ops[j].op in ['create_dir_entry', 'delete_dir_entry']: + if not ops[j].parent == ops[i].inode: + continue + assert ops[i].hidden_micro_op.hidden_parsed_line.syscall == 'fsync' + ops[i].hidden_dependencies.add(j) + ops[j].hidden_twojournalfs_stuff.reverse_fsync_dependencies.add(i) + else: + assert ops[j].op == 'stdout' + diff --git a/alicestruct.py b/alicestruct.py new file mode 100644 index 0000000..b33e6e5 --- /dev/null +++ b/alicestruct.py @@ -0,0 +1,65 @@ +import re +from _aliceutils import * + +class Struct: + TYPE_DIR = 0 + TYPE_FILE = 1 + def __init__(self, **entries): self.__dict__.update(entries) + def update(self, mydict): self.__dict__.update(mydict) + def __repr__(self): + if 'op' in vars(self): + if self.op == 'stdout': + args = ['"' + repr(self.data) + '"'] + elif self.op in ['write', 'append']: + args = ['%s=%s' % (k, repr(vars(self)[k])) for k in ['offset', 'count', 'inode']] + else: + argsbegin = [] + argsend = [] + for (k,v) in vars(self).items(): + if k != 'op' and k != 'name' and k[0:7] != 'hidden_': + if k == 'source' or k == 'dest': + argsbegin.append('%s="%s"' % (k, coded_colorize(short_path(v)))) + else: + argsend.append('%s=%s' % (k, repr(v))) + args = argsbegin + argsend + if 'name' in vars(self): + args.insert(0, '"' + coded_colorize(short_path(self.name)) + '"') + colored_op = self.op + if self.op.find('sync') != -1: + colored_op = colorize(self.op, 1) + elif self.op == 'stdout': + colored_op = colorize(self.op, 2) + return '%s(%s)' % (colored_op, ', '.join(args)) + args = ['%s=%s' % (k, repr(v)) for (k,v) in vars(self).items() if k[0:7] != 'hidden_'] + return 'Struct(%s)' % ', '.join(args) + def superficial_eq(self, other): + if type(self) != type(other): + return False + # return str(self.__dict__) == str(other.__dict__) + for k in self.__dict__: + if not type(self.__dict__[k]) == type(self) and type(self.__dict__[k]) != list and type(self.__dict__[k]) != set: + if k not in other.__dict__: + return False + if self.__dict__[k] != other.__dict__[k]: + return False + return True + def __eq__(self, other): + if type(self) != type(other): + return False + # return str(self.__dict__) == str(other.__dict__) + for k in self.__dict__: + if k not in other.__dict__: + return False + if not type(self.__dict__[k]) == type(self): + if self.__dict__[k] != other.__dict__[k]: + return False + else: + if not self.__dict__[k].superficial_eq(other.__dict__[k]): + return False + return True + # return self.__dict__ == other.__dict__ + def __ne__(self, other): + return not self.__eq__(other) + def __hash__(self): + return hash(str(self.__dict__)) + diff --git a/bin/alice-check b/bin/alice-check new file mode 100755 index 0000000..a73a57e --- /dev/null +++ b/bin/alice-check @@ -0,0 +1,57 @@ +#!/usr/bin/env python +import argparse +import sys +import os +sys.path.append(os.getenv("ALICE_HOME")) +import subprocess +import pickle +import alicedefaultexplorer + +parser = argparse.ArgumentParser() +parser.add_argument('--checker', required = True, help = 'Location of the checker') +parser.add_argument('--traces_dir', required = True, help = 'Location of the traces directory') +parser.add_argument('--threads', default = 4) +parser.add_argument('--debug_level', default = 0, choices = range(0, 3)) +parser.add_argument('--ignore_mmap', type = bool, default = False) + +args = parser.parse_args() +args.checker = os.path.abspath(args.checker) +args.traces_dir = os.path.abspath(args.traces_dir) + +f = open(os.path.join(args.traces_dir, "config"), "r") +config = pickle.load(f) +f.close() + + +#### HACK - MADTHANU - REMOVE +os.system("rm -rf /run/shm/alice-*") + +def try_mkdir(name): + try: + os.system("rm -rf " + name) + os.mkdir(name) + return True + except OSError as e: + return False + +alice_config = dict() +alice_config['strace_file_prefix'] = os.path.join(args.traces_dir, "strace.out") +alice_config['initial_snapshot'] = os.path.join(args.traces_dir, "initial_snapshot") +alice_config['base_path'] = config['workload_dir'] +alice_config['starting_cwd'] = config['starting_wd'] +alice_config['checker_tool'] = args.checker +alice_config['debug_level'] = args.debug_level +alice_config['ignore_mmap'] = args.ignore_mmap + +folders = ['/run/shm/', '/dev/shm/', '/tmp', None] +for folder in folders: + assert(folder != None) + folder = os.path.join(folder, 'alice-' + str(os.getpid())) + if try_mkdir(folder): + alice_config['scratchpad_dir'] = folder + break + +alicedefaultexplorer.default_checks(alice_config, threads = args.threads) +#### HACK - MADTHANU - INSERT +#os.system("rm -rf " + alice_config['scratchpad_dir']) + diff --git a/bin/alice-record b/bin/alice-record new file mode 100755 index 0000000..b3d0edb --- /dev/null +++ b/bin/alice-record @@ -0,0 +1,38 @@ +#!/usr/bin/env python +import argparse +import sys +import os +import subprocess +import pickle + +parser = argparse.ArgumentParser() +parser.add_argument('--workload_dir', required = True) +parser.add_argument('--traces_dir', required = True) +parser.add_argument('--verbose', action='store_true') +parser.add_argument('remainder', nargs = argparse.REMAINDER) + +args = parser.parse_args() +args.workload_dir = os.path.abspath(args.workload_dir) +args.traces_dir = os.path.abspath(args.traces_dir) + +if args.verbose: + print 'Taking initial snapshot' +subprocess.check_output("cp -R " + args.workload_dir + " " + os.path.join(args.traces_dir, "initial_snapshot"), shell = True) + +if args.verbose: + print 'Running workload with strace' +workload_strace_command = "alice-strace -k -s 0 -ff -tt -o".split(' ') + [os.path.join(args.traces_dir, "strace.out")] + args.remainder +subprocess.call(workload_strace_command) + +if args.verbose: + print 'Recording symbol information' +subprocess.check_output("alice-strace-retrieve-symbols " + os.path.join(args.traces_dir, "strace.out"), shell = True) + +if args.verbose: + print 'Recording config information' +f = open(os.path.join(args.traces_dir, "config"), "w") +output = dict() +output['starting_wd'] = os.getcwd() +output['workload_dir'] = args.workload_dir +pickle.dump(output, f, protocol = 0) +f.close() diff --git a/doc/compile.py b/doc/compile.py new file mode 100755 index 0000000..70f63eb --- /dev/null +++ b/doc/compile.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +import os +import re +import sys + +if len(sys.argv) > 1 and sys.argv[1] == 'clean': + os.system('rm doc.4ct doc.4tc doc.aux doc.css doc.dvi doc.html doc.idv doc.lg doc.log doc.out doc.pdf doc.tmp doc.xref') + exit(0) + +os.system('mk4ht htlatex doc.tex doc.cfg') +os.system('pdflatex doc') +html = open('doc.html').read() +m = re.search(r'<[ \t\r\n]*body[ \t\r\n]*>', html) +html = html[0:m.end(0)] + '
' + html[m.end(0):] +m = re.search(r'', html) +html = html[0:m.start(0)] + '
' + html[m.start(0):] +open('doc.html', 'w').write(html) + +os.system('pandoc doc.html -o doc.md') +md = open('doc.md').read() +m = re.search(r'\.\n ~', md) +while m != None: + md = md[0:m.start(0)] + '.' + md[m.end(0):] + m = re.search(r'\.\n ~', md) +m = re.search(r'## Chapter.*\\\n', md) +while m != None: + md = md[0:m.end(0) - 2] + ': ' + md[m.end(0):] + m = re.search(r'## Chapter.*\\\n', md) +for i in range(0, len(md) - 1): + if i >= len(md) - 1: + break + if md[i] == '\\' and md[i + 1] != '\\': + md = md[0:i] + md[i+1:] +open('doc.md', 'w').write(md) + +os.system('mv doc.md ../README.md') diff --git a/doc/doc.cfg b/doc/doc.cfg new file mode 100644 index 0000000..7cc21a1 --- /dev/null +++ b/doc/doc.cfg @@ -0,0 +1,30 @@ +\Preamble{html} +\begin{document} +\Css{ + body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9pt; + padding: 8pt; + line-height: 1.5em; +} + .titlemark {display: none;} + p.indent {text-indent: 0em;} + td p.indent {text-indent: 0em;} + dt { + float: left; + clear: left; + width: 100px; + text-align: right; + } + dt span.cmbx-10 { + font-style: italic; + font-weight: normal; + } + dd { + margin: 0 0 0 110px; + } + dt.enumerate-enumitem { + margin-left:-2em; + } +} +\EndPreamble diff --git a/doc/doc.tex b/doc/doc.tex new file mode 100644 index 0000000..78abd5a --- /dev/null +++ b/doc/doc.tex @@ -0,0 +1,113 @@ +\documentclass[oneside]{memoir} +\usepackage[breaklinks]{hyperref} +\usepackage{enumitem} + +\begin{document} +\title{ALICE: Application-Level Intelligent Crash Explorer} +\date{} +\maketitle + +This is a user documentation of the ALICE tool, which can be used to discover ``crash vulnerabilities'' in applications. Crash vulnerabilities are problems that get exposed by a sudden power loss or system crash while the application is running, and the application cannot recover correctly after rebooting the machine. ALICE focuses on single-node applications that run atop file systems. ALICE is different from similar tools in that it aims to find vulnerabilities that might occur across all file systems, including future ones. ALICE is also unique in targeting vulnerabilities associated with different source-code lines of the application, instead of checking the application's correctness atop arbitrarily (or systematically, but less useful) simulated crash scenarios. ALICE is designed to be extensible: both how it checks different source lines, and the combined behavior it assumes of underlying file systems, can be customized. The ALICE tool is a by-product of a research project (\url{http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html}) in the University of Wisconsin-Madison. + +\chapter{Installation} +ALICE was tested to work on Ubuntu-12.02, and should be expected to work on similar (i.e., Linux-like) operating systems. The following are specific requirements: +\begin{enumerate} +\item Python-2.7, as the default version of python invoked via \verb;/usr/bin/env python;. +\item Standard software build tools, such as \verb;gcc; and \verb;GNU Make;. +\item The libunwind libraries, installable in Ubuntu-12.02 using \verb;apt-get install libunwind7;. +\end{enumerate} +The following are the steps to install ALICE: +\begin{enumerate} +\item Download the most recent source-code tarball of ALICE, and untar it. This should produce a directory named \verb;alice;. +\item Set the environmental variable \verb;ALICE_HOME; to point to the \verb;alice; directory (i.e., the untared directory). For example, this can be done by adding the line \verb;export ALICE_HOME=/wherever-untarred/alice; to your \verb;.bashrc; file. +\item Set the \verb;PATH; environmental variable to include the \verb;alice/bin; directory. For example, this can be done by adding the line \verb;export PATH=$PATH:;\discretionary{}{}{}\verb;/wherever-untarred/alice/bin; to your \verb;.bashrc; file. +\item Install the \verb;alice-strace; tracing framework by moving into the \verb;alice/alice-strace; directory, and running \verb+./configure; make; make install;+ +\end{enumerate} +\chapter{Basic Usage} +The typical workflow for using ALICE has two steps. First, an application workload is run, and a trace of its activities are recorded. Second, ALICE is given this trace and a \textit{checker} script (explained later); ALICE explores the trace and displays discovered vulnerabilities. This documentation explains the typical usage of ALICE by using a toy application. + +\subsection{Toy application} +The toy application can be found in \verb;alice/example/toy/toy.c;; the reader is encouraged to go through it. The application does the following: +\begin{enumerate} +\item It updates a file called \verb;file1;, changing the contents of the file from \textit{``hello''} to \textit{``world''}. The update is done using a typical ``write to temporary file and rename'' sequence, so that the contents are updated atomically. Immediately after updating, the application prints a message to the user's terminal (the user can then supposedly assume that the file has been updated, and that the file will contain \textit{``world''} even if a power loss happens). +\item It creates two links to the file, \verb;link1; and \verb;link2;. The (imaginary) semantics of the toy application require both these links to be created atomically (i.e., if a power loss happens, either both links exist or neither do not). +\end{enumerate} + +\subsection{Step 1: Running the application and recording a trace} +A script that runs the application and records a trace, along with all initialization setup, can be found in \verb;alice/example/toy/toy_workload.sh;; the reader is encouraged to go through it. + +To perform \textmd{Step 1}, two directories are needed. The first, the \textit{workload directory}, is where the files of the application will be stored. The application, as it runs, will modify the workload directory and its contents. For the toy application, this is the place where \verb;file1;, \verb;link1;, and \verb;link2;, are placed. The \verb;toy_workload.sh; script first creates the workload directory, \verb;workload_dir;, and then initializes it with the file \verb;file1; containing \textit{``hello''}. + +The other needed directory, \textit{traces directory} is for storing the (multiple) traces that are recorded as the application is run. The \verb;toy_workload.sh; script next creates this directory, \verb;traces_dir;. After setting up the workload directory and the traces directory, the \verb;toy_workload.sh; script does a few more initialization things: compiling the \verb;toy.c; application, and \verb;cd;ing into \verb;workload_dir; so that the toy application can be run within there. + +The \verb;toy_workload.sh; script finally runs the application and records traces, by issuing the following command: + +\begin{verbatim} + alice-record --workload_dir . \ + --traces_dir ../traces_dir \ + ../a.out +\end{verbatim} + +If the reader is familiar with the \textit{strace} utility, the above command is similar to an invocation of strace: \verb;alice-record; is a script that records traces, while \verb;../a.out; is the actual application to be run (the process and all subprocesses of \verb;../a.out; are traced, similar to strace with the \verb;-ff; option). The \verb;alice-record; script requires two mandatory arguments: the workload directory and the traces directory (\verb;alice-record; takes one more optional argument, \verb;--verbose;, to control verbosity). + +\subsection{Step 2: Supply ALICE with the trace and the checker, and get back list of vulnerabilities} +\textmd{Step 2} requires the user to supply ALICE with a checker script. The checker script will be invoked multiple times by ALICE, each invocation corresponding to a (simulated) system crash scenario that could have happened while the application was running in \textmd{Step 1}. During each invocation, the checker script will be given a directory that reflects the state of the workload directory if the (simulated) crash had really happened. If the given crashed-state workload directory has an expected (i.e., consistent) set of files, the checker script should exit with status zero, and should exit with a non-zero status otherwise. + +ALICE supplies the checker script with two command-line arguments. The first is the path to the crashed-state workload directory. The second command-line argument to the checker script is the path to an \textit{stdout file}. The stdout file contains all the messages that had been printed to the user's terminal at the time of the crash (corresponding to the supplied crashed-state workload directory), and can be used by the checker to check for durability, as explained below. Note that the crashed-state workload directory supplied by ALICE might differ from the original workload directory in \textmd{Step 1}. Hence, for applications that expect the \textit{absolute path} of the contents within the workload directory to not have changed (a small subset of applications in our experience), the checker script needs to move the supplied directory to the original directory, and then operate atop the original directory. + +The checker script for the toy application can be found in \verb;alice/example/;\discretionary{}{}{}\verb;toy/toy_checker.py;, and the reader is encouraged to go through it. The script first changes the current working directory into the crashed-state directory supplied by ALICE, and reads all the messages printed in the terminal at the time of the crash by reading the stdout file supplied by ALICE. If the application has printed the \textit{``Updated file1 to \emph{world}''} message, the checker script makes sure that \verb;file1; contains \textit{``world''}; otherwise, the checker script makes sure that \verb;file1; contains either \textit{``hello''} or \textit{``world''}. The checker script then makes sure that either \verb;link1; and \verb;link2; are both present, or are both not present. If any of the checked conditions do not hold, the checker script results in an assertion failure, thus exiting with a non-zero status (and thus informing ALICE that the application will fail if the simulated crash scenario happens in real). + +After writing the checker script, the user can invoke the \verb;alice-check; script to actually run ALICE and get the list of vulnerabilities. The reader is encouraged to run the following command from within the \verb;alice/example/toy; directory, to get a list of vulnerabilities discovered in the toy application (after running \verb;toy_workload.sh; first). + +\begin{verbatim} + alice-check --traces_dir=traces_dir --checker=./toy_checker.py +\end{verbatim} + +The \verb;alice-check; script has the following arguments: + +\begin{description}[leftmargin=!, labelindent=1.2cm, itemindent=-0.5cm]\itemsep1pt \parskip0pt \parsep0pt +\item[traces\_dir] Mandatory. The traces directory, from \textmd{Step 1}. +\item[checker] Mandatory. The checker script. +\item[threads] Optional, default is 4. ALICE invokes checker scripts parallely, each checker script given a separate crashed-state directory to work on. Some applications do not allow multiple simultaneous invocations, and might require this option to be set to 1. +\item[debug\_level] Optional, default is 0. Verbosity of warnings, can be 0, 1, or 2. +\item[ignore\_mmap] Optional, default is False. The current version of ALICE does not trace \verb;mmap;-writes, and cannot correctly work with application workloads that use memory mapping to modify relevant files (see caveats and limitations). If the recorded trace during \textmd{Step 1} involves a writeable \verb;mmap(); to a seemingly relevant file, \verb;alice-check; aborts execution by default. However, some application workloads use \verb;mmap(); only on files that are irrelevant to crash consistency, for example to implement a shared-memory lock dealing with multi-process concurrency synchronization. This option can be set to True if the user is sure that the \verb;mmap();s observed while running the application workload are irrelevant to finding crash vulnerabilities. Some database applications use \verb;mmap(); for concurrency control, even when configured not to use \verb;mmap(); for otherwise accessing files, and require this option. +\end{description} + +\subsection{Understanding ALICE's output} +ALICE first outputs a list of list of the logical operations that form the \textit{update protocol} used by the application workload invoked in \textmd{Step 1}. The logical operations displayed is similar to a system-call trace, except that it is easier to understand, for example substituiting file names instead of file descriptor numbers. + +ALICE then displays any discovered vulnerabilities. Vulnerabilities are displayed in two ways: \textit{dynamic vulnerabilities}, relating to different operations in the update protocol, and \textit{static vulnerabilities}, relating to source-code lines. The proper display of static vulnerabilities requires the originally traced application to have debugging symbols; also, ALICE associates each logical operation to one of the stack frames in the logical operation's stack trace to display static vulnerabilities, and this association can sometimes be faulty. + +\chapter{Customizing, Extending, and Hacking} + +ALICE is designed to be extensible. The current version of ALICE strips off many features that were previously implemented, in hopes that a smaller code base promotes extensions. However, the current version is also not sufficiently commented, and does not follow some good coding practices; a well-commented version of the software might be released in the future if users shows interest. + +To extend ALICE, readers are required to go through our publication (\url{http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html}) to understand ALICE's design and philosophy. Note that there is some terminology difference between the publication and ALICE's source code; in particular, \textit{logical operations} discussed in the publication correspond to \textit{micro operations} in the source code, while \textit{micro operations} in the publication correspond to \textit{disk operations} in the source code. + +ALICE's default exploration strategy, which investigates the ordering and atomicity of each system call and reports any associated vulnerabilities, is coded in \verb;alice/alicedefaultexplorer.py;, and can be easily changed. The \verb;alicedefaultexplorer.py; code is complicated since it displays static vulnerabilities and invokes checkers in multiple threads. A functionally equivalent exploration strategy can be simpler. + +ALICE's default APM is coded in \verb;alice/alicedefaultfs.py;, and can be easily changed. The \verb;alicedefaultfs.py; code is complicated since it models a file system that can be configured to split file operations in different granularities. A functionally equivalent file system (with a single granularity) can be simpler. + +Other than the extensions discussed till now, users might try to add support for more system calls, file attributes, symbolic links, or other such details, in ALICE. Relevant to these, the \verb;_aliceparsesyscalls.py; script contains code that converts system calls into logical operations, while the \verb;replay_disk_ops(); function from the \verb;alice.py; script contains code that re-constructs a directory from a given list of micro-ops. + +\chapter{Caveats and Limitations} + +ALICE is a \textit{safe}, but not a \textit{complete} tool. That is, the application might have additional vulnerabilities than those discovered and reported. ALICE is thus not aligned towards comparing the correctness of different applications; specifically, any comparisons when not using equivalent workloads and checkers can easily produce confusing, wrong inferences. Also, any vulnerability displayed by ALICE might already be known to an application developer: the application documentation might explicitly require that the underlying file system not behave in those ways that will expose the vulnerability, or might simply not provide those guarantees that are being checked by the checker. + +The default file-system model (APM) used by ALICE is designed to also find vulnerabilities that can get exposed by future file systems; some crash scenarios that are possible with the default model do not happen in common current file systems. Also, ALICE's output (a list of vulnerabilities) is only designed to show the number of source lines that require ordering or atomicity. It is thus erraneous to directly correlate the number of vulnerabilities shown by ALICE with current real-world impact. + +ALICE does not currently attempt to deal with any file attributes (including modification time) other than the file size, or with the \verb;FD_CLOEXEC; and \verb;O_CLOEXEC; facilities. If the application's logic (that is invoked in the workload and the checker) depends on these, ALICE's output is probably wrong. Support for a few rarely-used system calls is also lacking; warning or error messages are displayed by ALICE if the application workload had invoked such calls. The situation for symlinks is similar; while the current version of ALICE attempts to support them slightly, if the application logic depends on symlinks, ALICE's output might be wrong. + +The current version of ALICE also does not support tracing memory-mapped writes; applications that use such writes as a part of their (relevant) update protocol cannot use ALICE. Note that a version of ALICE used in our published research paper (\url{http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html}) traced memory-mapped writes, but support was removed in the interest of distributability. + +Adding support for file attributes, \verb;CLOEXEC;, symlinks, and \verb;mmap(); writes does not require any changes to the design of ALICE, and might be done in future versions if users deem them helpful. + +\chapter{Credits, Acknowledgements, and Contact Information} + +Thanumalayan Sankaranarayana Pillai, Vijay Chidambaram, Ramnatthan Alagappan, and Samer Al-Kiswany were involved in various aspects of design, coding, and testing of the ALICE tool. Thanumalayan Sankaranarayana Pillai (madthanu@cs.wisc.edu) is the primary author, and might serve to be the best contact for bug reports, feature requests, or other general discussions. + +The ALICE tool is a by-product of a research project (\url{http://research.cs.wisc.edu/adsl/Publications/alice-osdi14.html}) in the University of Wisconsin-Madison, and due credit must be given to all parties who were involved in or contributed to the project. + +The \verb;alice-strace; tracing framework is a slight customization of the strace tool (\url{http://sourceforge.net/projects/strace/}), along with some code adapted from strace-plus (\url{https://code.google.com/p/strace-plus/}). Credits must be given to the authors and contributors of strace and strace-plus. + +\end{document} diff --git a/example/git/README.txt b/example/git/README.txt new file mode 100644 index 0000000..8e36436 --- /dev/null +++ b/example/git/README.txt @@ -0,0 +1,10 @@ +To check Git using ALICE, run the following commands within the example/git +directory: + +./git_workload.sh +alice-check --traces_dir=traces_dir --checker=./git_checker.sh + +Please note that the checker and workload included in this directory are +simple, and meant to explain how to use ALICE, rather than for actually testing +Git. + diff --git a/example/git/git_checker.sh b/example/git/git_checker.sh new file mode 100755 index 0000000..f363637 --- /dev/null +++ b/example/git/git_checker.sh @@ -0,0 +1,21 @@ +#!/bin/bash +crashed_state_directory="$1" + +cd $crashed_state_directory + +# If a crash happens in the middle of a Git command, a '.lock' file might be +# left in the repository. In this case, Git displays a message similar to "Make +# sure no other git process is running and remove the file manually to +# continue". We follow Git's instructions, and remove the file if it exists. +rm -f .git/index.lock + +# The following "set" command tells bash to exit with a non-zero status, if any +# of the future commands exits with a non-zero status +set -e + +# Doing a few operations on the directory (i.e., git repository) supplied by +# ALICE +git status +echo hello > x +git add x +git commit -m "tmp" diff --git a/example/git/git_workload.sh b/example/git/git_workload.sh new file mode 100755 index 0000000..d421cb6 --- /dev/null +++ b/example/git/git_workload.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Initialize the traces directory (where we are going to store traces collected +# during the workload) and the workload directory (where we are going to +# initialize a git repository and actually do the workload). +rm -rf traces_dir +rm -rf workload_dir +mkdir -p traces_dir +mkdir -p workload_dir + +# Move into the workload and initialize a git repository. +cd workload_dir +git init . + +# Create some file that we will be adding to the repository during the +# workload. +echo "hello" > file1 + +# Perform the actual workload and collect traces. The "workload_dir" argument +# to alice-record specifies the entire directory which will be re-constructed +# by alice and supplied to the checker. Alice also takes an initial snapshot of +# the workload directory before beginning the workload. The "traces_dir" +# argument specifies where all the traces recorded will be stored. +alice-record --workload_dir . \ + --traces_dir ../traces_dir \ + git add . + diff --git a/example/toy/toy.c b/example/toy/toy.c new file mode 100644 index 0000000..2c2bbe8 --- /dev/null +++ b/example/toy/toy.c @@ -0,0 +1,23 @@ +/* The following is a toy application that (tries to) atomically update a file, + * then prints a message, and then (tries to) atomically create two links */ + +#include +#include +#include +#include + +int main() { + int fd = open("tmp", O_CREAT | O_RDWR, 0666); + assert(fd > 0); + int ret = write(fd, "world", 5); + assert(ret == 5); + ret = close(fd); + assert(ret == 0); + ret = rename("tmp", "file1"); + assert(ret == 0); + printf("Updated\n"); + ret = link("file1", "link1"); + assert(ret == 0); + ret = link("file1", "link2"); + assert(ret == 0); +} diff --git a/example/toy/toy_checker.py b/example/toy/toy_checker.py new file mode 100755 index 0000000..dcabe7b --- /dev/null +++ b/example/toy/toy_checker.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +import os +import sys + +crashed_state_directory = sys.argv[1] +stdout_file = sys.argv[2] + +# Move into the crashed-state directory supplied by ALICE, and read all +# messages printed to the terminal at the time of the crash. +os.chdir(crashed_state_directory) +stdout = open(stdout_file).read() + +if 'Updated' in stdout: + # Check durability + assert open('file1').read() == 'world' +else: + # Check atomicity + assert open('file1').read() in ['hello', 'world'] + +# Check whether link1 and link2 were created together as a single atomic unit +dirlist = os.listdir('.') +assert ('link1' in dirlist) == ('link2' in dirlist) + diff --git a/example/toy/toy_workload.sh b/example/toy/toy_workload.sh new file mode 100755 index 0000000..72b75b5 --- /dev/null +++ b/example/toy/toy_workload.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# The workload directory is where the files of the application will be stored. +# The application, as it runs, will modify the workload directory and its +# contents. For the toy application, this is the place where file1, link1, and +# link2, are placed. We create the workload directory and initialize it with +# file1 containing "hello". +rm -rf workload_dir +mkdir -p workload_dir +echo -n "hello" > workload_dir/file1 + + +# The traces directory is for storing the (multiple) traces that are recorded +# as the application is run. +rm -rf traces_dir +mkdir -p traces_dir + +# Compiling the toy application. +gcc -g -fPIC toy.c + +# Moving into the workload directory. +cd workload_dir + +# Perform the actual workload and collect traces. The "workload_dir" argument +# to alice-record specifies the entire directory which will be re-constructed +# by alice and supplied to the checker. Alice also takes an initial snapshot of +# the workload directory before beginning the workload. The "traces_dir" +# argument specifies where all the traces recorded will be stored. +alice-record --workload_dir . \ + --traces_dir ../traces_dir \ + ../a.out +