Hide Forgot
Description of problem: Using command line option "-c" to specify a command to run during the stap session has the undocumented side-effect of setting target() to the pid of the command ran. This is actually a good thing and should be documented. :) Version-Release number of selected component (if applicable): systemtap-1.4-2.fc14.x86_64, very likely F15 and rawhide as well. How reproducible: Always. Steps to Reproduce: $ sudo stap -e 'probe begin { printf("%d\n", target()); } probe kernel.function("do_exit") { printf("%s(%d) called do_exit\n", execname(), pid()); }' -c /bin/true 31688 true(31688) called do_exit $ man stap [find no mention of target() on "-c" section] Actual results: It is not documented on manpage and other documentation. Expected results: It should be documented on manpage and other documentation. Additional info: Maybe a bugzilla was not the best way to pursue this?
It's documented in the function::target.3stap man page.
Created attachment 493611 [details] baby patch to document stap(1) option -c better and unscramble function::target(3stap)
Committed to upstream systemtap; should be fixed in version 1.5.