How do I find a source code position from an address given by a crash in Window CE

Posted by Shane MacLaughlin on Stack Overflow See other posts from Stack Overflow or by Shane MacLaughlin
Published on 2009-09-04T09:29:02Z Indexed on 2010/05/14 6:04 UTC
Read the original article Hit count: 360

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about windows-mobile

Related posts about mfc