如何从 Window CE 中崩溃给出的地址找到源代码位置

发布于 2024-08-04 01:08:13 字数 994 浏览 3 评论 0原文

我有一个 Windows mobile 4.0 应用程序,使用 EVC++ 4.0 SP4 和 MFC 编写,在现场表现出随机的偶然崩溃。例如,异常 ox800000002 at 00112584。它不会在各种仿真器和模拟器下发生,因此很难使用调试器进行跟踪。崩溃会抛出地址和异常类型。鉴于我有 PDB,有什么方法可以跟踪这个地址的源头。我无法使用 VC++ 8 重新编译,因为它不支持 mobile 4 SDK。

我的猜测是,如果没有堆栈跟踪,我不会有太多快乐,因为异常可能不在我的源代码中。仍然值得一试。

编辑 根据建议,我查看了该程序的 .MAP 文件上下文中的地址。这揭示了以下内容

 Address         Publics by Value              Rva+Base     Lib:Object

 0001:00000000       ?GetUnduValue@@YANMM@Z     00011000 f   7Par.obj
'
'
'
 0001:001124b8       ?OnLButtonUp@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@AAVCPoint@@AAI@Z 001234b8 f   gxseldrg.obj
 0001:001126d8       ?OnSelDragStart@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@KK@Z 001236d8 f   gxseldrg.obj

,这表明在 CGXGridUserDragSelectRangeImp::OnLButtonUp() 期间发生了错误,这似乎有点奇怪,因为我认为当时没有按下鼠标/键盘/屏幕按钮。可能是在报告崩溃之前堆栈就被破坏了,我在浪费时间。我将使用汇编程序输出重新编译,尝试将其隔离到给定行,但不要抱太大希望:(

映射文件报告分段地址(例如 0001:xxxxxxxxx)和崩溃报告未分段地址这一事实是否意味着我有进行一些计算以从崩溃地址获取映射地址?

I have a Windows mobile 4.0 application, written using EVC++ 4.0 SP4 with MFC, that is exhibiting a random occasional crash in the field. e.g. Exception ox800000002 at 00112584. It does not happen under various emulators and simulators, hence is very difficult to trace using a debugger. The crash throws up and address and exception type. Given that I have the PDB is there any way to track this address to the source. I can't recompile using VC++ 8 as it doesn't support the mobile 4 SDK.

My guess is that without a stack trace I'm not going to have much joy, as the chances are that the exception may not be in my source. Worth a try all the same.

Edit As suggested, I have looked at the address in the context of the .MAP file for the program. This reveals the following

 Address         Publics by Value              Rva+Base     Lib:Object

 0001:00000000       ?GetUnduValue@@YANMM@Z     00011000 f   7Par.obj
'
'
'
 0001:001124b8       ?OnLButtonUp@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@AAVCPoint@@AAI@Z 001234b8 f   gxseldrg.obj
 0001:001126d8       ?OnSelDragStart@CGXGridUserDragSelectRangeImp@@UAAHPAVCGXGridCore@@KK@Z 001236d8 f   gxseldrg.obj

Which suggests the error occured during CGXGridUserDragSelectRangeImp::OnLButtonUp(), which seems a bit odd as I don't think there was a mouse / keyboard / screen button pressed at the time. Could be the stack got fragged before the crash got reported, and I'm wasting my time. I'll recompile with assembler output to try to isolate it to a given line, but don't hold out much hope :(

Does the fact that the map file reports segmented addresses e.g. 0001:xxxxxxxxx and the crash report unsegmented addresses mean I have to carry out some computation to get the map address from the crash address?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌路黄昏 2024-08-11 01:08:13

我能得到的最接近的是在 Visual Studio 8 上针对 Windows Mobile 6 重新编译,并在调试器下运行。这确实发生了一次这样的崩溃,但并不理想。

Nearest I could get was to recompile against Windows Mobile 6 on Visual Studio 8, and run under the debugger. This did catch one such crash but isn't ideal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文