关于 .dSYM 和 GDB
我的应用程序发生崩溃。这不是 100% 重现率崩溃。从崩溃日志和 dSYM 中,我可以在某些 cpp 文件的行中找到崩溃发生的位置。但大多数时候应用程序运行良好。所以我不知道是什么原因导致它崩溃。我能否在崩溃的 cpp 行中获得更多信息,例如应用程序崩溃时该行中变量的某些值等等。欢迎任何建议。谢谢!
I encountered a crash in my app. It's not 100% reproduce rate crash. From the crash log and dSYM, I can get the point where the crash happened in the line of some cpp file. But most of time the app run well. So I don't know what cause it crash. Can I got more infos in the line of cpp where it crash,like some value of varible in this line when the app crash and so on. Any suggestion is welcomed. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的崩溃日志应该包含有关寄存器状态的信息,这可能非常有用。但除此之外,您无法仅从崩溃报告中恢复正在运行的应用程序的状态。
Your crash log should have information about the state of the registers in it and that can be quite useful. Beyond that, though, you can't recover state of the running app from just the crash report.
像这样的零星错误可能是最难发现的。
首先我建议仔细看看代码?例如,该行上的指针是否取消引用。您的崩溃日志是否表明错误发生在线程返回运行循环之前或之后?您能否用异常包围该崩溃线并将状态记录在 catch 块中?
如果您发布导致崩溃的代码将会有所帮助!
Sporadic bugs such as this can be the most difficult to hunt down.
First of all I suggest taking a close look at the code? e.g. Is there a de-referencing of a pointer on this line. Does your crash log indicate that the error occurred before or after the tread returned to the run loop? Can you surround this crash line with an exception and log the state in the catch block?
It will help if you post the code which causes the crash!