WinDBG common command table

Source: Internet
Author: User

Start, attach process, execute and exit (Starting, Attaching, Executing and Exiting)

======================================

 

Start-> All Programs-> Debugging Tools for Windows-> WinDBG

Start

F6

Attach to process

Attach to process

Ctrl-Break

Interrupt debugee

Interrupt the program being debugged

. Detach

Detach from a process

Detach Process

G

Continue debugee execution

Continue to execute the program being debugged

Q

Exit WinDBG

Exit WinDBG

 

For help (Getting Help)

======================================

?

Help on commands that affect the debugee

List all built-in commands and operators

. Help

Help on commands that affect the debugger

List all meta commands

. HhCommand

View the on line help file

Open the WinDBG Help File

! Help

Help on the extension dll at the top of the chain (e. g., SOS)

List extension Command help in extension DLL

 

Manipulation command (Issuing Commands)

======================================

Up arrow, down arrow, enter

Scroll through command history

View command history

Right mouse button

Paste into command window

Paste in the Command window

 

Check the Unmanaged Environment)

======================================

Lmf

List loaded modules with full path

List loaded modules and their complete paths

Lmt

List loaded modules with last modified timestamp

Lists the loaded modules and the last modified timestamp.

~

List unmanaged threads

List all unmanaged threads

~ThreadS

Select a thread for thread specific commands

 

! Token-n

View thread permissions

 

K

View the unmanaged call stack

View unmanaged call stacks

! Runaway

View thread CPU consumption

Display the time occupied by each thread

Bp

Set a breakpoint

Set a breakpoint

. DumpPath

Dump small memory image

Create a small dump memory image

. Dump/maPath

Dump complete memory image

Create a complete dump file

 

Use Debuger DLL Extension (Working with Extension DLLs (e. g., SOS ))

======================================

. Chain

List extensions dlls

List all loaded debugger extension

. Load clr10 \ sos

Load SOS for debugging framework 1.0/1.1

Load debug extension of. net 1.1 hosting program

. Unload clr10 \ sos

Unload SOS

Uninstall SOS

. Loadby sos mscorwks

Load SOS for debugging framework 2.0

Load debug extension of. net 2.0

 

SOS command (SOS Commands)

======================================

! Threads

View managed threads

View All managed threads

! Clrstack

View the managed call stack

View managed call stacks

! Dumpstack

View combined unmanaged & managed call stack

View the call stack of an unmanaged and managed call stack

! Clrstack-p

View function call arguments

View managed function call Parameters

! Clrstack-l

View stack (local) variables

View local variables of the managed Stack

! Name2eeModule class

View addresses associated with a class or method

View the memory address of a class or Method

! Dumpmt-mdAddress

View the method table & methods for a class

View the method table of the specified address and the method set of a class

! DumpmdAddress

View detailed information about a method

Displays the MethodDesc structure of the specified address.

! DoAddress

View information about an object

Displays information about an object of an address, including fields, EEClass, Method Table, and object size.

! Dumpheap-stat

View memory consumption by type

Display heap memory usage

! Dumpheap-minSize

View memory consumption by object when at leastSize

View heap memory usage and ignore objects smaller than size bytes

! Dumpheap-typeType

View memory consumption for all objects of typeType

View memory usage of all type objects

! GcrootAddress

View which object are holding a referenceAddress

View All references to objects with specified addresses

! Syncblk

View information about managed locks

View managed locks (SyncBlock structure)

 

SOS 2.0 command (SOS 2.0 Commands)

======================================

! BpmdModule method

Set breakpoint

Set a breakpoint on a specified method of the specified Module

! DumpArrayAddress

View contents of an array

View elements in the array

! PrintException

View information about most recent exception

Display the latest exception information in a formatted manner

 

Source:

WinDbg/SOS Cheat Sheet

Http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx

SOS. dll (SOS Debugging Extension)

Http://msdn.microsoft.com/en-us/library/bb190764.aspx

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.