Code Rewind
When its time to find, Hit Rewind
                 
 
 
Remember Me  
Recover Password
 
 Advanced Search
 
 Add to IE Search 
 
 
> Development => Debugging .NET Application: Using Son of Strike(SOS) Debugging Extension
 

Available Files:
You must be signed in to download files.
You can Sign Up here if you are not a member.
Author: Adam Joseph
Level: 3
Date Posted: 13-Aug-2009 (11:33)
Last Updated: 13-Aug-2009 (11:36)
Views: 747
Favorited: 0
Votes:
  -  1 votes
Your vote:
Click to rate Click to rate Click to rate Click to rate Click to rate
(5 Stars)
Rating: 5.00 out of 5


Summary: This article will talk about how you can leverage SOS, a .NET debugging extention shipped with .NET Framework(v1.1 onwards)

Introduction:
Son of Strike (SoS) is a debugging extension shipped with .NET Framework(v1.1 onwards) which can be used for advanced debugging and meory profiling. SoS can be loaded into Visual Studio 2005 or to a debugging tools like WinDbg to analyze memory structures and hang/crash details. It gives you an in-depth understanding of .NET memory allocations and CLR data structures.

Elaboration:
SoS can be loaded in 2 ways:

  1. By using absolute path of .NET Framework directory
    .load C:WINNTMicrosoft.NETFrameworkv2.0.50727sos.dll
  2. By using relative path of .NET Framework directory
    .loadby sos mscorwks
SoS can be used in 2 ways:
  1. On a running application in the immediate window of Visual Studio 2005.
  2. On crash/hang dumps loaded in a debugging tool such as WinDbg.

SoS has a number of useful commands to analyze memory. Once SoS is loaded, these commands can be run passing suitable parameters.

Useful SoS Commands
  • All the SoS commands start with an exclamation mark [“!”].
  • !Help can be used to get a full list of available SoS commands
  • !Help [Command Name] can be used to get specific details about a single command
  • !Help FAQ gives you the FAQ’s and answers on SoS. 
Here is the full list of SoS commands categorized based on functionality:
 
Command Help
·         Help
·         !Help FAQ

Object Inspection
·         DumpObj (do)
·         DumpArray (da)
·         DumpStackObjects (dso)
·         DumpHeap
·         DumpVC
·         GCRoot
·         ObjSize
·         FinalizeQueue
·         PrintException (pe)
·         TraverseHeap

Examining CLR data structures
·         DumpDomain
·         EEHeap
·         Name2EE
·         SyncBlk
·         DumpMT
·         DumpClass
·         DumpMD
·         Token2EE
·         EEVersion
·         DumpModule
·         ThreadPool
·         DumpAssembly
·         DumpMethodSig
·         DumpRuntimeTypes
·         DumpSig
·         RCWCleanupList
·         DumpIL
 
Examining code and stacks
·         Threads
·         CLRStack
·         IP2MD
·         U
·         DumpStack
·         EEStack
·         GCInfo
·         EHInfo
·         COMState
·         BPMD
 
Diagnostic Utilities
·         VerifyHeap
·         DumpLog
·         FindAppDomain
·         SaveModule
·         GCHandles
·         GCHandleLeaks
·         VMMap
·         VMStat
·         ProcInfo
·         StopOnException (soe)
·         MinidumpMode
 
This link provides detailed description of each of these commands and a couple of examples of how to use them: http://msdn.microsoft.com/en-us/library/bb190764.aspx 
 
To debug an application in production, take the “hang dump” or “crash dump” of the process using ADPlus (ADPlus.vbs) or User Mode Process Dump tool. After that, the dump can be analyzed with a tool like WinDbg. Creating the dump file using ADPlus and analyzing it using WinDbg and SoS will be covered in a separate section.

Version Tracking:

Version 1.0
 
KeyWords: Generic / None (Generic / None);Generic / None (Generic / None);Generic / None (Generic / None);
CR Suggested Development Articles
 
 
Most Recent Views
 
How to Access ADO Recordset from ADO.NET by Guest (09-Sep-2010 08:12)
Dispose Objects: IDisposable or GC or Connection Pool Manager by Guest (09-Sep-2010 08:08)
How to send emails using HTML Templates in ASP.NET by Guest (09-Sep-2010 08:07)
Web Session Management by Guest (09-Sep-2010 08:07)
Multi-Threading in .NET by Guest (09-Sep-2010 07:58)
 
 Messages: 0, Topics: 0. Post New Message Please login to post a message...
  View
Items per page
Message since
  TOPIC
AUTHOR
VIEWS
REPLIES
LAST POST
No messages boards...

Post New Message      
General Comment News / Info Question Answer Joke / Game Admin Answer
SEARCH ON FORUM
 
 
   
 
 
TOP USERS
 
No top users
 
 
TOP DISCUSSIONS
 
No popular discussions
 
 
SPONSORED ADS
 
 
 
 



 
Registered Members: 1622
Now Browsing: 6
 
Subscribe to newsletter
 
 

 
AtHomeTution
IT2Max
TheBusinessXP
RapidConvert
 








 
About Us  |  Contact Us   |  Privacy Policy  |  Legal Notice  |  Terms and Conditions  |  Help   |  Browse CR   |  Articles  |  Webcasts  |  Ask an Expert   |  Message Boards   |  Downloads  |  Open Arena   |  FAQ | DaniWeb | GetAHelpdesk | ProgTalk
Copyright © 2007 CodeRewind.com. All rights reserved
designed by IT2Max, INC.
 
Execution Time: 4.04 sec