This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
not accessible variable under @defined predicate
- From: Wenji Huang <wenji dot huang at oracle dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Thu, 27 May 2010 15:24:38 +0800
- Subject: not accessible variable under @defined predicate
- Reply-to: wenji dot huang at oracle dot com
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