-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]日志文件中打印出来的栈信息不能使用addr2line识别 #381
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Needs help from a contributor
Comments
hnwyllmm
added
bug
Something isn't working
help wanted
Needs help from a contributor
labels
Apr 18, 2024
减去偏移量的做法更通用,不需要增加编译选项,对普通的应用程序来说更安全。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: