FAQ-bpftrace-堆栈不显示函数名|显示unknown(How to print the function name instead of the address for ustack)

link: How to print the function name instead of the address for ustack #3108

ajor:

Symbolication is based off the symbol table of the target application. It doesn't look like you're doing anything wrong to me, but you could double check that symbols exist in your a.out in a couple of ways:

  1. Look for "stripped" or "not stripped" in the output of file a.out.
  2. Look at the symbols yourself with nm -p a.out. You'll either see a list of addresses and symbols or the message "no symbols".

If the symbols are fine then another thing to check is whether your process is still running when bpftrace is printing out the stack traces. bpftrace uses the PID to find the correct process to symbolicate against, so if the process no longer exists we won't find the symbol table.

posted @ 2024-12-04 19:17  LiYanbin  阅读(4)  评论(0编辑  收藏  举报