print ()
printf (fmt:string, ...)
The formatting string can contain tags that are defined as follows:
%[flags][width][.precision][length]specifier
Binary Write Examples
The following is an example of using the binary write functions:
probe begin {
for (i = 97; i < 110; i++)
printf("%3d: %1b%1b%1b\n", i, i, i-32, i-64)
exit()
}
97: aA! 98: bB" 99: cC# 100: dD$ 101: eE% 102: fF& 103: gG' 104: hH( 105: iI) 106: jJ* 107: kK+ 108: lL, 109: mM-
stap -e 'probe begin{printf("%b%b", 0xc0dedbad, \
0x12345678);exit()}' | hexdump -C
00000000 ad db de c0 00 00 00 00 78 56 34 12 00 00 00 00 |........xV4.....| 00000010
probe begin{
printf("%1b%1b%1blo %1b%1brld\n", 72,101,108,87,111)
exit()
}
Hello World
printd (delimiter:string, ...)
For example:
printd("/", "one", "two", "three", 4, 5, 6)
one/two/three/4/5/6
printdln (delimiter:string, ...)
println ()
sprint:string ()
sprintf:string (fmt:string, ...)