March 01, 2000
White-Box Testing
(a)
#include "aprobe.h"
probe thread
{
probe "fstat" in "libc.so"
{ /* Parameter one is $1, Parameter two is $2, etc */
on_entry
log ("St_dev is ", $2-> st_dev);
log ("Whole st_stat is ", *$2);
}
}
(b)
St_dev is 0
Whole st_stat is {
st_dev = 0
st_pad1 = {
[0] = 0
[1] = 0
[2] = 0
}
st_ino = 0
st_mode = 0
st_nlink = 0
st_uid = 0
st_gid = 0
st_rdev = 0
st_pad2 = {
[0] = -276903488
[1] = 143764
}
Example 1: (a) Aprobe log function; (b) resulting output.
|
|
|||||||||||||||||
|
|
|
|