public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* not accessible variable under @defined predicate
@ 2010-05-28 11:07 Wenji Huang
  0 siblings, 0 replies; only message in thread
From: Wenji Huang @ 2010-05-28 11:07 UTC (permalink / raw)
  To: SystemTAP

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-27  7:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-28 11:07 not accessible variable under @defined predicate Wenji Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).