WinCE driver exception debugging method

Source: Internet
Author: User
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 encoded 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 and 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 your 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

Summary
Of When Things Go Wrong Tags: Data
Abort

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.