Setting Up Application Verifier for Always-Running Processes (Windows Embedded CE 6.0)

1/6/2010

The Application Verifier tool can help find memory leaks, including leaks in code that loads at boot time. For information about configuring and running the Application Verifier tool, see Application Verifier Tool.

To set up Application Verifier for Always Running Processes

  1. Install Platform Builder for Windows Embedded CE 6.0 **.

    A tools-only install of Platform Builder for CE 6.0 is sufficient because even a tools-only installation includes the Windows Embedded CE 6.0 Test Kit (CETK).

  2. Open the build window, in which you build run-time images.

  3. Optionally, remove or reset all of the security settings, or make sure they are configured properly.

  4. Copy all the AppVerifier binaries to the %_FLATRELEASEDIR% directory.

    To automate this step, run the following batch file: %CE_MODULES%\DDTK\DESKTOP\GetAppVerif_CETK.bat.

    To perform this step manually, copy the following files to the %_FLATRELEASEDIR% directory:

    • AppVerif*
    • Shim_*.dll
    • Symhlp.dll
    • Vlog.dll
    • Lmemdebug_autoshim.dll
    • Shimeng.dll
  5. In the build window, set the VERIFY_MODULES environment variable by specifying the modules that AppVerifier needs to shim. In the list, include Device.exe and the file name and file name extension of each DLL that you want to test. Separate the file names with spaces, as in the following example:

    set``VERIFY_MODULES=device.exe atidrv.dll

  6. If IMGPERSISTENTSTORAGE=1, set IMGSHIMENABLE=1.

  7. Set the VERIFY_OPTIONS=%EnableFanOut%

  8. Run Makeverifyfile.bat. By default, this file is located in the %CE_MODULES%\DDTK\DESKTOP directory.

  9. Run Makeimg.exe. **

  10. Make sure that Makeimg.exe signs all shim DLLs properly. **

  11. Copy the image to flash memory on the device. **

  12. Optionally, connect the device to KITL and then boot the device. KITL is optional, but highly recommended. **

  13. Verify that KITL is connected. If so, text similar to the following appears in the output window:

    TID:<address> ++Shim autoloader
    Found shim 'shim_heap.dll'
    
  14. To find a leak, take a snapshot, run user scenarios, and then get a delta. The following steps show the typical sequence:

    1. Boot the device.
    2. Create a check point on Device.exe by running heapverif device.exe chk.
    3. Report the potential leaks since the last check point on device.exe by running heapverif device.exe delta.
    4. Repeat these steps to find other leaks.

See Also

Other Resources

Application Verifier Tool