Bug 4899

Summary: Can't insert stap probes on empty lines in a C function
Product: systemtap Reporter: Bharata B Rao <bharata>
Component: translatorAssignee: Frank Ch. Eigler <fche>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

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.