home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume43 / strace / part09 < prev    next >
Encoding:
Internet Message Format  |  1994-07-09  |  60.4 KB

  1. From: jrs@world.std.com (Rick Sladkey)
  2. Newsgroups: comp.sources.misc
  3. Subject: v43i083:  strace - system call tracer for sunos, linux, svr4, solaris2, Part09/10
  4. Date: 9 Jul 1994 15:50:13 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <2vn2i5$9ia@sparky.sterling.com>
  9. X-Md4-Signature: e8b92868bae9f72ac7420a5199208f9a
  10.  
  11. Submitted-by: jrs@world.std.com (Rick Sladkey)
  12. Posting-number: Volume 43, Issue 83
  13. Archive-name: strace/part09
  14. Environment: sunos, linux, svr4, solaris
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  strace-3.0/INSTALL strace-3.0/aclocal.m4 strace-3.0/io.c
  21. #   strace-3.0/ioctlsort.c strace-3.0/linux/dummy.h
  22. #   strace-3.0/linux/syscall.h strace-3.0/mem.c strace-3.0/proc.c
  23. #   strace-3.0/sunos4/syscall.h strace-3.0/time.c
  24. # Wrapped by kent@sparky on Sat Jul  9 15:42:58 1994
  25. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  26. echo If this archive is complete, you will see the following message:
  27. echo '          "shar: End of archive 9 (of 10)."'
  28. if test -f 'strace-3.0/INSTALL' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'strace-3.0/INSTALL'\"
  30. else
  31.   echo shar: Extracting \"'strace-3.0/INSTALL'\" \(5776 characters\)
  32.   sed "s/^X//" >'strace-3.0/INSTALL' <<'END_OF_FILE'
  33. XThis is a generic INSTALL file for utilities distributions.
  34. XIf this package does not come with, e.g., installable documentation or
  35. Xdata files, please ignore the references to them below.
  36. X
  37. XTo compile this package:
  38. X
  39. X1.  Configure the package for your system.  In the directory that this
  40. Xfile is in, type `./configure'.  If you're using `csh' on an old
  41. Xversion of System V, you might need to type `sh configure' instead to
  42. Xprevent `csh' from trying to execute `configure' itself.
  43. X
  44. XThe `configure' shell script attempts to guess correct values for
  45. Xvarious system-dependent variables used during compilation, and
  46. Xcreates the Makefile(s) (one in each subdirectory of the source
  47. Xdirectory).  In some packages it creates a C header file containing
  48. Xsystem-dependent definitions.  It also creates a file `config.status'
  49. Xthat you can run in the future to recreate the current configuration.
  50. X
  51. XRunning `configure' takes a minute or two.  While it is running, it
  52. Xprints some messages that tell what it is doing.  If you don't want to
  53. Xsee the messages, run `configure' with its standard output redirected
  54. Xto `/dev/null'; for example, `./configure >/dev/null'.
  55. X
  56. XTo compile the package in a different directory from the one
  57. Xcontaining the source code, you must use a version of `make' that
  58. Xsupports the VPATH variable, such as GNU `make'.  `cd' to the directory
  59. Xwhere you want the object files and executables to go and run
  60. X`configure'.  `configure' automatically checks for the source code in
  61. Xthe directory that `configure' is in and in `..'.  If for some reason
  62. X`configure' is not in the source code directory that you are
  63. Xconfiguring, then it will report that it can't find the source code.
  64. XIn that case, run `configure' with the option `--srcdir=DIR', where
  65. XDIR is the directory that contains the source code.
  66. X
  67. XBy default, `make install' will install the package's files in
  68. X/usr/local/bin, /usr/local/lib, /usr/local/man, etc.  You can specify an
  69. Xinstallation prefix other than /usr/local by giving `configure' the option
  70. X`--prefix=PATH'.  Alternately, you can do so by consistently giving a value
  71. Xfor the `prefix' variable when you run `make', e.g.,
  72. X    make prefix=/usr/gnu
  73. X    make prefix=/usr/gnu install
  74. X
  75. XYou can specify separate installation prefixes for
  76. Xarchitecture-specific files and architecture-independent files.  If
  77. Xyou give `configure' the option `--exec-prefix=PATH' or set the
  78. X`make' variable `exec_prefix' to PATH, the package will use PATH as
  79. Xthe prefix for installing programs and libraries.  Data files and
  80. Xdocumentation will still use the regular prefix.  Normally, all files
  81. Xare installed using the regular prefix.
  82. X
  83. XAnother `configure' option is useful mainly in `Makefile' rules for
  84. Xupdating `config.status' and `Makefile'.  The `--no-create' option
  85. Xfigures out the configuration for your system and records it in
  86. X`config.status', without actually configuring the package (creating
  87. X`Makefile's and perhaps a configuration header file).  Later, you can
  88. Xrun `./config.status' to actually configure the package.  You can also
  89. Xgive `config.status' the `--recheck' option, which makes it re-run
  90. X`configure' with the same arguments you used before.  This option is
  91. Xuseful if you change `configure'.
  92. X
  93. XSome packages pay attention to `--with-PACKAGE' options to `configure',
  94. Xwhere PACKAGE is something like `gnu-libc' or `x' (for the X Window System).
  95. XThe README should mention any --with- options that the package recognizes.
  96. X
  97. X`configure' ignores any other arguments that you give it.
  98. X
  99. XIf your system requires unusual options for compilation or linking
  100. Xthat `configure' doesn't know about, you can give `configure' initial
  101. Xvalues for some variables by setting them in the environment.  In
  102. XBourne-compatible shells, you can do that on the command line like
  103. Xthis:
  104. X    CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
  105. X
  106. XThe `make' variables that you might want to override with environment
  107. Xvariables when running `configure' are:
  108. X
  109. X(For these variables, any value given in the environment overrides the
  110. Xvalue that `configure' would choose:)
  111. XCC        C compiler program.
  112. X        Default is `cc', or `gcc' if `gcc' is in your PATH.
  113. XINSTALL        Program to use to install files.
  114. X        Default is `install' if you have it, `cp' otherwise.
  115. X
  116. X(For these variables, any value given in the environment is added to
  117. Xthe value that `configure' chooses:)
  118. XDEFS        Configuration options, in the form `-Dfoo -Dbar ...'
  119. X        Do not use this variable in packages that create a
  120. X        configuration header file.
  121. XLIBS        Libraries to link with, in the form `-lfoo -lbar ...'
  122. X
  123. XIf you need to do unusual things to compile the package, we encourage
  124. Xyou to figure out how `configure' could check whether to do them, and
  125. Xmail diffs or instructions to the address given in the README so we
  126. Xcan include them in the next release.
  127. X
  128. X2.  Type `make' to compile the package.  If you want, you can override
  129. Xthe `make' variables CFLAGS and LDFLAGS like this:
  130. X
  131. X    make CFLAGS=-O2 LDFLAGS=-s
  132. X
  133. X3.  If the package comes with self-tests and you want to run them,
  134. Xtype `make check'.  If you're not sure whether there are any, try it;
  135. Xif `make' responds with something like
  136. X    make: *** No way to make target `check'.  Stop.
  137. Xthen the package does not come with self-tests.
  138. X
  139. X4.  Type `make install' to install programs, data files, and
  140. Xdocumentation.
  141. X
  142. X5.  You can remove the program binaries and object files from the
  143. Xsource directory by typing `make clean'.  To also remove the
  144. XMakefile(s), the header file containing system-dependent definitions
  145. X(if the package uses one), and `config.status' (all the files that
  146. X`configure' created), type `make distclean'.
  147. X
  148. XThe file `configure.in' is used as a template to create `configure' by
  149. Xa program called `autoconf'.  You will only need it if you want to
  150. Xregenerate `configure' using a newer version of `autoconf'.
  151. END_OF_FILE
  152.   if test 5776 -ne `wc -c <'strace-3.0/INSTALL'`; then
  153.     echo shar: \"'strace-3.0/INSTALL'\" unpacked with wrong size!
  154.   fi
  155.   # end of 'strace-3.0/INSTALL'
  156. fi
  157. if test -f 'strace-3.0/aclocal.m4' -a "${1}" != "-c" ; then 
  158.   echo shar: Will not clobber existing file \"'strace-3.0/aclocal.m4'\"
  159. else
  160.   echo shar: Extracting \"'strace-3.0/aclocal.m4'\" \(5964 characters\)
  161.   sed "s/^X//" >'strace-3.0/aclocal.m4' <<'END_OF_FILE'
  162. Xdnl A macro to redefine AC_PARSEARGS to recognize the host options.
  163. Xdefine(AC_PARSEHOST,
  164. X[undefine([AC_PARSEARGS])dnl
  165. Xdefine(AC_PARSEARGS,
  166. X[for arg
  167. Xdo
  168. X  # Handle --exec-prefix with a space before the argument.
  169. X  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  170. X  # Handle --host with a space before the argument.
  171. X  elif test x$next_host = xyes; then host=$arg; next_host=
  172. X  # Handle --prefix with a space before the argument.
  173. X  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  174. X  # Handle --srcdir with a space before the argument.
  175. X  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  176. X  else
  177. X    case $arg in
  178. X     # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  179. X     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  180. Xchangequote(,)dnl
  181. X    exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  182. Xchangequote([,])dnl
  183. X     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  184. X    next_exec_prefix=yes ;;
  185. X
  186. X     -gas | --gas | --ga | --g) ;;
  187. X
  188. X     -host=* | --host=* | --hos=* | --ho=* | --h=*)
  189. Xchangequote(,)dnl
  190. X    host=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  191. Xchangequote([,])dnl
  192. X     -host | --host | --hos | --ho | --h)
  193. X    next_host=yes ;;
  194. X
  195. X     -nfp | --nfp | --nf) ;;
  196. X
  197. X     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  198. Xchangequote(,)dnl
  199. X    prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  200. Xchangequote([,])dnl
  201. X     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  202. X    next_prefix=yes ;;
  203. X
  204. X     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  205. Xchangequote(,)dnl
  206. X    srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  207. Xchangequote([,])dnl
  208. X     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  209. X    next_srcdir=yes ;;
  210. X
  211. X     -with-* | --with-*)
  212. X       package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
  213. X       # Reject names that aren't valid shell variable names.
  214. Xchangequote(,)dnl
  215. X       if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  216. Xchangequote([,])dnl
  217. X         echo "configure: $package: invalid package name" >&2; exit 1
  218. X       fi
  219. X       package=`echo $package| sed 's/-/_/g'`
  220. X       case "$arg" in
  221. Xchangequote(,)dnl
  222. X         *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
  223. Xchangequote([,])dnl
  224. X         *) val=1 ;;
  225. X       esac
  226. X       eval "with_$package='$val'" ;;
  227. X
  228. X     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  229. X       verbose=yes ;;
  230. X
  231. X     -*) ;;
  232. X
  233. X     *)
  234. X       host=$arg ;;
  235. X    esac
  236. X  fi
  237. Xdone
  238. X])])dnl
  239. Xdnl
  240. Xdnl A macro to run config.guess and config.sub if necessary and set
  241. Xdnl the shell variables $host and $canonical_host.
  242. Xdefine(AC_HOST,
  243. X[# Maybe guess the host type.
  244. Xif test -z "$host"
  245. Xthen
  246. X    guesssys=`echo [$]0 | sed 's/configure$/config.guess/'`
  247. X    if host=`$guesssys`
  248. X    then
  249. X        :
  250. X    else
  251. X        echo 'Failed to guess the host type.  You need to tell me.' >&2
  252. X        exit 1
  253. X    fi
  254. Xfi
  255. X
  256. X# Canonicalize the host type.
  257. Xecho "checking the host type"
  258. Xif canonical_host=`${srcdir}/config.sub "${host}"`
  259. Xthen
  260. X    :
  261. Xelse
  262. X    exit 1
  263. Xfi
  264. X
  265. Xtest -n "$verbose" &&
  266. X    echo "    host type is $host"
  267. Xtest -n "$verbose" &&
  268. X    echo "    canonical name is $canonical_host"
  269. X])dnl
  270. Xdnl
  271. Xdnl A macro to find the include directory, useful for cross-compiling.
  272. Xdefine(AC_INCLUDEDIR,
  273. X[AC_REQUIRE([AC_PROG_AWK])dnl
  274. XAC_SUBST(includedir)
  275. Xecho checking for include directory
  276. Xincludedir=/usr/include
  277. Xif test -n "$GCC"
  278. Xthen
  279. X    >conftest.c
  280. X    includedir=`
  281. X        $CC -v -E conftest.c 2>&1 | $AWK '
  282. X            /^End of search list/ { print last; exit }
  283. X            { last = [$]1 }
  284. X        '
  285. X    `
  286. X    rm -f conftest.c
  287. X    if test -n "$includedir" && test -d "$includedir"
  288. X    then
  289. X        test -n "$verbose" &&
  290. X            echo "    setting includedir to $includedir"
  291. X    else
  292. X        includedir=/usr/include
  293. X    fi
  294. Xelse
  295. X    test -n "$verbose" &&
  296. X        echo "    nothing happens"
  297. Xfi
  298. X])dnl
  299. Xdnl
  300. Xdnl A macro to automatically set different CC and HOSTCC if using gcc.
  301. Xdefine(AC_PROG_HOSTCC,
  302. X[AC_SUBST(HOSTCC)dnl
  303. Xif test -z "$HOSTCC"
  304. Xthen
  305. X    HOSTCC="$CC"
  306. X    if test -n "$GCC"
  307. X    then
  308. X        # Find out if gcc groks our host.
  309. X        worked=
  310. X        last=
  311. X        for i in $1
  312. X        do
  313. X            test "x$i" = "x$last" && continue
  314. X            last="$i"
  315. X            CC="$HOSTCC -b $i"
  316. X            AC_COMPILE_CHECK([working $CC],,,
  317. X                [worked=1
  318. X                test -n "$verbose" &&
  319. X                    echo "    setting CC to $CC"
  320. X                break])
  321. X        done
  322. X        if test -z "$worked"
  323. X        then
  324. X            CC="$HOSTCC"
  325. X        fi
  326. X    fi
  327. Xfi
  328. Xtest "x$HOSTCC" != "x$CC" &&
  329. X    test -n "$verbose" &&
  330. X        echo "    setting HOSTCC to $HOSTCC"
  331. X])dnl
  332. Xdnl
  333. Xdnl A macro to set gcc warning flags.
  334. Xdefine(AC_WARNFLAGS,
  335. X[AC_SUBST(WARNFLAGS)
  336. Xif test -z "$WARNFLAGS"
  337. Xthen
  338. X    if test -n "$GCC"
  339. X    then
  340. X        # If we're using gcc we want warning flags.
  341. X        WARNFLAGS=-Wall
  342. X    fi
  343. Xfi
  344. X])dnl
  345. Xdnl
  346. Xdnl A macro to determine if procfs is pollable.
  347. Xdefine(AC_POLLABLE_PROCFS,
  348. X[echo "checking for pollable procfs"
  349. XAC_TEST_PROGRAM([
  350. X#include <stdio.h>
  351. X#include <signal.h>
  352. X#include <sys/procfs.h>
  353. X#include <sys/stropts.h>
  354. X#include <poll.h>
  355. X
  356. Xmain()
  357. X{
  358. X    int pid;
  359. X    char proc[32];
  360. X    FILE *pfp;
  361. X    struct pollfd pfd;
  362. X
  363. X    if ((pid = fork()) == 0) {
  364. X        pause();
  365. X        exit(0);
  366. X    }
  367. X    sprintf(proc, "/proc/%d", pid);
  368. X    if ((pfp = fopen(proc, "r+")) == NULL)
  369. X        goto fail;
  370. X    if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
  371. X        goto fail;
  372. X    pfd.fd = fileno(pfp);
  373. X    pfd.events = POLLPRI;
  374. X    if (poll(&pfd, 1, 0) < 0)
  375. X        goto fail;
  376. X    if (!(pfd.revents & POLLPRI))
  377. X        goto fail;
  378. X    kill(pid, SIGKILL);
  379. X    exit(0);
  380. Xfail:
  381. X    kill(pid, SIGKILL);
  382. X    exit(1);
  383. X}
  384. X],
  385. XAC_DEFINE(HAVE_POLLABLE_PROCFS))
  386. X])dnl
  387. Xdnl
  388. Xdnl A macro to determine if the prstatus structure has a pr_syscall member.
  389. Xdefine(AC_PR_SYSCALL,
  390. X[AC_COMPILE_CHECK([pr_syscall in struct prstatus],
  391. X[#include <sys/procfs.h>], [struct prstatus s; s.pr_syscall;],
  392. XAC_DEFINE(HAVE_PR_SYSCALL))])dnl
  393. Xdnl
  394. Xdnl A macro to detect the presence of the sig_atomic_t in signal.h
  395. Xdefine(AC_SIG_ATOMIC_T,
  396. X[AC_COMPILE_CHECK([sig_atomic_t in signal.h],
  397. X[#include <signal.h>],
  398. X[sig_atomic_t x;],
  399. XAC_DEFINE(HAVE_SIG_ATOMIC_T))
  400. X])dnl
  401. Xdnl
  402. END_OF_FILE
  403.   if test 5964 -ne `wc -c <'strace-3.0/aclocal.m4'`; then
  404.     echo shar: \"'strace-3.0/aclocal.m4'\" unpacked with wrong size!
  405.   fi
  406.   # end of 'strace-3.0/aclocal.m4'
  407. fi
  408. if test -f 'strace-3.0/io.c' -a "${1}" != "-c" ; then 
  409.   echo shar: Will not clobber existing file \"'strace-3.0/io.c'\"
  410. else
  411.   echo shar: Extracting \"'strace-3.0/io.c'\" \(4872 characters\)
  412.   sed "s/^X//" >'strace-3.0/io.c' <<'END_OF_FILE'
  413. X/*
  414. X * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  415. X * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  416. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  417. X * All rights reserved.
  418. X *
  419. X * Redistribution and use in source and binary forms, with or without
  420. X * modification, are permitted provided that the following conditions
  421. X * are met:
  422. X * 1. Redistributions of source code must retain the above copyright
  423. X *    notice, this list of conditions and the following disclaimer.
  424. X * 2. Redistributions in binary form must reproduce the above copyright
  425. X *    notice, this list of conditions and the following disclaimer in the
  426. X *    documentation and/or other materials provided with the distribution.
  427. X * 3. All advertising materials mentioning features or use of this software
  428. X *    must display the following acknowledgement:
  429. X *      This product includes software developed by Paul Kranenburg,
  430. X *      Branko Lankester and Rick Sladkey.
  431. X * 4. The name of the author may not be used to endorse or promote products
  432. X *    derived from this software without specific prior written permission.
  433. X *
  434. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  435. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  436. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  437. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  438. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  439. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  440. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  441. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  442. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  443. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  444. X *
  445. X *    io.c,v 2.24 1994/06/29 04:43:21 jrs Exp
  446. X */
  447. X
  448. X#include "defs.h"
  449. X
  450. X#include <fcntl.h>
  451. X#include <sys/uio.h>
  452. X
  453. Xint
  454. Xsys_read(tcp)
  455. Xstruct tcb *tcp;
  456. X{
  457. X    if (entering(tcp)) {
  458. X        tprintf("%d, ", tcp->u_arg[0]);
  459. X    } else {
  460. X        if (syserror(tcp))
  461. X            tprintf("%#x", tcp->u_arg[1]);
  462. X        else
  463. X            printstr(tcp, tcp->u_arg[1], tcp->u_rval);
  464. X        tprintf(", %u", tcp->u_arg[2]);
  465. X    }
  466. X    return 0;
  467. X}
  468. X
  469. Xint
  470. Xsys_write(tcp)
  471. Xstruct tcb *tcp;
  472. X{
  473. X    if (entering(tcp)) {
  474. X        tprintf("%d, ", tcp->u_arg[0]);
  475. X        printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
  476. X        tprintf(", %u", tcp->u_arg[2]);
  477. X    }
  478. X    return 0;
  479. X}
  480. X
  481. X#ifndef LINUX
  482. X
  483. Xint
  484. Xsys_readv(tcp)
  485. Xstruct tcb *tcp;
  486. X{
  487. X    struct iovec *iov;
  488. X    int i, len;
  489. X
  490. X    if (entering(tcp)) {
  491. X        tprintf("%d, ", tcp->u_arg[0]);
  492. X    } else {
  493. X        if (syserror(tcp)) {
  494. X            tprintf("%#x, %u",
  495. X                    tcp->u_arg[1], tcp->u_arg[2]);
  496. X            return 0;
  497. X        }
  498. X        len = tcp->u_arg[2];
  499. X        if ((iov = (struct iovec *) malloc(len * sizeof *iov)) == NULL) {
  500. X            fprintf(stderr, "No memory");
  501. X            return 0;
  502. X        }
  503. X        if (umoven(tcp, tcp->u_arg[1],
  504. X                len * sizeof *iov, (char *) iov) < 0) {
  505. X            tprintf("%#x", tcp->u_arg[1]);
  506. X        } else {
  507. X            tprintf("[");
  508. X            for (i = 0; i < len; i++) {
  509. X                if (i)
  510. X                    tprintf(", ");
  511. X                tprintf("{");
  512. X                printstr(tcp, (int) iov[i].iov_base,
  513. X                    iov[i].iov_len);
  514. X                tprintf(", %u}", iov[i].iov_len);
  515. X            }
  516. X            tprintf("]");
  517. X        }
  518. X        free((char *) iov);
  519. X        tprintf(", %u", tcp->u_arg[2]);
  520. X    }
  521. X    return 0;
  522. X}
  523. X
  524. Xint
  525. Xsys_writev(tcp)
  526. Xstruct tcb *tcp;
  527. X{
  528. X    struct iovec *iov;
  529. X    int i, len;
  530. X
  531. X    if (entering(tcp)) {
  532. X        tprintf("%d, ", tcp->u_arg[0]);
  533. X        len = tcp->u_arg[2];
  534. X        iov = (struct iovec *) malloc(len * sizeof *iov);
  535. X        if (iov == NULL) {
  536. X            fprintf(stderr, "No memory");
  537. X            return 0;
  538. X        }
  539. X        if (umoven(tcp, tcp->u_arg[1],
  540. X                len * sizeof *iov, (char *) iov) < 0) {
  541. X            tprintf("%#x", tcp->u_arg[1]);
  542. X        } else {
  543. X            tprintf("[");
  544. X            for (i = 0; i < len; i++) {
  545. X                if (i)
  546. X                    tprintf(", ");
  547. X                tprintf("{");
  548. X                printstr(tcp, (int) iov[i].iov_base,
  549. X                    iov[i].iov_len);
  550. X                tprintf(", %u}", iov[i].iov_len);
  551. X            }
  552. X            tprintf("]");
  553. X        }
  554. X        free((char *) iov);
  555. X        tprintf(", %u", tcp->u_arg[2]);
  556. X    }
  557. X    return 0;
  558. X}
  559. X
  560. X#endif /* !LINUX */
  561. X
  562. X#ifdef SVR4
  563. X
  564. Xint
  565. Xsys_pread(tcp)
  566. Xstruct tcb *tcp;
  567. X{
  568. X    if (entering(tcp)) {
  569. X        tprintf("%d, ", tcp->u_arg[0]);
  570. X    } else {
  571. X        if (syserror(tcp))
  572. X            tprintf("%#x", tcp->u_arg[1]);
  573. X        else
  574. X            printstr(tcp, tcp->u_arg[1], tcp->u_rval);
  575. X        tprintf(", %u, %u", tcp->u_arg[2], tcp->u_arg[3]);
  576. X    }
  577. X    return 0;
  578. X}
  579. X
  580. Xint
  581. Xsys_pwrite(tcp)
  582. Xstruct tcb *tcp;
  583. X{
  584. X    if (entering(tcp)) {
  585. X        tprintf("%d, ", tcp->u_arg[0]);
  586. X        printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
  587. X        tprintf(", %u, %u", tcp->u_arg[2], tcp->u_arg[3]);
  588. X    }
  589. X    return 0;
  590. X}
  591. X
  592. X#endif /* SVR4 */
  593. X
  594. Xint
  595. Xsys_ioctl(tcp)
  596. Xstruct tcb *tcp;
  597. X{
  598. X    char *symbol;
  599. X
  600. X    if (entering(tcp)) {
  601. X        tprintf("%d, ", tcp->u_arg[0]);
  602. X        symbol = ioctl_lookup(tcp->u_arg[1]);
  603. X        if (symbol)
  604. X            tprintf("%s", symbol);
  605. X        else
  606. X            tprintf("%#x", tcp->u_arg[1]);
  607. X        ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
  608. X    }
  609. X    else {
  610. X        if (ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]) == 0)
  611. X            tprintf(", %#x", tcp->u_arg[2]);
  612. X    }
  613. X    return 0;
  614. X}
  615. END_OF_FILE
  616.   if test 4872 -ne `wc -c <'strace-3.0/io.c'`; then
  617.     echo shar: \"'strace-3.0/io.c'\" unpacked with wrong size!
  618.   fi
  619.   # end of 'strace-3.0/io.c'
  620. fi
  621. if test -f 'strace-3.0/ioctlsort.c' -a "${1}" != "-c" ; then 
  622.   echo shar: Will not clobber existing file \"'strace-3.0/ioctlsort.c'\"
  623. else
  624.   echo shar: Extracting \"'strace-3.0/ioctlsort.c'\" \(2496 characters\)
  625.   sed "s/^X//" >'strace-3.0/ioctlsort.c' <<'END_OF_FILE'
  626. X/*
  627. X * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  628. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  629. X * All rights reserved.
  630. X *
  631. X * Redistribution and use in source and binary forms, with or without
  632. X * modification, are permitted provided that the following conditions
  633. X * are met:
  634. X * 1. Redistributions of source code must retain the above copyright
  635. X *    notice, this list of conditions and the following disclaimer.
  636. X * 2. Redistributions in binary form must reproduce the above copyright
  637. X *    notice, this list of conditions and the following disclaimer in the
  638. X *    documentation and/or other materials provided with the distribution.
  639. X * 3. All advertising materials mentioning features or use of this software
  640. X *    must display the following acknowledgement:
  641. X *      This product includes software developed by Paul Kranenburg,
  642. X *      Branko Lankester and Rick Sladkey.
  643. X * 4. The name of the author may not be used to endorse or promote products
  644. X *    derived from this software without specific prior written permission.
  645. X *
  646. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  647. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  648. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  649. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  650. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  651. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  652. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  653. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  654. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  655. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  656. X *
  657. X *    ioctlsort.c,v 2.2 1994/03/12 23:11:44 jrs Exp
  658. X */
  659. X
  660. X#ifdef HAVE_CONFIG_H
  661. X#include "config.h"
  662. X#endif
  663. X
  664. X#include <stdio.h>
  665. X
  666. X#ifdef STDC_HEADERS
  667. X#include <stdlib.h>
  668. X#endif
  669. X
  670. Xstruct ioctlent {
  671. X    char *doth;
  672. X    char *symbol;
  673. X    long code;
  674. X};
  675. X
  676. X#include "ioctlent.raw"
  677. X
  678. Xint nioctlent = sizeof ioctlent / sizeof ioctlent[0];
  679. X
  680. Xint
  681. Xcompare(a, b)
  682. Xconst void *a;
  683. Xconst void *b;
  684. X{
  685. X    return ((struct ioctlent *) a)->code - ((struct ioctlent *) b)->code;
  686. X}
  687. X
  688. Xint
  689. Xmain(argc, argv)
  690. Xint argc;
  691. Xchar *argv[];
  692. X{
  693. X    int i;
  694. X
  695. X    qsort(ioctlent, nioctlent, sizeof ioctlent[0], compare);
  696. X    for (i = 0; i < nioctlent; i++) {
  697. X        printf("{\"%s\",\t\"%s\",\t%#lx},\n",
  698. X            ioctlent[i].doth, ioctlent[i].symbol, ioctlent[i].code);
  699. X    }
  700. X    return 0;
  701. X}
  702. END_OF_FILE
  703.   if test 2496 -ne `wc -c <'strace-3.0/ioctlsort.c'`; then
  704.     echo shar: \"'strace-3.0/ioctlsort.c'\" unpacked with wrong size!
  705.   fi
  706.   # end of 'strace-3.0/ioctlsort.c'
  707. fi
  708. if test -f 'strace-3.0/linux/dummy.h' -a "${1}" != "-c" ; then 
  709.   echo shar: Will not clobber existing file \"'strace-3.0/linux/dummy.h'\"
  710. else
  711.   echo shar: Extracting \"'strace-3.0/linux/dummy.h'\" \(6202 characters\)
  712.   sed "s/^X//" >'strace-3.0/linux/dummy.h' <<'END_OF_FILE'
  713. X/*
  714. X * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  715. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  716. X * All rights reserved.
  717. X *
  718. X * Redistribution and use in source and binary forms, with or without
  719. X * modification, are permitted provided that the following conditions
  720. X * are met:
  721. X * 1. Redistributions of source code must retain the above copyright
  722. X *    notice, this list of conditions and the following disclaimer.
  723. X * 2. Redistributions in binary form must reproduce the above copyright
  724. X *    notice, this list of conditions and the following disclaimer in the
  725. X *    documentation and/or other materials provided with the distribution.
  726. X * 3. All advertising materials mentioning features or use of this software
  727. X *    must display the following acknowledgement:
  728. X *      This product includes software developed by Paul Kranenburg,
  729. X *      Branko Lankester and Rick Sladkey.
  730. X * 4. The name of the author may not be used to endorse or promote products
  731. X *    derived from this software without specific prior written permission.
  732. X *
  733. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  734. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  735. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  736. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  737. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  738. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  739. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  740. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  741. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  742. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  743. X *
  744. X *    dummy.h,v 2.19 1994/03/12 23:12:13 jrs Exp
  745. X */
  746. X
  747. X/* still unfinished */
  748. X#define    sys_reboot        printargs
  749. X#define    sys_ioperm        printargs
  750. X#define    sys_syslog        printargs
  751. X#define    sys_iopl        printargs
  752. X#define    sys_vm86        printargs
  753. X#define sys_modify_ldt        printargs
  754. X#define sys_init_module        printargs
  755. X#define sys_get_kernel_syms    printargs
  756. X#define sys_quotactl        printargs
  757. X
  758. X/* like another call */
  759. X#define sys_uselib        sys_chdir
  760. X#define    sys_umount        sys_chdir
  761. X#define    sys_swapon        sys_chdir
  762. X#define    sys_swapoff        sys_chdir
  763. X#define    sys_clone        sys_fork
  764. X#define sys_create_module    sys_sethostname
  765. X#define sys_delete_module    sys_chdir
  766. X
  767. X/* printargs does the right thing */
  768. X#define sys_setup        printargs
  769. X#define    sys_getpid        printargs
  770. X#define    sys_getuid        printargs
  771. X#define    sys_pause        printargs
  772. X#define    sys_sync        printargs
  773. X#define    sys_getgid        printargs
  774. X#define    sys_geteuid        printargs
  775. X#define    sys_getegid        printargs
  776. X#define    sys_getppid        printargs
  777. X#define    sys_getpgrp        printargs
  778. X#define    sys_setsid        printargs
  779. X#define    sys_vhangup        printargs
  780. X#define    sys_idle        printargs
  781. X#define sys_getpgid        printargs
  782. X#define sys_fchdir        printargs
  783. X#define sys_bdflush        printargs
  784. X
  785. X/* subcall entry points */
  786. X#define sys_socketcall        printargs
  787. X#define sys_ipc            printargs
  788. X
  789. X/* unimplemented */
  790. X#define    sys_stty        printargs
  791. X#define    sys_gtty        printargs
  792. X#define    sys_ftime        printargs
  793. X#define    sys_prof        printargs
  794. X#define    sys_acct        printargs
  795. X#define    sys_phys        printargs
  796. X#define    sys_lock        printargs
  797. X#define    sys_mpx            printargs
  798. X#define    sys_ulimit        printargs
  799. X#define    sys_profil        printargs
  800. X#define    sys_ustat        printargs
  801. X#define    sys_break        printargs
  802. X
  803. X/* deprecated */
  804. X#define    sys_oldstat        printargs
  805. X#define    sys_oldlstat        printargs
  806. X#define    sys_oldfstat        printargs
  807. X#define    sys_olduname        printargs
  808. X#define    sys_oldolduname        printargs
  809. X
  810. X#if DONE
  811. X#define    sys_stime        printargs
  812. X#define    sys_time        printargs
  813. X#define    sys_times        printargs
  814. X#define    sys_mount        printargs
  815. X#define    sys_nice        printargs
  816. X#define sys_mprotect        printargs
  817. X#define sys_sigprocmask        printargs
  818. X#define sys_adjtimex        printargs
  819. X#define    sys_sysinfo        printargs
  820. X#define    sys_ipc            printargs
  821. X#define    sys_setdomainname    printargs
  822. X#define    sys_statfs        printargs
  823. X#define    sys_fstatfs        printargs
  824. X#define    sys_ptrace        printargs
  825. X#define    sys_sigreturn        printargs
  826. X#define    sys_fsync        printargs
  827. X#define    sys_alarm        printargs
  828. X#define    sys_socketcall        printargs
  829. X#define    sys_sigsuspend        printargs
  830. X#define    sys_utime        printargs
  831. X#define    sys_brk            printargs
  832. X#define    sys_mmap        printargs
  833. X#define    sys_munmap        printargs
  834. X#define    sys_select        printargs
  835. X#define    sys_setuid        printargs
  836. X#define    sys_setgid        printargs
  837. X#define    sys_setreuid        printargs
  838. X#define    sys_setregid        printargs
  839. X#define    sys_getgroups        printargs
  840. X#define    sys_setgroups        printargs
  841. X#define    sys_setrlimit        printargs
  842. X#define    sys_getrlimit        printargs
  843. X#define    sys_getrusage        printargs
  844. X#define    sys_getpriority        printargs
  845. X#define    sys_setpriority        printargs
  846. X#define    sys_setpgid        printargs
  847. X#define    sys_access        printargs
  848. X#define    sys_sethostname        printargs
  849. X#define    sys_readdir        printargs
  850. X#define    sys_waitpid        printargs
  851. X#define    sys_wait4        printargs
  852. X#define    sys_execve        printargs
  853. X#define    sys_fork        printargs
  854. X#define    sys_uname        printargs
  855. X#define    sys_pipe        printargs
  856. X#define    sys_siggetmask        printargs
  857. X#define    sys_sigsetmask        printargs
  858. X#define    sys_exit        printargs
  859. X#define    sys_kill        printargs
  860. X#define    sys_signal        printargs
  861. X#define    sys_sigaction        printargs
  862. X#define    sys_sigpending        printargs
  863. X#define    sys_fcntl        printargs
  864. X#define    sys_dup            printargs
  865. X#define    sys_dup2        printargs
  866. X#define    sys_close        printargs
  867. X#define    sys_ioctl        printargs
  868. X#define    sys_read        printargs
  869. X#define    sys_write        printargs
  870. X#define    sys_open        printargs
  871. X#define    sys_creat        printargs
  872. X#define    sys_link        printargs
  873. X#define    sys_unlink        printargs
  874. X#define    sys_chdir        printargs
  875. X#define    sys_mknod        printargs
  876. X#define    sys_chmod        printargs
  877. X#define    sys_chown        printargs
  878. X#define    sys_lseek        printargs
  879. X#define    sys_rename        printargs
  880. X#define    sys_mkdir        printargs
  881. X#define    sys_rmdir        printargs
  882. X#define    sys_umask        printargs
  883. X#define    sys_chroot        printargs
  884. X#define    sys_gettimeofday    printargs
  885. X#define    sys_settimeofday    printargs
  886. X#define    sys_symlink        printargs
  887. X#define    sys_readlink        printargs
  888. X#define    sys_truncate        printargs
  889. X#define    sys_ftruncate        printargs
  890. X#define    sys_fchmod        printargs
  891. X#define    sys_fchown        printargs
  892. X#define    sys_setitimer        printargs
  893. X#define    sys_getitimer        printargs
  894. X#define    sys_stat        printargs
  895. X#define    sys_lstat        printargs
  896. X#define    sys_fstat        printargs
  897. X#endif
  898. END_OF_FILE
  899.   if test 6202 -ne `wc -c <'strace-3.0/linux/dummy.h'`; then
  900.     echo shar: \"'strace-3.0/linux/dummy.h'\" unpacked with wrong size!
  901.   fi
  902.   # end of 'strace-3.0/linux/dummy.h'
  903. fi
  904. if test -f 'strace-3.0/linux/syscall.h' -a "${1}" != "-c" ; then 
  905.   echo shar: Will not clobber existing file \"'strace-3.0/linux/syscall.h'\"
  906. else
  907.   echo shar: Extracting \"'strace-3.0/linux/syscall.h'\" \(5719 characters\)
  908.   sed "s/^X//" >'strace-3.0/linux/syscall.h' <<'END_OF_FILE'
  909. X/*
  910. X * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  911. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  912. X * All rights reserved.
  913. X *
  914. X * Redistribution and use in source and binary forms, with or without
  915. X * modification, are permitted provided that the following conditions
  916. X * are met:
  917. X * 1. Redistributions of source code must retain the above copyright
  918. X *    notice, this list of conditions and the following disclaimer.
  919. X * 2. Redistributions in binary form must reproduce the above copyright
  920. X *    notice, this list of conditions and the following disclaimer in the
  921. X *    documentation and/or other materials provided with the distribution.
  922. X * 3. All advertising materials mentioning features or use of this software
  923. X *    must display the following acknowledgement:
  924. X *      This product includes software developed by Paul Kranenburg,
  925. X *      Branko Lankester and Rick Sladkey.
  926. X * 4. The name of the author may not be used to endorse or promote products
  927. X *    derived from this software without specific prior written permission.
  928. X *
  929. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  930. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  931. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  932. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  933. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  934. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  935. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  936. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  937. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  938. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  939. X *
  940. X *    syscall.h,v 2.18 1994/03/12 23:12:15 jrs Exp
  941. X */
  942. X
  943. X#include "dummy.h"
  944. X
  945. X/* primary syscalls */
  946. X
  947. Xint sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
  948. Xint sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
  949. Xint sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
  950. Xint sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
  951. Xint sys_lseek(), sys_getpid(), sys_mount(), sys_umount();
  952. Xint sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
  953. Xint sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
  954. Xint sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
  955. Xint sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
  956. Xint sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
  957. Xint sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
  958. Xint sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
  959. Xint sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
  960. Xint sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
  961. Xint sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
  962. Xint sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
  963. Xint sys_setreuid(), sys_setregid(), sys_sigsuspend();
  964. Xint sys_sigpending(), sys_sethostname(), sys_setrlimit();
  965. Xint sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
  966. Xint sys_settimeofday(), sys_getgroups(), sys_setgroups();
  967. Xint sys_select(), sys_symlink(), sys_oldlstat(), sys_readlink();
  968. Xint sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
  969. Xint sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
  970. Xint sys_fchmod(), sys_fchown(), sys_getpriority();
  971. Xint sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
  972. Xint sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
  973. Xint sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
  974. Xint sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
  975. Xint sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
  976. Xint sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
  977. Xint sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
  978. Xint sys_sigprocmask(), sys_create_module(), sys_init_module();
  979. Xint sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
  980. Xint sys_getpgid(), sys_fchdir(), sys_bdflush();
  981. X
  982. X/* sys_socketcall subcalls */
  983. X
  984. Xint sys_socket(), sys_bind(), sys_connect(), sys_listen();
  985. Xint sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
  986. Xint sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
  987. Xint sys_shutdown(), sys_setsockopt(), sys_getsockopt();
  988. X
  989. X#define SYS_socket_subcall    150
  990. X#define SYS_socket        (SYS_socket_subcall + 1)
  991. X#define SYS_bind        (SYS_socket_subcall + 2)
  992. X#define SYS_connect        (SYS_socket_subcall + 3)
  993. X#define SYS_listen        (SYS_socket_subcall + 4)
  994. X#define SYS_accept        (SYS_socket_subcall + 5)
  995. X#define SYS_getsockname        (SYS_socket_subcall + 6)
  996. X#define SYS_getpeername        (SYS_socket_subcall + 7)
  997. X#define SYS_socketpair        (SYS_socket_subcall + 8)
  998. X#define SYS_send        (SYS_socket_subcall + 9)
  999. X#define SYS_recv        (SYS_socket_subcall + 10)
  1000. X#define SYS_sendto        (SYS_socket_subcall + 11)
  1001. X#define SYS_recvfrom        (SYS_socket_subcall + 12)
  1002. X#define SYS_shutdown        (SYS_socket_subcall + 13)
  1003. X#define SYS_setsockopt        (SYS_socket_subcall + 14)
  1004. X#define SYS_getsockopt        (SYS_socket_subcall + 15)
  1005. X
  1006. X#define SYS_socket_nsubcalls    16
  1007. X
  1008. X/* sys_ipc subcalls */
  1009. X
  1010. Xint sys_semget(), sys_semctl();
  1011. Xint sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
  1012. Xint sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
  1013. X
  1014. X#define SYS_ipc_subcall        170
  1015. X#define SYS_semop        (SYS_ipc_subcall + 1)
  1016. X#define SYS_semget        (SYS_ipc_subcall + 2)
  1017. X#define SYS_semctl        (SYS_ipc_subcall + 3)
  1018. X#define SYS_msgsnd        (SYS_ipc_subcall + 11)
  1019. X#define SYS_msgrcv        (SYS_ipc_subcall + 12)
  1020. X#define SYS_msgget        (SYS_ipc_subcall + 13)
  1021. X#define SYS_msgctl        (SYS_ipc_subcall + 14)
  1022. X#define SYS_shmat        (SYS_ipc_subcall + 21)
  1023. X#define SYS_shmdt        (SYS_ipc_subcall + 22)
  1024. X#define SYS_shmget        (SYS_ipc_subcall + 23)
  1025. X#define SYS_shmctl        (SYS_ipc_subcall + 24)
  1026. X
  1027. X#define SYS_ipc_nsubcalls    25
  1028. X
  1029. END_OF_FILE
  1030.   if test 5719 -ne `wc -c <'strace-3.0/linux/syscall.h'`; then
  1031.     echo shar: \"'strace-3.0/linux/syscall.h'\" unpacked with wrong size!
  1032.   fi
  1033.   # end of 'strace-3.0/linux/syscall.h'
  1034. fi
  1035. if test -f 'strace-3.0/mem.c' -a "${1}" != "-c" ; then 
  1036.   echo shar: Will not clobber existing file \"'strace-3.0/mem.c'\"
  1037. else
  1038.   echo shar: Extracting \"'strace-3.0/mem.c'\" \(5515 characters\)
  1039.   sed "s/^X//" >'strace-3.0/mem.c' <<'END_OF_FILE'
  1040. X/*
  1041. X * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  1042. X * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  1043. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  1044. X * All rights reserved.
  1045. X *
  1046. X * Redistribution and use in source and binary forms, with or without
  1047. X * modification, are permitted provided that the following conditions
  1048. X * are met:
  1049. X * 1. Redistributions of source code must retain the above copyright
  1050. X *    notice, this list of conditions and the following disclaimer.
  1051. X * 2. Redistributions in binary form must reproduce the above copyright
  1052. X *    notice, this list of conditions and the following disclaimer in the
  1053. X *    documentation and/or other materials provided with the distribution.
  1054. X * 3. All advertising materials mentioning features or use of this software
  1055. X *    must display the following acknowledgement:
  1056. X *      This product includes software developed by Paul Kranenburg,
  1057. X *      Branko Lankester and Rick Sladkey.
  1058. X * 4. The name of the author may not be used to endorse or promote products
  1059. X *    derived from this software without specific prior written permission.
  1060. X *
  1061. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1062. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1063. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1064. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1065. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1066. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1067. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1068. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1069. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1070. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1071. X *
  1072. X *    mem.c,v 2.20 1994/03/21 05:45:30 jrs Exp
  1073. X */
  1074. X
  1075. X#include "defs.h"
  1076. X
  1077. X#include <sys/mman.h>
  1078. X
  1079. Xint
  1080. Xsys_brk(tcp)
  1081. Xstruct tcb *tcp;
  1082. X{
  1083. X    if (entering(tcp)) {
  1084. X        tprintf("%#x", tcp->u_arg[0]);
  1085. X    }
  1086. X#ifdef linux
  1087. X    return RVAL_HEX;
  1088. X}
  1089. X#else
  1090. X    return 0;
  1091. X}
  1092. X
  1093. Xint
  1094. Xsys_sbrk(tcp)
  1095. Xstruct tcb *tcp;
  1096. X{
  1097. X    if (entering(tcp)) {
  1098. X        tprintf("%u", tcp->u_arg[0]);
  1099. X    }
  1100. X    return RVAL_HEX;
  1101. X}
  1102. X#endif
  1103. X
  1104. Xstatic struct xlat mmap_prot[] = {
  1105. X    { PROT_NONE,    "PROT_NONE",    },
  1106. X    { PROT_READ,    "PROT_READ"    },
  1107. X    { PROT_WRITE,    "PROT_WRITE"    },
  1108. X    { PROT_EXEC,    "PROT_EXEC"    },
  1109. X    { 0,        NULL        },
  1110. X};
  1111. Xstatic struct xlat mmap_flags[] = {
  1112. X    { MAP_SHARED,    "MAP_SHARED"    },
  1113. X    { MAP_PRIVATE,    "MAP_PRIVATE"    },
  1114. X    { MAP_FIXED,    "MAP_FIXED"    },
  1115. X#ifdef MAP_ANONYMOUS
  1116. X    { MAP_FIXED,    "MAP_ANONYMOUS"    },
  1117. X#endif
  1118. X#ifdef MAP_RENAME
  1119. X    { MAP_RENAME,    "MAP_RENAME"    },
  1120. X#endif
  1121. X#ifdef MAP_NORESERVE
  1122. X    { MAP_NORESERVE,"MAP_NORESERVE"    },
  1123. X#endif
  1124. X#ifdef _MAP_NEW
  1125. X    { _MAP_NEW,    "_MAP_NEW"    },
  1126. X#endif
  1127. X    { 0,        NULL        },
  1128. X};
  1129. X
  1130. Xint
  1131. Xsys_mmap(tcp)
  1132. Xstruct tcb *tcp;
  1133. X{
  1134. X#ifdef LINUX
  1135. X    int u_arg[6];
  1136. X#else /* !LINUX */
  1137. X    int *u_arg = tcp->u_arg;
  1138. X#endif /* !LINUX */
  1139. X
  1140. X    if (entering(tcp)) {
  1141. X#ifdef LINUX
  1142. X        if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
  1143. X                (char *) u_arg) == -1)
  1144. X            return 0;
  1145. X#endif /* LINUX */
  1146. X
  1147. X        /* addr */
  1148. X        tprintf("%#x, ", u_arg[0]);
  1149. X        /* len */
  1150. X        tprintf("%u, ", u_arg[1]);
  1151. X        /* prot */
  1152. X        printflags(mmap_prot, u_arg[2]);
  1153. X        tprintf(", ");
  1154. X        /* flags */
  1155. X        printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
  1156. X        addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
  1157. X        /* fd */
  1158. X        tprintf(", %u, ", u_arg[4]);
  1159. X        /* offset */
  1160. X        tprintf("%#x", u_arg[5]);
  1161. X    }
  1162. X    return RVAL_HEX;
  1163. X}
  1164. X
  1165. Xint
  1166. Xsys_munmap(tcp)
  1167. Xstruct tcb *tcp;
  1168. X{
  1169. X    if (entering(tcp)) {
  1170. X        tprintf("%#x, %u",
  1171. X            tcp->u_arg[0], tcp->u_arg[1]);
  1172. X    }
  1173. X    return 0;
  1174. X}
  1175. X
  1176. Xint
  1177. Xsys_mprotect(tcp)
  1178. Xstruct tcb *tcp;
  1179. X{
  1180. X    if (entering(tcp)) {
  1181. X        tprintf("%#x, %u, ",
  1182. X            tcp->u_arg[0], tcp->u_arg[1]);
  1183. X        if (!printflags(mmap_prot, tcp->u_arg[2]))
  1184. X            tprintf("PROT_???");
  1185. X    }
  1186. X    return 0;
  1187. X}
  1188. X
  1189. X#ifdef HAVE_MCTL
  1190. X
  1191. Xstatic struct xlat mctl_funcs[] = {
  1192. X    { MC_LOCK,    "MC_LOCK"    },
  1193. X    { MC_LOCKAS,    "MC_LOCKAS"    },
  1194. X    { MC_SYNC,    "MC_SYNC"    },
  1195. X    { MC_UNLOCK,    "MC_UNLOCK"    },
  1196. X    { MC_UNLOCKAS,    "MC_UNLOCKAS"    },
  1197. X    { 0,        NULL        },
  1198. X};
  1199. X
  1200. Xstatic struct xlat mctl_lockas[] = {
  1201. X    { MCL_CURRENT,    "MCL_CURRENT"    },
  1202. X    { MCL_FUTURE,    "MCL_FUTURE"    },
  1203. X    { 0,        NULL        },
  1204. X};
  1205. X
  1206. Xstatic struct xlat mctl_sync[] = {
  1207. X    { MS_ASYNC,    "MS_ASYNC"    },
  1208. X    { MS_INVALIDATE,"MS_INVALIDATE"    },
  1209. X    { 0,        NULL        },
  1210. X};
  1211. X
  1212. Xint
  1213. Xsys_mctl(tcp)
  1214. Xstruct tcb *tcp;
  1215. X{
  1216. X    int arg, function;
  1217. X
  1218. X    if (entering(tcp)) {
  1219. X        /* addr */
  1220. X        tprintf("%#x", tcp->u_arg[0]);
  1221. X        /* len */
  1222. X        tprintf(", %u, ", tcp->u_arg[1]);
  1223. X        /* function */
  1224. X        function = tcp->u_arg[2];
  1225. X        if (!printflags(mctl_funcs, function))
  1226. X            tprintf("MC_???");
  1227. X        /* arg */
  1228. X        arg = tcp->u_arg[3];
  1229. X        tprintf(", ");
  1230. X        switch (function) {
  1231. X        case MC_SYNC:
  1232. X            if (!printflags(mctl_sync, arg))
  1233. X                tprintf("MS_???");
  1234. X            break;
  1235. X        case MC_LOCKAS:
  1236. X            if (!printflags(mctl_lockas, arg))
  1237. X                tprintf("MCL_???");
  1238. X            break;
  1239. X        default:
  1240. X            tprintf("%#x", arg);
  1241. X            break;
  1242. X        }
  1243. X    }
  1244. X    return 0;
  1245. X}
  1246. X
  1247. X#endif /* HAVE_MCTL */
  1248. X
  1249. Xint
  1250. Xsys_mincore(tcp)
  1251. Xstruct tcb *tcp;
  1252. X{
  1253. X    int i, len;
  1254. X    char *vec = NULL;
  1255. X
  1256. X    if (entering(tcp)) {
  1257. X        tprintf("%#x, %u, ", tcp->u_arg[0], tcp->u_arg[1]);
  1258. X    } else {
  1259. X        len = tcp->u_arg[1];
  1260. X        if (syserror(tcp) || tcp->u_arg[2] == 0 ||
  1261. X            (vec = malloc((u_int)len)) == NULL ||
  1262. X            umoven(tcp, tcp->u_arg[2], len, vec) < 0)
  1263. X            tprintf("%#x", tcp->u_arg[2]);
  1264. X        else {
  1265. X            tprintf("[");
  1266. X            for (i = 0; i < len; i++) {
  1267. X                if (abbrev(tcp) && i >= max_strlen) {
  1268. X                    tprintf("...");
  1269. X                    break;
  1270. X                }
  1271. X                tprintf((vec[i] & 1) ? "1" : "0");
  1272. X            }
  1273. X            tprintf("]");
  1274. X        }
  1275. X        if (vec)
  1276. X            free(vec);
  1277. X    }
  1278. X    return 0;
  1279. X}
  1280. X
  1281. Xint
  1282. Xsys_getpagesize(tcp)
  1283. Xstruct tcb *tcp;
  1284. X{
  1285. X    if (exiting(tcp))
  1286. X        return RVAL_HEX;
  1287. X    return 0;
  1288. X}
  1289. END_OF_FILE
  1290.   if test 5515 -ne `wc -c <'strace-3.0/mem.c'`; then
  1291.     echo shar: \"'strace-3.0/mem.c'\" unpacked with wrong size!
  1292.   fi
  1293.   # end of 'strace-3.0/mem.c'
  1294. fi
  1295. if test -f 'strace-3.0/proc.c' -a "${1}" != "-c" ; then 
  1296.   echo shar: Will not clobber existing file \"'strace-3.0/proc.c'\"
  1297. else
  1298.   echo shar: Extracting \"'strace-3.0/proc.c'\" \(6152 characters\)
  1299.   sed "s/^X//" >'strace-3.0/proc.c' <<'END_OF_FILE'
  1300. X/*
  1301. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  1302. X * All rights reserved.
  1303. X *
  1304. X * Redistribution and use in source and binary forms, with or without
  1305. X * modification, are permitted provided that the following conditions
  1306. X * are met:
  1307. X * 1. Redistributions of source code must retain the above copyright
  1308. X *    notice, this list of conditions and the following disclaimer.
  1309. X * 2. Redistributions in binary form must reproduce the above copyright
  1310. X *    notice, this list of conditions and the following disclaimer in the
  1311. X *    documentation and/or other materials provided with the distribution.
  1312. X * 3. All advertising materials mentioning features or use of this software
  1313. X *    must display the following acknowledgement:
  1314. X *      This product includes software developed by Paul Kranenburg,
  1315. X *      Branko Lankester and Rick Sladkey.
  1316. X * 4. The name of the author may not be used to endorse or promote products
  1317. X *    derived from this software without specific prior written permission.
  1318. X *
  1319. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1320. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1321. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1322. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1323. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1324. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1325. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1326. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1327. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1328. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1329. X *
  1330. X *    proc.c,v 2.9 1994/03/21 05:45:32 jrs Exp
  1331. X */
  1332. X
  1333. X#include "defs.h"
  1334. X
  1335. X#ifdef SVR4
  1336. X
  1337. Xstatic struct xlat proc_status_flags[] = {
  1338. X    { PR_STOPPED,    "PR_STOPPED"    },
  1339. X    { PR_ISTOP,    "PR_ISTOP"    },
  1340. X    { PR_DSTOP,    "PR_DSTOP"    },
  1341. X    { PR_ASLEEP,    "PR_ASLEEP"    },
  1342. X    { PR_FORK,    "PR_FORK"    },
  1343. X    { PR_RLC,    "PR_RLC"    },
  1344. X    { PR_PTRACE,    "PR_PTRACE"    },
  1345. X    { PR_PCINVAL,    "PR_PCINVAL"    },
  1346. X    { PR_ISSYS,    "PR_ISSYS"    },
  1347. X#ifdef PR_STEP
  1348. X    { PR_STEP,    "PR_STEP"    },
  1349. X#endif
  1350. X#ifdef PR_KLC
  1351. X    { PR_KLC,    "PR_KLC"    },
  1352. X#endif
  1353. X#ifdef PR_ASYNC
  1354. X    { PR_ASYNC,    "PR_ASYNC"    },
  1355. X#endif
  1356. X#ifdef PR_PCOMPAT
  1357. X    { PR_PCOMPAT,    "PR_PCOMPAT"    },
  1358. X#endif
  1359. X    { 0,        NULL        },
  1360. X};
  1361. X
  1362. Xstatic struct xlat proc_status_why[] = {
  1363. X    { PR_REQUESTED,    "PR_REQUESTED"    },
  1364. X    { PR_SIGNALLED,    "PR_SIGNALLED"    },
  1365. X    { PR_SYSENTRY,    "PR_SYSENTRY"    },
  1366. X    { PR_SYSEXIT,    "PR_SYSEXIT"    },
  1367. X    { PR_JOBCONTROL,"PR_JOBCONTROL"    },
  1368. X    { PR_FAULTED,    "PR_FAULTED"    },
  1369. X#ifdef PR_SUSPENDED
  1370. X    { PR_SUSPENDED,    "PR_SUSPENDED"    },
  1371. X#endif
  1372. X#ifdef PR_CHECKPOINT
  1373. X    { PR_CHECKPOINT,"PR_CHECKPOINT"    },
  1374. X#endif
  1375. X    { 0,        NULL        },
  1376. X};
  1377. X
  1378. Xstatic struct xlat proc_run_flags[] = {
  1379. X    { PRCSIG,    "PRCSIG"    },
  1380. X    { PRCFAULT,    "PRCFAULT"    },
  1381. X    { PRSTRACE,    "PRSTRACE"    },
  1382. X    { PRSHOLD,    "PRSHOLD"    },
  1383. X    { PRSFAULT,    "PRSFAULT"    },
  1384. X    { PRSVADDR,    "PRSVADDR"    },
  1385. X    { PRSTEP,    "PRSTEP"    },
  1386. X    { PRSABORT,    "PRSABORT"    },
  1387. X    { PRSTOP,    "PRSTOP"    },
  1388. X    { 0,        NULL        },
  1389. X};
  1390. X
  1391. X#if 0
  1392. X
  1393. Xstatic struct xlat proc_map_flags[] = {
  1394. X    { MA_READ,    "MA_READ"    },
  1395. X    { MA_WRITE,    "MA_WRITE"    },
  1396. X    { MA_EXEC,    "MA_EXEC"    },
  1397. X    { MA_SHARED,    "MA_SHARED"    },
  1398. X    { MA_BREAK,    "MA_BREAK"    },
  1399. X    { MA_STACK,    "MA_STACK"    },
  1400. X    { 0,        NULL        },
  1401. X};
  1402. X
  1403. Xstatic struct xlat proc_page_flags[] = {
  1404. X    { PG_REFERENCED,"PG_REFERENCED"    },
  1405. X    { PG_MODIFIED,    "PG_MODIFIED"    },
  1406. X    { PG_HWMAPPED,    "PG_HWMAPPED"    },
  1407. X    { 0,        NULL        },
  1408. X};
  1409. X
  1410. X#ifdef SPARC
  1411. X
  1412. Xstatic struct xlat proc_regs[] = {
  1413. X    { R_G0,        "R_G0"        },
  1414. X    { R_G1,        "R_G1"        },
  1415. X    { R_G2,        "R_G2"        },
  1416. X    { R_G3,        "R_G3"        },
  1417. X    { R_G4,        "R_G4"        },
  1418. X    { R_G5,        "R_G5"        },
  1419. X    { R_G6,        "R_G6"        },
  1420. X    { R_G7,        "R_G7"        },
  1421. X    { R_O0,        "R_O0"        },
  1422. X    { R_O1,        "R_O1"        },
  1423. X    { R_O2,        "R_O2"        },
  1424. X    { R_O3,        "R_O3"        },
  1425. X    { R_O4,        "R_O4"        },
  1426. X    { R_O5,        "R_O5"        },
  1427. X    { R_O6,        "R_O6"        },
  1428. X    { R_O7,        "R_O7"        },
  1429. X    { R_L0,        "R_L0"        },
  1430. X    { R_L1,        "R_L1"        },
  1431. X    { R_L2,        "R_L2"        },
  1432. X    { R_L3,        "R_L3"        },
  1433. X    { R_L4,        "R_L4"        },
  1434. X    { R_L5,        "R_L5"        },
  1435. X    { R_L6,        "R_L6"        },
  1436. X    { R_L7,        "R_L7"        },
  1437. X    { R_I0,        "R_I0"        },
  1438. X    { R_I1,        "R_I1"        },
  1439. X    { R_I2,        "R_I2"        },
  1440. X    { R_I3,        "R_I3"        },
  1441. X    { R_I4,        "R_I4"        },
  1442. X    { R_I5,        "R_I5"        },
  1443. X    { R_I6,        "R_I6"        },
  1444. X    { R_I7,        "R_I7"        },
  1445. X    { R_PSR,    "R_PSR"        },
  1446. X    { R_PC,        "R_PC"        },
  1447. X    { R_nPC,    "R_nPC"        },
  1448. X    { R_Y,        "R_Y"        },
  1449. X    { R_WIM,    "R_WIM"        },
  1450. X    { R_TBR,    "R_TBR"        },
  1451. X    { 0,        NULL        },
  1452. X};
  1453. X
  1454. X#endif /* SPARC */
  1455. X
  1456. X#endif /* 0 */
  1457. X
  1458. Xint
  1459. Xproc_ioctl(tcp, code, arg)
  1460. Xstruct tcb *tcp;
  1461. Xint code, arg;
  1462. X{
  1463. X    int val;
  1464. X    prstatus_t status;
  1465. X    prrun_t run;
  1466. X
  1467. X    if (entering(tcp))
  1468. X        return 0;
  1469. X
  1470. X    switch (code) {
  1471. X    case PIOCSTATUS:
  1472. X    case PIOCSTOP:
  1473. X    case PIOCWSTOP:
  1474. X        if (arg == 0)
  1475. X            tprintf(", NULL");
  1476. X        else if (syserror(tcp))
  1477. X            tprintf(", %#x", arg);
  1478. X        else if (umove(tcp, arg, &status) < 0)
  1479. X            tprintf(", {...}");
  1480. X        else {
  1481. X            tprintf(", {pr_flags=");
  1482. X            if (!printflags(proc_status_flags, status.pr_flags))
  1483. X                tprintf("0");
  1484. X            if (status.pr_why) {
  1485. X                tprintf(", pr_why=");
  1486. X                printxval(proc_status_why, status.pr_why,
  1487. X                      "PR_???");
  1488. X            }
  1489. X            switch (status.pr_why) {
  1490. X            case PR_SIGNALLED:
  1491. X            case PR_JOBCONTROL:
  1492. X                tprintf(", pr_what=");
  1493. X                printsignal(status.pr_what);
  1494. X                break;
  1495. X            case PR_FAULTED:
  1496. X                tprintf(", pr_what=%d", status.pr_what);
  1497. X                break;
  1498. X            case PR_SYSENTRY:
  1499. X            case PR_SYSEXIT:
  1500. X                tprintf(", pr_what=SYS_%s",
  1501. X                    sysent[status.pr_what].sys_name);
  1502. X                break;
  1503. X            }
  1504. X            tprintf(", ...}");
  1505. X        }
  1506. X        return 1;
  1507. X    case PIOCRUN:
  1508. X        if (arg == 0)
  1509. X            tprintf(", NULL");
  1510. X        else if (umove(tcp, arg, &run) < 0)
  1511. X            tprintf(", {...}");
  1512. X        else {
  1513. X            tprintf(", {pr_flags=");
  1514. X            if (!printflags(proc_run_flags, run.pr_flags))
  1515. X                tprintf("0");
  1516. X            tprintf(", ...}");
  1517. X        }
  1518. X        return 1;
  1519. X#ifdef PIOCSET
  1520. X    case PIOCSET:
  1521. X    case PIOCRESET:
  1522. X        if (umove(tcp, arg, &val) < 0)
  1523. X            tprintf(", [?]");
  1524. X        else {
  1525. X            tprintf(", [");
  1526. X            if (!printflags(proc_status_flags, val))
  1527. X                tprintf("0");
  1528. X            tprintf("]");
  1529. X        }
  1530. X        return 1;
  1531. X#endif /* PIOCSET */
  1532. X    case PIOCKILL:
  1533. X    case PIOCUNKILL:
  1534. X        /* takes a pointer to a signal */
  1535. X        if (umove(tcp, arg, &val) < 0)
  1536. X            tprintf(", [?]");
  1537. X        else {
  1538. X            tprintf(", [");
  1539. X            printsignal(val);
  1540. X            tprintf("]");
  1541. X        }
  1542. X        return 1;
  1543. X    case PIOCSFORK:
  1544. X    case PIOCRFORK:
  1545. X    case PIOCSRLC:
  1546. X    case PIOCRRLC:
  1547. X        /* doesn't take an arg */
  1548. X        return 1;
  1549. X    default:
  1550. X        /* ad naseum */
  1551. X        return 0;
  1552. X    }
  1553. X}
  1554. X
  1555. X#endif /* SVR4 */
  1556. END_OF_FILE
  1557.   if test 6152 -ne `wc -c <'strace-3.0/proc.c'`; then
  1558.     echo shar: \"'strace-3.0/proc.c'\" unpacked with wrong size!
  1559.   fi
  1560.   # end of 'strace-3.0/proc.c'
  1561. fi
  1562. if test -f 'strace-3.0/sunos4/syscall.h' -a "${1}" != "-c" ; then 
  1563.   echo shar: Will not clobber existing file \"'strace-3.0/sunos4/syscall.h'\"
  1564. else
  1565.   echo shar: Extracting \"'strace-3.0/sunos4/syscall.h'\" \(6181 characters\)
  1566.   sed "s/^X//" >'strace-3.0/sunos4/syscall.h' <<'END_OF_FILE'
  1567. X/*
  1568. X * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  1569. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  1570. X * All rights reserved.
  1571. X *
  1572. X * Redistribution and use in source and binary forms, with or without
  1573. X * modification, are permitted provided that the following conditions
  1574. X * are met:
  1575. X * 1. Redistributions of source code must retain the above copyright
  1576. X *    notice, this list of conditions and the following disclaimer.
  1577. X * 2. Redistributions in binary form must reproduce the above copyright
  1578. X *    notice, this list of conditions and the following disclaimer in the
  1579. X *    documentation and/or other materials provided with the distribution.
  1580. X * 3. All advertising materials mentioning features or use of this software
  1581. X *    must display the following acknowledgement:
  1582. X *      This product includes software developed by Paul Kranenburg,
  1583. X *      Branko Lankester and Rick Sladkey.
  1584. X * 4. The name of the author may not be used to endorse or promote products
  1585. X *    derived from this software without specific prior written permission.
  1586. X *
  1587. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1588. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1589. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1590. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1591. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1592. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1593. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1594. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1595. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1596. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1597. X *
  1598. X *    syscall.h,v 2.18 1994/03/12 23:12:20 jrs Exp
  1599. X */
  1600. X#include "dummy.h"
  1601. X
  1602. Xint    sys_nosys();
  1603. Xint    sys_nullsys();
  1604. Xint    sys_errsys();
  1605. X
  1606. X/* 1.1 processes and protection */
  1607. Xint    sys_gethostid(),sys_sethostname(),sys_gethostname(),sys_getpid();
  1608. Xint    sys_setdomainname(),sys_getdomainname();
  1609. Xint    sys_fork(),sys_exit(),sys_execv(),sys_execve(),sys_wait4();
  1610. Xint    sys_getuid(),sys_setreuid(),sys_getgid(),sys_getgroups(),sys_setregid(),sys_setgroups();
  1611. Xint    sys_getpgrp(),sys_setpgrp();
  1612. Xint    sys_sys_setsid(), sys_setpgid();
  1613. Xint    sys_uname();
  1614. X
  1615. X/* 1.2 memory management */
  1616. Xint    sys_brk(),sys_sbrk(),sys_sstk();
  1617. Xint    sys_getpagesize(),sys_mmap(),sys_mctl(),sys_munmap(),sys_mprotect(),sys_mincore();
  1618. Xint    sys_omsync(),sys_omadvise();
  1619. X
  1620. X/* 1.3 signals */
  1621. Xint    sys_sigvec(),sys_sigblock(),sys_sigsetmask(),sys_sigpause(),sys_sigstack(),sys_sigcleanup();
  1622. Xint    sys_kill(), sys_killpg(), sys_sigpending();
  1623. X
  1624. X/* 1.4 timing and statistics */
  1625. Xint    sys_gettimeofday(),sys_settimeofday();
  1626. Xint    sys_adjtime();
  1627. Xint    sys_getitimer(),sys_setitimer();
  1628. X
  1629. X/* 1.5 descriptors */
  1630. Xint    sys_getdtablesize(),sys_dup(),sys_dup2(),sys_close();
  1631. Xint    sys_select(),sys_getdopt(),sys_setdopt(),sys_fcntl(),sys_flock();
  1632. X
  1633. X/* 1.6 resource controls */
  1634. Xint    sys_getpriority(),sys_setpriority(),sys_getrusage(),sys_getrlimit(),sys_setrlimit();
  1635. Xint    sys_oldquota(), sys_quotactl();
  1636. Xint    sys_rtschedule();
  1637. X
  1638. X/* 1.7 system operation support */
  1639. Xint    sys_mount(),sys_unmount(),sys_swapon();
  1640. Xint    sys_sync(),sys_reboot();
  1641. Xint    sys_sysacct();
  1642. Xint    sys_auditsys();
  1643. X
  1644. X/* 2.1 generic operations */
  1645. Xint    sys_read(),sys_write(),sys_readv(),sys_writev(),sys_ioctl();
  1646. X
  1647. X/* 2.1.1 asynch operations */
  1648. Xint    sys_aioread(), sys_aiowrite(), sys_aiowait(), sys_aiocancel();
  1649. X
  1650. X/* 2.2 file system */
  1651. Xint    sys_chdir(),sys_chroot();
  1652. Xint    sys_fchdir(),sys_fchroot();
  1653. Xint    sys_mkdir(),sys_rmdir(),sys_getdirentries(), sys_getdents();
  1654. Xint    sys_creat(),sys_open(),sys_mknod(),sys_unlink(),sys_stat(),sys_fstat(),sys_lstat();
  1655. Xint    sys_chown(),sys_fchown(),sys_chmod(),sys_fchmod(),sys_utimes();
  1656. Xint    sys_link(),sys_symlink(),sys_readlink(),sys_rename();
  1657. Xint    sys_lseek(),sys_truncate(),sys_ftruncate(),sys_access(),sys_fsync();
  1658. Xint    sys_statfs(),sys_fstatfs();
  1659. X
  1660. X/* 2.3 communications */
  1661. Xint    sys_socket(),sys_bind(),sys_listen(),sys_accept(),sys_connect();
  1662. Xint    sys_socketpair(),sys_sendto(),sys_send(),sys_recvfrom(),sys_recv();
  1663. Xint    sys_sendmsg(),sys_recvmsg(),sys_shutdown(),sys_setsockopt(),sys_getsockopt();
  1664. Xint    sys_getsockname(),sys_getpeername(),sys_pipe();
  1665. X
  1666. Xint    sys_umask();        /* XXX */
  1667. X
  1668. X/* 2.3.1 SystemV-compatible IPC */
  1669. Xint    sys_semsys();
  1670. Xint    sys_msgsys();
  1671. Xint    sys_shmsys();
  1672. X
  1673. X/* 2.4 processes */
  1674. Xint    sys_ptrace();
  1675. X
  1676. X/* 2.5 terminals */
  1677. X
  1678. X/* emulations for backwards compatibility */
  1679. Xint    sys_otime();        /* now use gettimeofday */
  1680. Xint    sys_ostime();        /* now use settimeofday */
  1681. Xint    sys_oalarm();        /* now use setitimer */
  1682. Xint    sys_outime();        /* now use utimes */
  1683. Xint    sys_opause();        /* now use sigpause */
  1684. Xint    sys_onice();        /* now use setpriority,getpriority */
  1685. Xint    sys_oftime();        /* now use gettimeofday */
  1686. Xint    sys_osetpgrp();        /* ??? */
  1687. Xint    sys_otimes();        /* now use getrusage */
  1688. Xint    sys_ossig();        /* now use sigvec, etc */
  1689. Xint    sys_ovlimit();        /* now use setrlimit,getrlimit */
  1690. Xint    sys_ovtimes();        /* now use getrusage */
  1691. Xint    sys_osetuid();        /* now use setreuid */
  1692. Xint    sys_osetgid();        /* now use setregid */
  1693. Xint    sys_ostat();        /* now use stat */
  1694. Xint    sys_ofstat();        /* now use fstat */
  1695. X
  1696. X/* BEGIN JUNK */
  1697. Xint    sys_profil();        /* 'cuz sys calls are interruptible */
  1698. Xint    sys_vhangup();        /* should just do in sys_exit() */
  1699. Xint    sys_vfork();        /* XXX - was awaiting fork w/ copy on write */
  1700. Xint    sys_ovadvise();        /* awaiting new madvise */
  1701. Xint    sys_indir();        /* indirect system call */
  1702. Xint    sys_ustat();        /* System V compatibility */
  1703. Xint    sys_owait();        /* should use wait4 interface */
  1704. Xint    sys_owait3();        /* should use wait4 interface */
  1705. Xint    sys_umount();        /* still more Sys V (and 4.2?) compatibility */
  1706. Xint    sys_pathconf();        /* posix */
  1707. Xint    sys_fpathconf();        /* posix */
  1708. Xint    sys_sysconf();        /* posix */
  1709. X
  1710. Xint sys_debug();
  1711. X/* END JUNK */
  1712. X
  1713. Xint    sys_vtrace();        /* kernel event tracing */
  1714. X
  1715. X/* nfs */
  1716. Xint    sys_async_daemon();        /* client async daemon */
  1717. Xint    sys_nfs_svc();        /* run nfs server */
  1718. Xint    sys_nfs_getfh();        /* get file handle */
  1719. Xint    sys_exportfs();        /* export file systems */
  1720. X
  1721. Xint      sys_rfssys();        /* RFS-related calls */
  1722. X
  1723. Xint    sys_getmsg();
  1724. Xint    sys_putmsg();
  1725. Xint    sys_poll();
  1726. X
  1727. Xint    sys_vpixsys();        /* VP/ix system calls */
  1728. X
  1729. END_OF_FILE
  1730.   if test 6181 -ne `wc -c <'strace-3.0/sunos4/syscall.h'`; then
  1731.     echo shar: \"'strace-3.0/sunos4/syscall.h'\" unpacked with wrong size!
  1732.   fi
  1733.   # end of 'strace-3.0/sunos4/syscall.h'
  1734. fi
  1735. if test -f 'strace-3.0/time.c' -a "${1}" != "-c" ; then 
  1736.   echo shar: Will not clobber existing file \"'strace-3.0/time.c'\"
  1737. else
  1738.   echo shar: Extracting \"'strace-3.0/time.c'\" \(5055 characters\)
  1739.   sed "s/^X//" >'strace-3.0/time.c' <<'END_OF_FILE'
  1740. X/*
  1741. X * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  1742. X * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  1743. X * Copyright (c) 1993, 1994 Rick Sladkey <jrs@world.std.com>
  1744. X * All rights reserved.
  1745. X *
  1746. X * Redistribution and use in source and binary forms, with or without
  1747. X * modification, are permitted provided that the following conditions
  1748. X * are met:
  1749. X * 1. Redistributions of source code must retain the above copyright
  1750. X *    notice, this list of conditions and the following disclaimer.
  1751. X * 2. Redistributions in binary form must reproduce the above copyright
  1752. X *    notice, this list of conditions and the following disclaimer in the
  1753. X *    documentation and/or other materials provided with the distribution.
  1754. X * 3. All advertising materials mentioning features or use of this software
  1755. X *    must display the following acknowledgement:
  1756. X *      This product includes software developed by Paul Kranenburg,
  1757. X *      Branko Lankester and Rick Sladkey.
  1758. X * 4. The name of the author may not be used to endorse or promote products
  1759. X *    derived from this software without specific prior written permission.
  1760. X *
  1761. X * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1762. X * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1763. X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1764. X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1765. X * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1766. X * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1767. X * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1768. X * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1769. X * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1770. X * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1771. X *
  1772. X *    time.c,v 2.23 1994/06/29 04:43:27 jrs Exp
  1773. X */
  1774. X
  1775. X#include "defs.h"
  1776. X
  1777. X#ifdef LINUX
  1778. X#include <linux/timex.h>
  1779. X#endif /* LINUX */
  1780. X
  1781. Xvoid
  1782. Xprinttv(tcp, addr)
  1783. Xstruct tcb *tcp;
  1784. Xint addr;
  1785. X{
  1786. X    struct timeval tv;
  1787. X
  1788. X    if (addr == 0)
  1789. X        tprintf("NULL");
  1790. X    else if (!verbose(tcp))
  1791. X        tprintf("%#x", addr);
  1792. X    else if (umove(tcp, addr, &tv) < 0)
  1793. X        tprintf("{...}");
  1794. X    else
  1795. X        tprintf("{%lu, %lu}", tv.tv_sec, tv.tv_usec);
  1796. X}
  1797. X
  1798. Xint
  1799. Xsys_time(tcp)
  1800. Xstruct tcb *tcp;
  1801. X{
  1802. X    if (exiting(tcp)) {
  1803. X#ifndef SVR4
  1804. X        printnum(tcp, tcp->u_arg[0], "%d");
  1805. X#endif /* SVR4 */
  1806. X    }
  1807. X    return 0;
  1808. X}
  1809. X
  1810. Xint
  1811. Xsys_stime(tcp)
  1812. Xstruct tcb *tcp;
  1813. X{
  1814. X    if (exiting(tcp)) {
  1815. X        printnum(tcp, tcp->u_arg[0], "%d");
  1816. X    }
  1817. X    return 0;
  1818. X}
  1819. X
  1820. Xint
  1821. Xsys_gettimeofday(tcp)
  1822. Xstruct tcb *tcp;
  1823. X{
  1824. X    if (exiting(tcp)) {
  1825. X        if (syserror(tcp)) {
  1826. X            tprintf("%#x, %#x",
  1827. X                tcp->u_arg[0], tcp->u_arg[1]);
  1828. X            return 0;
  1829. X        }
  1830. X        printtv(tcp, tcp->u_arg[0]);
  1831. X#ifndef SVR4
  1832. X        tprintf(", ");
  1833. X        printtv(tcp, tcp->u_arg[1]);
  1834. X#endif /* !SVR4 */
  1835. X    }
  1836. X    return 0;
  1837. X}
  1838. X
  1839. Xint
  1840. Xsys_settimeofday(tcp)
  1841. Xstruct tcb *tcp;
  1842. X{
  1843. X    if (entering(tcp)) {
  1844. X        printtv(tcp, tcp->u_arg[0]);
  1845. X#ifndef SVR4
  1846. X        tprintf(", ");
  1847. X        printtv(tcp, tcp->u_arg[1]);
  1848. X#endif /* !SVR4 */
  1849. X    }
  1850. X    return 0;
  1851. X}
  1852. X
  1853. Xint
  1854. Xsys_adjtime(tcp)
  1855. Xstruct tcb *tcp;
  1856. X{
  1857. X    if (entering(tcp)) {
  1858. X        printtv(tcp, tcp->u_arg[0]);
  1859. X        tprintf(", ");
  1860. X    } else {
  1861. X        if (syserror(tcp))
  1862. X            tprintf("%#x", tcp->u_arg[1]);
  1863. X        else
  1864. X            printtv(tcp, tcp->u_arg[1]);
  1865. X    }
  1866. X    return 0;
  1867. X}
  1868. X
  1869. Xstatic struct xlat which[] = {
  1870. X    { ITIMER_REAL,    "ITIMER_REAL"    },
  1871. X    { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"},
  1872. X    { ITIMER_PROF,    "ITIMER_PROF"    },
  1873. X    { 0,        NULL        },
  1874. X};
  1875. X
  1876. Xstatic void
  1877. Xprintitv(tcp, addr)
  1878. Xstruct tcb *tcp;
  1879. Xint addr;
  1880. X{
  1881. X    struct itimerval itv;
  1882. X
  1883. X    if (addr == 0)
  1884. X        tprintf("NULL");
  1885. X    else if (!verbose(tcp))
  1886. X        tprintf("%#x", addr);
  1887. X    else if (umove(tcp, addr, &itv) < 0)
  1888. X        tprintf("{...}");
  1889. X    else {
  1890. X        tprintf("{it_interval={%lu, %lu}, it_value={%lu, %lu}}",
  1891. X        itv.it_interval.tv_sec, itv.it_interval.tv_usec,
  1892. X        itv.it_value.tv_sec, itv.it_value.tv_usec);
  1893. X    }
  1894. X}
  1895. X
  1896. Xint
  1897. Xsys_getitimer(tcp)
  1898. Xstruct tcb *tcp;
  1899. X{
  1900. X    if (entering(tcp)) {
  1901. X        printxval(which, tcp->u_arg[0], "ITIMER_???");
  1902. X        tprintf(", ");
  1903. X    } else {
  1904. X        if (syserror(tcp))
  1905. X            tprintf("%#x", tcp->u_arg[1]);
  1906. X        else
  1907. X            printitv(tcp, tcp->u_arg[1]);
  1908. X    }
  1909. X    return 0;
  1910. X}
  1911. X
  1912. Xint
  1913. Xsys_setitimer(tcp)
  1914. Xstruct tcb *tcp;
  1915. X{
  1916. X    if (entering(tcp)) {
  1917. X        printxval(which, tcp->u_arg[0], "ITIMER_???");
  1918. X        tprintf(", ");
  1919. X        printitv(tcp, tcp->u_arg[1]);
  1920. X        tprintf(", ");
  1921. X    } else {
  1922. X        if (syserror(tcp))
  1923. X            tprintf("%#x", tcp->u_arg[2]);
  1924. X        else
  1925. X            printitv(tcp, tcp->u_arg[2]);
  1926. X    }
  1927. X    return 0;
  1928. X}
  1929. X
  1930. X#ifdef LINUX
  1931. X
  1932. Xint
  1933. Xsys_adjtimex(tcp)
  1934. Xstruct tcb *tcp;
  1935. X{
  1936. X    struct timex txc;
  1937. X
  1938. X    if (exiting(tcp)) {
  1939. X        if (tcp->u_arg[0] == 0)
  1940. X            tprintf("NULL");
  1941. X        else if (syserror(tcp) || !verbose(tcp))
  1942. X            tprintf("%#x", tcp->u_arg[0]);
  1943. X        else if (umove(tcp, tcp->u_arg[0], &txc) < 0)
  1944. X            tprintf("{...}");
  1945. X        else {
  1946. X            tprintf("{mode=%d, offset=%ld, frequency=%ld, ",
  1947. X                txc.mode, txc.offset, txc.frequency);
  1948. X            tprintf("maxerror=%ld, esterror=%lu, status=%u, ",
  1949. X                txc.maxerror, txc.esterror, txc.status);
  1950. X            tprintf("time_constant=%ld, precision=%lu, ",
  1951. X                txc.time_constant, txc.precision);
  1952. X            tprintf("tolerance=%ld, time={%lu, %lu}}",
  1953. X                txc.tolerance,
  1954. X                txc.time.tv_sec, txc.time.tv_usec);
  1955. X        }
  1956. X    }
  1957. X    return 0;
  1958. X}
  1959. X#endif /* LINUX */
  1960. X
  1961. END_OF_FILE
  1962.   if test 5055 -ne `wc -c <'strace-3.0/time.c'`; then
  1963.     echo shar: \"'strace-3.0/time.c'\" unpacked with wrong size!
  1964.   fi
  1965.   # end of 'strace-3.0/time.c'
  1966. fi
  1967. echo shar: End of archive 9 \(of 10\).
  1968. cp /dev/null ark9isdone
  1969. MISSING=""
  1970. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  1971.     if test ! -f ark${I}isdone ; then
  1972.     MISSING="${MISSING} ${I}"
  1973.     fi
  1974. done
  1975. if test "${MISSING}" = "" ; then
  1976.     echo You have unpacked all 10 archives.
  1977.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1978. else
  1979.     echo You still must unpack the following archives:
  1980.     echo "        " ${MISSING}
  1981. fi
  1982. exit 0
  1983. exit 0 # Just in case...
  1984.