This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Question about line number probing
- From: "Nathan A. Debardeleben" <ndebard at lanl dot gov>
- To: systemtap at sourceware dot org
- Date: Wed, 24 Jan 2007 15:08:41 -0700 (MST)
- Subject: Question about line number probing
- Reply-to: ndebard at lanl dot gov
Just a quick question about line number probing. What if I had a function
that roughly looked like this:
foo(arg) {
arg2 = translate(arg);
if(arg2 == 1) /* one */
else if(arg2 == 2) /* two */
}
Obviously I could get at 'arg'. But what if I wanted to get at 'arg2'? I
can slip into a line number, after arg2 is calculated by the translate()
function. But can I do something with 'arg2' in a SystemTap script? Can
I do something like:
probe("foo.c:1234") {
printf("arg2 = %d\n", arg2);
}
Or does SystemTap have no knowledge of what (where?) arg2 is?
Thanks.