Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!amix!skrenta From: skrenta@amix.commodore.com (Rich Skrenta) Newsgroups: comp.unix.amiga Subject: Re: Amiga 3000UX first impressions Message-ID: <978@amix.commodore.com> Date: 4 Feb 91 17:54:18 GMT References: <25196@grebyn.com> Organization: Commodore-Amiga Unix Development Lines: 48 brian@grebyn.com (Brian Bishop) writes: > > $ mkdir one > > $ truss mv one two > > execve("/usr/bin/mv", 0xC07FFF00, 0xC07FFF10) argc = 3 > > open("/dev/zero", O_RDONLY, 0) = 3 > > Is this real output? Does truss know to replace the value in the call with > the #define O_RDONLY? If so, that's way cool!! How does it know to do this?? Truss knows what the arguments to system calls mean, and will fill in the #defines for them if it can. It even gets the bits right. This is from a truss of cu connecting to a serial port: alarm(10) = 0 open("/dev/term/ql01", O_RDWR|O_NDELAY, 0) = 5 alarm(0) = 10 Truss has many options which let you limit the calls being traced, follow forks, truss already running processes, and elaborate on the arguments to certain calls. $ truss -v ioctl date # be verbose about ioctl() execve("/usr/bin/date", 0xC07FFE60, 0xC07FFE68) argc = 1 open("/dev/zero", O_RDONLY, 0) = 3 getuid() = 0 [ 0 ] getuid() = 0 [ 0 ] getgid() = 0 [ 0 ] getgid() = 0 [ 0 ] close(3) = 0 brk(0x80006990) = 0 time() = 665688842 ioctl(1, TCGETA, 0xC07FFD28) = 0 1 iflag=0026406 oflag=0000005 cflag=0000277 lflag=0107073 line=0 cc: 003 034 010 025 004 000 000 000 2 Mon Feb 4 12:30:30 EST 1991 write(1, " M o n F e b 4 1".., 29) = 29 _exit(0) 1 - Note information about the TCGETA 2 - Note the real output from the date command, before truss shows the write call -- skrenta@amix.commodore.com