9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] small acid trip
Date: Tue, 15 Jun 2010 08:11:03 -0700	[thread overview]
Message-ID: <AANLkTikjQBdoqyYb41_6NLBFan0v7mf_qqAnDOXxtqYM@mail.gmail.com> (raw)

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



                 reply	other threads:[~2010-06-15 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikjQBdoqyYb41_6NLBFan0v7mf_qqAnDOXxtqYM@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).