This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: access variables within functions
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: "Rus-Rebreanu Alin-Florin" <netblock at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Mon, 14 Apr 2008 16:30:02 -0400
- Subject: Re: access variables within functions
- References: <88ac2f010804140438v5f44f4erda54cf415921b56e@mail.gmail.com>
"Rus-Rebreanu Alin-Florin" <netblock@gmail.com> writes:
> With my example i get:
> semantic error: not accessible at this address: identified '$ret' at
> <input>:1:70
That makes sense, since the local variable does not logically exist
at the moment of function entry.
> When using kernel.statement i seem to have a result don't know if
> it's correct yet but it's a result nonetheless, so I guess
> .statement did the trick [...]
You will probably encounter situations (statements/line numbers) where
systemtap will tell you that a particular variable is not available,
even though it is darned well there in the source code. Present gcc
is not real good at this, but some work is under way to make gcc
commit acts of metadata-preservation heroism. Later this year, I
hope, statement probing will be more carefree.
- FChE