【问题标题】:In systemtap, how do I trap the return of a function in a user space process?在 systemtap 中,如何在用户空间进程中捕获函数的返回?
【发布时间】:2013-09-05 18:34:39
【问题描述】:

以下 systemtap 脚本编译失败:

probe process("myexe").function("myFun").return { print("hi mom\n") }

上面写着:

语义错误:解析探测点时:标识符“进程”位于 代理.stp:6:7 来源:探测过程(“/home/martin/experiments/systemtap/a.out”).function(“doSomething”).return ^

语义错误:进程返回探针不可用 [man error::inode-uprobes] Pass 2:分析失败。 [人错误::pass2] 提示:/usr/share/doc/systemtap/README.Debian 应该可以帮助您获得 开始了。

我想在函数退出时捕获,而不是进程。如果我删除 .return 它编译并运行良好。如何捕获函数退出?

我使用的是 Ubuntu 13.04,Linux 3.8.0-29-generic,system tap 2.1/0.153。

【问题讨论】:

    标签: systemtap


    【解决方案1】:

    man error::inode-uprobe 手册页解释了。 3.10 之前的 Linux 内核版本缺乏完成这项工作所需的返回探测功能。 (旧的 RHEL 内核确实具有等效的功能。)

    【讨论】:

      猜你喜欢
      • 2016-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-22
      • 2012-11-23
      • 2016-04-23
      相关资源
      最近更新 更多