[BUG]日志文件中打印出来的栈信息不能使用addr2line识别 #381
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Needs help from a contributor
Describe the bug
A clear and concise description of what the bug is.
为了方便调试,日志中可以增加 lbt() 来打印调用栈,日志中会将栈的各个Frame地址打印出来。我们期望可以直接使用addr2line工具查看调用栈信息。但是当前的栈信息不能使用addr2line查看,得到的结果中文件名和行号是问号和0。
导致无法查看符号的原因是程序在运行时会动态调整程序基址,导致每次程序运行的得到的栈信息地址会变化,也不能使用addr2line识别。
解决方法:
Environment
Environment Details sometimes important
Additional context
Add any other context about the problem here.
日志示例:
addr2line工具使用:
参考资料:https://stackoverflow.com/questions/47778099/what-is-no-pie-used-for
The text was updated successfully, but these errors were encountered: