This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: access pointer and global variables
David Smith wrote:
I agree with you that this might be implementable, but is it what you
would really want? In a return probe would you want the original value
of $prev->pid or the current value (assuming the function changed the
data pointed to by $prev)?
I'd guess that most times you'd want the current value.
That's a hard question to answer, because it can easily go either way.
For strace-like scripts, you generally want to say "this function with
these arguments produced this return value" -- so you want the original
values. But there are certainly times when you want to see how the
arguments were updated.
For a lot of cases, I think the arguments aren't modified, so it
wouldn't matter when you read them.
I think we can either find a way to do both, for the best flexibility,
or else pick the one that's the most sane (implementable? matches most
users' expectation?) and document how it works.
Josh