This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
How do I trap the return of a function in a user space process?
- From: Martin Martin <martin at infinio dot com>
- To: systemtap at sourceware dot org
- Date: Thu, 5 Sep 2013 16:36:14 -0400
- Subject: How do I trap the return of a function in a user space process?
- Authentication-results: sourceware.org; auth=none
The following systemtap script fails to compile:
probe process("myexe").function("myFun").return { print("hi mom\n") }
It says:
semantic error: while resolving probe point: identifier 'process' at
proxy.stp:6:7 source: probe
process("/home/martin/experiments/systemtap/a.out").function("doSomething").return
^
semantic error: process return probes not available [man
error::inode-uprobes] Pass 2: analysis failed. [man error::pass2] Tip:
/usr/share/doc/systemtap/README.Debian should help you get started.
I want to trap when the function exits, not the process. If I remove
the .return it compiles & runs fine. How do I trap the function exit?
I'm on Ubuntu 13.04, Linux 3.8.0-29-generic, system tap 2.1/0.153.
Thanks,
Martin