Windows CE: Finding the cause of a Data Abort

For Windows CE 5.0 and 6.0 looking up the instructions that caused the Data Abort is easier than in previous versions.  The module name and offset are included in the Data Abort output.  Take the following case:

Exception 'Data Abort' (4): Thread-Id=00df0002(pth=87e31c98), Proc-
Id=00400002(pprc=81118308) 'NK.EXE', VM-active=015f0002(pprc=87e07b70) 'udevice.exe'
PC=c098704c(usbfn.dll+0x0001704c) RA=c09880b0(usbfn.dll+0x000180b0) SP=d03ce2d8, BVA=00000000

This output gives us some valuable information including the module that failed and the offset into the module that the failure occurred.  For this one, the module is usbfn.dll and the module offset (MO) is 0x000180b0.  Skip ahead to number 3 below.


But if you are using Windows CE 4.2 or prior, then you will need to do some work to get the module name and offset.  I have found that using the RA value, in your case 02ea2614, as your Exception Address (EA) works best.

  1. Look up EA in your makeimg output.  It falls between two modules code starts (CS).  The one with the lower number is the module with the problem.   In Platform Builder for Windows CE 4.x, the makeimg output is in the root folder of you project in <project name>.PLG.
  2. Then the Module Offset (MO) is EA-CS=MO. 
  3. For Windows CE 5.0 and later, MO = MO - 0x1000
  4. Look MO up in <module.map> in your target folder.  Similar to looking it up in the makeimg output, it will give you the function that caused the exception, and the function offset (FO).
  5. Now find the Instruction Offsett(IO) MO-FO=IO. 
  6. Now figure out which c/c++ file contains the function, look up the function in the corresponding .COD file, and find IO.  That is the assembly instruction that caused the exception, look up a few lines an you will see the C code.


If you don't have the .COD files, set the environment variable WINCECOD=1
and rebuild.

Also see:  Platform Builder: Find the Source of a Data Abort; an Example

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值