Capturing a Dump File While Debugging (Windows Embedded CE 6.0)

1/5/2010

In addition to capturing crash data, Windows Embedded CE Error Reporting makes it possible for you to generate a snapshot of the device in the middle of a debugging session. After you capture the data, you can save the file for later debugging, even when the device is no longer available, or share the file for wider analysis.

For information about capturing a dump file when the target device is not connected to a development workstation running Platform Builder, see Capturing a Dump File on a Standalone Device.

To capture a dump file while debugging, the debugger must be connected and in break-state. Error reporting bases the capture on the state of the machine at the point the debugger stopped for the breakpoint.

You can capture a dump file when doing software-assisted debugging.

To capture a dump file while debugging

  1. Connect the debugger to the file or component you want to debug.

  2. If the debugger is not started, press F5.

  3. Select the code segment you want to capture a dump file for.

  4. To capture a dump file while debugging, your program must be in a break state. To place the debugger in a break state, choose Break from the Debug menu.

    -or-

    Set a breakpoint at the code location you want to examine, and then from the Debug menu, choose Go. For more information about breakpoints, see Handling Breakpoint Behavior.

  5. From the Debug menu, choose Capture Dump File.

  6. On the Capture Dump File dialog box, select the capture mode you prefer.

    The following table shows the types of capture available.

    Capture method Contents captured Best used for

    Context dump

    4KB - 64KB

    Context record

    Module and Thread list

    Callstack of current thread

    Memory adjacent to current thread

    Best for a sequential, deterministic application

    • Bugs related to simple, shallow, non-synchronization processes
    • Bugs based on current process, current context, and local data

    System dump

    64 KB to several MB

    All processes and threads executing at the time of capture

    Callstacks and context records for all threads

    2048 bytes of memory above and below instruction pointer of current thread

    Global variables for current process

    Best for multithreaded applications, device drivers, and kernel processes.

    • Bugs related to shallow, even, synchronization-related processes
    • Bugs that rely on data in other threads, heap, or mapped files

    Complete dump

    All physical memory

    • Bugs involving deep, synchronization-related processes
    • Bugs with no trace of root cause remaining in memory
  7. Choose Capture to initiate the dump file capture.

    The Error Reporting subsystem captures the requested information, and displays a progress indicator as the capture proceeds. When the capture it complete, the dump file is copied it to MyDumpFile.kdmp.

  8. Save the captured dump file in the directory you prefer.

See Also

Reference

Types of Crash Dump Files

Other Resources

Post-Mortem Debugging