Debugging Tools for Windows

Preparing to Use UMDH

You must complete the configuration tasks described in this section before using UMDH to capture the heap allocations for a process. If the computer is not configured correctly, UMDH will not generate any results or the results will be incomplete or incorrect.

Create the user-mode stack trace database

Before using UMDH to capture the heap allocations for a process, you must configure Windows to capture stack traces.

To enable stack trace capturing for a process, use GFlags to set the Create user mode stack trace database flag for the process.

Use the following Gflags command:

gflags /i ImageName +ust

where ImageName is the name of the executable image file, such as Notepad.exe.

This setting affects all new instances of the program. It does not affect currently running instances of the program.

Install Symbol Files

Before using UMDH, you need to install the PDB symbol files for the program that you are debugging and the PDB symbol files for the operating system to a single directory on the local computer. For instructions, see Installing Windows Symbol Files.

Set Environment Variable

UMDH looks for PDB symbol files in the path specified by the _NT_SYMBOL_PATH environment variable.

To set this environment variable, at the command line, type:

set _NT_SYMBOL_PATH=Path

For example,

set _NT_SYMBOL_PATH=C:\Windows\Symbols

Find the Process ID

UMDH identifies the process by its process identifier (PID). You can find the PID of any running process by using Task Manager, Tasklist (Windows XP and later operating systems), or TList.

Build machine: CAPEBUILD