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:
- Look for "stripped" or "not stripped" in the output of file a.out.
- 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.
本文来自博客园,作者:LiYanbin,转载请注明原文链接:https://www.cnblogs.com/stellar-liyanbin/p/18587001