Bug 4899 - Can't insert stap probes on empty lines in a C function
Summary: Can't insert stap probes on empty lines in a C function
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Frank Ch. Eigler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 10:15 UTC by Bharata B Rao
Modified: 2007-08-24 19:26 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bharata B Rao 2007-08-06 10:15:27 UTC
Using SystemTap translator/driver (version 0.5.15/Red Hat elfutils 0.125 built
2007-08-01)

If a probepoint falls on an empty line in a C function, stap throw's a semantic
error. For eg with this stap script,

# kernel/fork.c:1385 happens to be a line w/o any C statements in do_fork() in
the kernel I am using.
probe kernel.function("*@kernel/fork.c:1385") {
        printf("do_fork: %d\n", $clone_flags);
}

The error shown is:
semantic error: no match for probe point while resolving probe point
kernel.function("*@kernel/fork.c:1385")

I would think that stap needs to find the next valid line which has a C
statement and should insert the probepoint there.
Comment 1 Frank Ch. Eigler 2007-08-20 21:36:18 UTC
This problem hits people easily if they need to use .statement() probes.
Comment 2 Frank Ch. Eigler 2007-08-24 19:26:58 UTC
Another bug was the loss of $target vars in many .statement probes.  That too
is fixed in a committed fix.