How do I trap the return of a function in a user space process?

Martin Martin martin@infinio.com
Fri Sep 6 14:17:00 GMT 2013


Hi,

Thanks a lot for your response.  I created a virtual machine running
the latest beta of Ubuntu 13.10, which is Linux 3.11.0, and I can now
probe returns!

However, I only get events (function enter or exit) if I start the
process from stap using -c.  If I just run the process from the shell,
then run stap, I don't get any events. Any idea what I could be doing
wrong?

Thanks,
Martin

On Thu, Sep 5, 2013 at 4:42 PM, Yichun Zhang (agentzh)
<agentzh@gmail.com> wrote:
> Hello!
>
> On Thu, Sep 5, 2013 at 1:36 PM, Martin Martin wrote:
>> The following systemtap script fails to compile:
>>
>> probe process("myexe").function("myFun").return { print("hi mom\n") }
>>
> [...]
>>
>> I'm on Ubuntu 13.04, Linux 3.8.0-29-generic, system tap 2.1/0.153.
>>
>
> The Linux kernel 3.8 does not support uretprobes. I think you need to
> use kernel 3.10+ for that or downgrade to older kernels with the
> utrace patch applied.
>
> Regards,
> -agentzh



More information about the Systemtap mailing list