systemtap 按行号探测 "analysis failed"

systemtap probing by line number "analysis failed"

使用带有文件名和行号的 systemtap 会产生错误,而使用(损坏的)函数名是可以的。我在这里做错了什么?

// fails with 
// semantic error: no match
// Pass 2: analysis failed.  [man error::pass2]
probe process("a.out").statement("*@hello.cpp:5") {
  printf("in test\n")
}

// succeeds
probe process("a.out").function("_Z4testv").return {
  printf("in test\n")
}

//content of source of a.out 
#include <iostream>

void test() {
  int a = 1;
  std::cout << "Hello World!";
}

int main()
{
  test();
}

//stap command
sudo stap  a.stp -c "./a.out"

linux版本3.10.0-229.el7.x86_64

stap 版本 2.8/0.160

目录内容:a.out hello.cpp a.stp

如果您的程序缺少 debuginfo 但有一个符号 table,即如果它是在没有 CFLAGS=-g.

的情况下编译的,这将是预期的行为