not accessible variable under @defined predicate
Wenji Huang
wenji.huang@oracle.com
Fri May 28 11:07:00 GMT 2010
Hi,
In FC13, I got the following error message,
$stap -e 'probe process("stap").mark("pass2__end")
{print(@defined($arg1)? $arg1:$nosuchvar)}'
semantic error: unable to find local 'nosuchvar' near pc 0x805260a in
<unknown>(main.cxx) (alternatives: arg1): identifier '$nosuchvar' at
<input>:1:72
source: probe process("stap").mark("pass2__end")
{print(@defined($arg1)? $arg1:$nosuchvar)}
Stap means there is no $arg1 and so it tried $nosuchvar for the probe
point, but $arg1 is there and even provided as alternative. In fact, the
$arg1 isn't accessible.
$ stap -p2 -e 'probe process("stap").mark("pass2__end"){print($arg1)}'
semantic error: not accessible at this address (0x805260a): identifier
'$arg1' at <input>:1:48
source: probe process("stap").mark("pass2__end"){print($arg1)}
The current hint message will confuse the users. My suggestion is to
keep the "not accessible" message or @defined predicate will return true
once the target symbol exists, even not accessible.
Regards,
Wenji
More information about the Systemtap
mailing list