SOSEX是另一个调试器扩展,可用于非托管代码和托管代码的调试。
SOSEX的安装包是一个ZIP文件,只需把ZIP文件中压缩的文件释放到指定的位置即可完成安装。如果将这些文件放到调试器的安装目录下,可以避免在加载SOSEX时指定完整路径。如下:
0:000> .load sosex.dll
0:000> !sosex.help
SOSEX - Copyright 2007-2012 by Steve Johnson - http://www.stevestechspot.com/
To report bugs or offer feedback about SOSEX, please email sjjohnson@pobox.com
Quick Ref:
--------------------------------------------------
bhi [filename] BuildHeapIndex - Builds
an index file for heap objects.
bpsc (Deprecated. Use !mbp instead)
chi ClearHeapIndex - Frees
all resources used by the heap index and removes it from memory.
dlk [-d] Displays deadlocks betw
een SyncBlocks and/or ReaderWriterLocks
dumpgen [-free] [-stat] [-type ] Dumps the contents of t
he specified generation
[-nostrings]
finq [GenNum] [-stat] Displays objects in the
finalization queue
frq [-stat] Displays objects in the
Freachable queue
gcgen Displays the GC generat
ion of the specified object
gch [HandleType]... Lists all GCHandles, op
tionally filtered by specified handle types
help [CommandName] Display this screen or
details about the specified command
lhi [filename] LoadHeapIndex - load th
e heap index into memory.
mbc Clears the specified or
all managed breakpoints
mbd Disables the specified
or all managed breakpoints
mbe Enables the specified o
r all managed breakpoints
mbl [SOSEX breakpoint ID] Prints the specified or
all managed breakpoints
mbm [ILOffset] [Options] Sets a managed breakpoi
nt on methods matching the specified filter
mbp [ColNum] [Options] Sets a managed breakpoi
nt at the specified source code location
mdso [Options] Dumps object references
on the stack and in CPU registers in the current context
mdt [TypeName | VarName | MT] [ADDR] [Options] Displays the fields of
an object or type, optionally recursively
mdv [nFrameNum] Displays arguments and
locals for a managed frame
mfrag [-stat] [-mt:] Reports free blocks, th
e type of object following the free block, and fragmentation statistics
mframe [nFrameNum] Displays or sets the cu
rrent managed frame for the !mdt and !mdv commands
mgu // TODO: Document
mk [FrameCount] [-l] [-p] [-a] Prints a stack trace of
managed and unmanaged frames
mln [expression] Displays the type of ma
naged data located at the specified address or the current instruction pointer
mlocks [-d] Lists all managed lock
objects and CriticalSections and their owning threads
mroot [-all] Displays GC roots for t
he specified object
mt (no parameters) Steps into the managed
method at the current position
mu [address] [-s] [-il] [-n] Displays a disassembly
around the current instruction with interleaved source, IL and asm code
muf [MD Address | Code Address] [-s] [-il] [-n] Displays a disassembly
with interleaved source, IL and asm code
mwaits [-d] Lists all waiting threa
ds and, if known, the locks they are waiting on
mx Displays managed type/f
ield/method names matching the specified filter string
refs [-target|-source] Displays all references
from and to the specified object
rwlock [ObjectAddr | -d] Displays all RWLocks or
, if provided a RWLock address, details of the specified lock
sosexhelp [CommandName] Display this screen or
details about the specified command
strings [ModuleAddress] [Options] Search the managed heap
or a module for strings matching the specified criteria
ListGcHandles - See gch
Use !help or !sosexhelp for more details about each command.
0:000>