This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

not accessible variable under @defined predicate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]