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: How to use systemtap with linux 3.5 userspace probes ?


Hello David,

>> I was expecting to be able to use the same dysp probes as with the
>> utrace patches, but trying a simple stap scripts such as:
>>
>> probe process("./a.out").function("foo")
>> { printf("hello\n"); }
>> fails to run:
>>
>> semantic error: while resolving probe point [...]

Thanks for pointing this out -- this is evidently a new problem since 1.8.

I found myself getting the same error, which makes it less likely that the issue is configuration-dependent. Two questions to verify:

- have you tried running

# stap -e 'probe process("/bin/ls").function("main") { printf("hello\n"); }'

to see if that fails as well? (If it fails, you have a different issue from what I think you have...)

- basically, does the process ./a.out in question actually have a function foo() defined?

I am only getting this error when the function in question *doesn't* exist, e.g. when I run it on '/bin/ls' looking for "foo". Otherwise, uprobes works fine.

This suggests that the problem is (at least partly) that error printing since 1.8 has been reshuffled so that this particular error in this particular context looks kind of misleading. The old message used to look like this:

semantic error: no match while resolving probe point: identifier 'process' at <input>:1:7
source: probe process("/opt/codebase/build/a.out").function("foo")

... which is more plausible to read as a 'function not found' error.

All the best,
        Serguei Makarov


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