* [9fans] small acid trip
@ 2010-06-15 15:11 ron minnich
0 siblings, 0 replies; only message in thread
From: ron minnich @ 2010-06-15 15:11 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
term%
ys/src/libc/9sys/ctime.c if(i < 0) 597 date Open
000077c9/"/env/timezone" 00000000 = 4 "" 0x11b7720437d8a6f0
0x11b7720437d9a4d8
/sys/src/libc/9sys/read.c return pread(fd, buf, n, -1LL); 597 date
Pread 4 0ffff854/"EST.-18000.EDT.-14400....9943200...25664400...41392800...5771880"
1680 -0x1 = 1518 "" 0x11b7720438e35860 0x11b7720438e3fc70
/sys/src/libc/9sys/ctime.c p = buf; 597 date Close 4 = 0 ""
0x11b7720439569c30 0x11b77204395705a8
/sys/src/libc/9sys/write.c return pwrite(fd, buf, n, -1LL); 597 date
Pwrite 1 0ffffdc8/"Tue.Jun.15.11:06:21.EDT.2010." 29 -0x1 = 29
"" 0x11b772043a979040 0x11b772043afe1a40
/sys/src/libc/9sys/getpid.c if(f >= 0) { 597 date Open
0000759c/"#c/pid" 00000000 = 4 "" 0x11b772043bd3ae08
0x11b772043bd4d6e8
/sys/src/libc/9sys/read.c return pread(fd, buf, n, -1LL); 597 date
Pread 4 0ffffee8/"........597." 20 -0x1 = 12 ""
0x11b772043c177598 0x11b772043c181d90
/sys/src/libc/9sys/getpid.c return atol(b); 597 date Close 4 = 0
"" 0x11b772043cf77170 0x11b772043cf7d700
?file?(no source) cwrite: /proc/597/syscall: failed bytes: process exited
/sys/src/libc/port/atexit.c _exits(s); 597 date Exits 0/""
To get this:
ratrace -c /bin/date |[2] acid /bin/date
toacid is:
#!/bin/rc
sed 's/"/\\"/g' | awk '{printf "printto(\"/fd/2\", " ""; printf
"pcfile(%s),srcline(%s),", $4, $4; for (i=1;i<=NF; i++) if (i != 4)
printf "\" %s\",", $i" "; print(")")}' | acid $1>/dev/null
I'm sure there is room for improvement but this is kind of fun.
ron
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-15 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-15 15:11 [9fans] small acid trip ron minnich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).