Memory leakage debugging with umdh.

p      The user-mode dump heap (UMDH) utility works with the operating system to analyze Windows heap allocations for a specific process

p      UMDH is released with NPMS

p      Using UMDH to Find a User-Mode Memory Leak

1.       Preparing to Use UMDH

1.       gflags /i ImageName +ust

2.       Detecting Increases in Heap Allocations with UMDH

1.       Take several snapshots of heap memory

1.       umdh –p:124  –f:log1.txt 

2.       umdh –p:124  –f:log2.txt 

3.       umdh –p:124  –f:log3.txt 

2.       Compare log files recorded at different times to determine which allocations are growing

1.       umdh  -v   log1.txt  log2.txt > logcompare1.txt 

2.       umdh  -v   log1.txt  log3.txt > logcompare2.txt

3.       Restore default setting

1.       gflags /i ImageName -ust

List of Tools and Documentation

Microsoft Debugging Tools for Windows includes a number of debuggers and other tools. Some of them are described in this documentation, and others are described elsewhere. The following list briefly describes each tool and where its documentation can be found.

Debuggers

Debugging Tools for Windows includes the following debuggers. These are described throughout this documentation, and are referred to by their individual names or collectively as "the debugger":

WinDbg (Windbg.exe)

A user-mode and kernel-mode debugger with a graphical interface.

KD (Kd.exe)

A kernel-mode debugger with a console interface.

CDB (Cdb.exe)

A user-mode debugger with a console interface.

NTSD (Ntsd.exe)

A user-mode debugger with a console interface. CDB and NTSD are virtually identical. In this documentation, whenever a reference is made to "CDB", it applies to both CDB and NTSD. When these two debuggers differ, it is noted. (See CDB and NTSD for details.)

Additional Tools and Utilities

Debugging Tools for Windows also includes the following tools and utilities:

Logger (Logger.exe and Logexts.dll)

A tool and an extension DLL that record the function calls and other actions of a program. Logger is described in this documentation; see Logger and LogViewer.

LogViewer (Logviewer.exe)

A tool that displays the logs created by Logger. LogViewer is described in this documentation; see Logger and LogViewer.

ADPlus (Autodump+, Adplus.vbs)

A console-based Microsoft Visual Basic script that can automatically create memory dump files and log files with debug output from one or more processes. ADPlus is described in this documentation; see ADPlus.

DbgRpc (Dbgrpc.exe)

A tool used to display Microsoft Remote Procedure Call (RPC) state information. DbgRpc is described in this documentation; see RPC Debugging and Using the DbgRpc Tool.

KDbgCtrl (Kernel Debugging Control, Kdbgctrl.exe)

A tool that controls and configures the kernel debugging connection. KDbgCtrl is described in this documentation; see Using KDbgCtrl.

SrcSrv (Srcsrv.dll)

A source server that can be used to deliver source files while debugging. SrcSrv is described in this documentation; see SrcSrv.

SymSrv (Symsrv.dll)

A symbol server that the debugger can use to connect to a symbol store. SymSrv is described in this documentation; see SymSrv.

SymStore (Symstore.exe)

A tool used to create a symbol store. SymSrv is described in this documentation; see Using SymStore.

SymProxy

A tool used to create a single HTTP symbol server on your network that all your debuggers can point to. This has the benefit of pointing to multiple symbol servers (both internal and external) with a single symbol path, handling all authentication, and increasing performance via symbol caching. SymProxy is described in this documentation; see SymProxy.

AgeStore (Agestore.exe)

A tool that removes old entries in the downstream store of a symbol server or a source server. AgeStore is described in this documentation; see AgeStore.

DBH (Dbh.exe)

A tool that displays information about the contents of a symbol file. DBH is described in this documentation; see DBH.

PDBCopy (Pdbcopy.exe)

A tool that removes private symbol information from a symbol file, and controls which public symbols are included in the file. PDBCopy is described in this documentation; see PDBCopy.

DumpChk (Dump File Checking Utility, Dumpchk.exe)

A tool used to validate a memory dump file. DumpChk is described in this documentation; see DumpChk.

DbgSrv (Dbgsrv.exe)

A process server used for remote debugging. DbgSrv is described in this documentation; see Process Servers (User Mode).

KdSrv (Kdsrv.exe)

A KD connection server used for remote debugging. KDSrv is described in this documentation; see KD Connection Servers (Kernel Mode).

DbEngPrx (Dbengprx.exe)

A repeater (small proxy server) used for remote debugging. DbgSrv is described in this documentation; see Repeaters.

The Remote tool (Remote.exe)

A remoting tool that can be used to remotely control any console program, including KD, CDB, and NTSD. The Remote tool is described in this documentation; see Remote Tool and Remote Debugging Through Remote.exe.

GFlags (Global Flags Editor, Gflags.exe)

A tool used to control registry keys and other settings. GFlags is described in this documentation; see GFlags.

The Kill tool (Kill.exe)

A tool used to terminate a process. The Kill tool is described in this documentation; see Kill Tool.

The Breakin tool (Breakin.exe)

A tool used to cause a user-mode break to occur in a process. Breakin.exe is not described in this documentation. Use the breakin /? command for help with this tool.

The List tool (File List Utility, List.exe)

List.exe is not described in this documentation. Use the list /? command for help with this tool.

TList (Task List Viewer, Tlist.exe)

A tool used to list all running processes. TList is described in this documentation; see TList.

RTList (Remote Task List Viewer, Rtlist.exe)

A tool used to list running processes via a DbgSrv process server. RTList is not described in this documentation. Use the rtlist /? command for help with this tool.

UMDH (User-Mode Dump Heap utility, Umdh.exe)

A tool used to analyze heap allocations. UMDH is described in this documentation; see UMDH.

USBView (Universal Serial Bus Viewer, Usbview.exe)

A tool used to display the USB devices connected to a computer. USBView is described in this documentation; see USBView.

If you perform a custom install of Debugging Tools for Windows and select the SDK feature and all of its subfeatures, the libraries, headers, and samples used to build debugger extensions will be installed.

Documentation

"Debugging Tools for Windows" (Debugger.chm)

This is the documentation you are currently reading. It is the central documentation for Debugging Tools for Windows.

"Debug Help Library" (Dbghelp.chm)

This documentation describes the DbgHelp API and the ImageHlp API, and also explains how to create your own symbol server. This is installed when you peform a custom install of Debugging Tools for Windows and select the SDK feature and its subfeatures.

Tools Outside the Debugging Tools for Windows Package

The following related tools are not part of the Debugging Tools for Windows package:

Dr. Watson (Drwtsn32.exe)

A tool used for automatically creating dump files and sending error reports to Microsoft Online Crash Analysis (OCA). Dr. Watson is partially described in this documentation; see Dr. Watson. The other features of Dr. Watson are described in the help file associated with Drwtsn32.exe.

Build utility (Build.exe)

A compiler and linker used to build debugger extensions and other programs. The Build utility and its documentation can be found in the Windows Driver Kit, and in earlier versions of the Windows DDK.

BinPlace (Binplace.exe)

A tool used to control symbol files for build products. BinPlace and its documentation can be found in the Windows Driver Kit, and in earlier versions of the Windows DDK.

Application Verifier (AppVerif.exe and !avrf)

A tool used to test user-mode applications. This tool consists of two components: the AppVerif.exe utility and the !avrf extension command. All the features of Application Verifier that are debugger-related are described in Application Verifier. The other features of Application Verifier are described in the help file associated with AppVerif.exe.

 

 

Powered by Jekyll and Theme by solid

本站总访问量