Using truss library for acid on 6.rot13 pre-fixes
tenshi% acid -l truss -l rot13.acid ./6.rot13
./6.rot13:amd64 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/amd64
/sys/lib/acid/truss
acid: win()
# Run in a new window (for text entry)
acid: truss()
pread(0, 0x00007ffffeffcef5, 8192, -1)
return value: 3
data: "hi
"
brk_(0x0000000000402af0)
return value: 0
pwrite(1, "ui
", 3, -1)
return value: 3
pread(0, 0x00007ffffeffcef5, 8192, -1)
return value: 4
data: "who
"
pwrite(1, 0x00007ffffeffae95, 6, 6, -1)
return value: 6
pread(0, 0x00007ffffeffcef5, 8192, -1)
return value: 4
data: "you
"
pwrite(1, 0x00007ffffeffae95, 6, 6, -1)
return value: 6
pread(0, 0x00007ffffeffcef5, 8192, -1)
<stdin>:4: (error) msg: pid=374332 startstop: interrupted
# <Delete key press>
acid: lstk()
pread(a0=0x0)+0xe /sys/src/libc/9syscall/pread.s:6
read(buf=0x7ffffeffcef5,n=0x7fff00002000)+0x27 /sys/src/libc/9sys/read.c:7
bioread(v=0x7ffffeffcef5,n=0x2000)+0x1e /sys/src/libbio/binit.c:56
Brdstr(bp=0x7ffffeffce98,delim=0xa,nulldelim=0x1)+0x19e /sys/src/libbio/brdstr.c:72
ip=0x7ffffeffcef5
i=0x0
p=0x0
j=0x6
ep=0x7ffffeffcef8
main()+0x87 /usr/seh/repos/plan9/C/rot13.c:26
in=0x0
out=0xffffe00000000000
str=0x401b80
len=0x3
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid: Biobuf(0x7ffffeffce98)
Biobufhdr {
icount 0
ocount 0
rdline 0
runesize 0
state 1
fid 0
flag 0
offset 11
bsize 8192
bbuf 0x00007ffffeffcef5
ebuf 0x00007ffffeffeef5
gbuf 0x00007ffffeffcef5
errorf 0x0000000000000000
iof 0x000000000020079a
}
b 0x7ffffeffcef0
acid: start(374332)
# Closed window
acid: win()
acid: truss()
pread(0, 0x00007ffffeffcef5, 8192, -1)
return value: 5
data: "test
"
brk_(0x0000000000402af0)
return value: 0
pwrite(1, 0x00007ffffeffae95, 9, 9, -1)
return value: 9
pread(0, 0x00007ffffeffcef5, 8192, -1)
<stdin>:20: (error) msg: pid=374721 startstop: interrupted
acid: truss()
breakpoint already set at close+0xc
breakpoint already set at _exits+0xc
breakpoint already set at open+0xc
breakpoint already set at sleep+0xc
breakpoint already set at create+0xc
breakpoint already set at brk_+0xc
breakpoint already set at errstr+0xc
breakpoint already set at pread+0xc
breakpoint already set at pwrite+0xc
<stdin>:21: (error) interrupted
acid: untruss()
acid: truss()
pwrite(1, "ui
", 3, -1)
return value: 3
pread(0, 0x00007ffffeffcef5, 8192, -1)
return value: 0
data: ""
374721: page fault strlen+0xd REPNE SCASB (DI),AL
Notes pending:
sys: trap: fault read addr=0x0
# Pressed ctrl-d in 6.rot13 window
acid: lstk()
strlen()+0xd /sys/src/libc/amd64/strlen.s:11
main()+0x94 /usr/seh/repos/plan9/C/rot13.c:26
in=0x0
out=0xffffe00000000000
str=0x0
len=0x2
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid: stk()
strlen()+0xd /sys/src/libc/amd64/strlen.s:11
main()+0x94 /usr/seh/repos/plan9/C/rot13.c:26
_main+0x40 /sys/src/libc/amd64/main9.s:15
acid:
echo kill > /proc/374721/ctl
echo kill > /proc/374332/ctl
echo kill > /proc/374313/ctl
tenshi% echo kill > /proc/374721/ctl
tenshi% echo kill > /proc/374332/ctl
tenshi% echo kill > /proc/374313/ctl