Silverlight SOS Commands
Today I became rather curious of what commands Silverlight's version of SOS provided (see my Learning WinDBG/SOS and Advanced Debugging post for more information on SOS). I didn't really have any guess to whether there would be more, less, or the same. So I ran Silverlight's SOS.dll through .NET's dumpbin.exe application with the /exports switch to get a list of what you can do with it. In this case, the lower case DLL exports are the actual SOS commands you can use. I did dumpbin.exe on the .NET 2.0 version and did a diff between them. The results? The Silverlight version of SOS actually has more commands than the .NET version.
Here is a list of SOS commands that aren't in the .NET version:
analyzeoom | histobj | vh |
ao | histobjfind | vo |
dumpsigelem | histroot | |
findroots | histstats | |
fq | hof | |
gcheapstat | listnearobj | |
gcwhere | lno | |
heapstat | t | |
histclear | tp | |
histinit | verifyobj |
You can type these into your debugger to see the specific syntax for each of these. For detailed information on most of these, you'll have to wait until something gets posted on MSDN or one of the SOS developers post something. For a few, however, Sasha Goldshtein has provided some information and examples. Here are some posts from this person's web site where you can find information no some of these new commands:
- New Silverlight SOS.DLL Command: !AnalyzeOOM
- New Silverlight SOS.DLL Commands: !HeapStat and !GCWhere
- New Silverlight SOS.DLL Commands: !FindRoots and !ListNearObj
In case you're wondering, the .NET version has a few commands that the Silverlight version didn't have too. This isn't a big deal as the commands that are missing don't really have much meaning for Silverlight (or have an alternative). Here's a list of these:
comstate |
dumpmethodsig |
rcwcleanuplist |
tst |
Also, for the sake of completeness, below is the completely list of all Silverlight commands. Just type then into WinDBG with the ! prefix to play with each of them. For many of them you can type "!sos.help COMMANDNAME" to get help for a specific COMMANDNAME.
analyzeoom | dumpsigelem | histclear | syncblk |
ao | dumpstack | histinit | t |
bpmd | dumpstackobjects | histobj | threadpool |
clrstack | dumpvc | histobjfind | threads |
da | eeheap | histroot | token2ee |
do | eestack | histstats | tp |
dso | eeversion | hof | traverseheap |
dumparray | ehinfo | ip2md | u |
dumpassembly | finalizequeue | listnearobj | verifyheap |
dumpclass | findappdomain | lno | verifyobj |
dumpdomain | findroots | minidumpmode | vh |
dumpheap | fq | name2ee | vmmap |
dumpil | gchandleleaks | objsize | vmstat |
dumplog | gchandles | pe | vo |
dumpmd | gcheapstat | printexception | |
dumpmodule | gcinfo | procinfo | |
dumpmt | gcroot | savemodule | |
dumpobj | gcwhere | soe | |
dumpruntimetypes | heapstat | sosflush | |
dumpsig | help | stoponexception |
Then there's the complete list of .NET SOS commands:
bpmd | dumpstack | procinfo |
clrstack | dumpstackobjects | rcwcleanuplist |
comstate | dumpvc | savemodule |
da | eeheap | soe |
do | eestack | sosflush |
dso | eeversion | stoponexception |
dumparray | ehinfo | syncblk |
dumpassembly | finalizequeue | threadpool |
dumpclass | findappdomain | threads |
dumpdomain | gchandleleaks | token2ee |
dumpheap | gchandles | traverseheap |
dumpil | gcinfo | tst |
dumplog | gcroot | u |
dumpmd | help | verifyheap |
dumpmethodsig | ip2md | vmmap |
dumpmodule | minidumpmode | vmstat |
dumpmt | name2ee | |
dumpobj | objsize | |
dumpruntimetypes | pe | |
dumpsig | printexception |
If you haven't noticed yet, most of these aren't even documented commands. However, if you type them into SOS, you will not only see that they exist, you will be given the syntax for how to use them (and, then, there's !sos.help).