This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix the bug of conflict of -c and -x option


Lai Jiangshan wrote:
hi, all

using the following command to test target(), we can find that
the return value of target() is the pid of "readlink /proc/self",
but not 1234 as expected. Obviously, the -c and -x options are
conflict! pid specified by -x option will be overwritten if the -c
option is also specified.

$ stap -c "readlink /proc/self" -x 1234 -e 'probe begin{printf("target()=%d\n",target())}'
19681
target()=19681


the man page of stap says nothing about the conflict of -c and -x.

I think it will be better if the following patch can be applied.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>


... patch deleted ...


Lai,

Thanks for the patch - I've committed it. I'll also be adding two testcases to see this code gets exercised.

--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]