Tuesday, March 30, 2010

PSSCOR2 .NET Debugger Extension

PSSCOR2 which is a .NET extension for WinDbg has been released, and can be download here. Currently the download is a 64-bit executable, which means you cannot run it on a 32-bit, but you can extract it using you favorite ZIP program. The ZIP file includes both 32-bit and 64-bit versions.

PSSCOR2 it SOS and more, it contains all the commands SOS does, and a lot more. It is especially useful when debugging ASP.NET.

Here is a short list and description of the command available in PSSCOR2:

Object inspection

DumbObj
Dumps the fields and other important object information like EEClass, the MethodTable and the size.

DumpArray
Allows you to examine elements of an array object.

DumpStackObjects
Displays any managed objects within the bounds of the current stack.

DumpAllExceptions
Displays any objects derived from System.Exception located on the managed heap.

DumpHeap
Traverses the garbage collected heap, and collect statistics about objects. It has a lot of various options, useful for restricting the output.

DumpVC
Allows you to examine fields of a value class.

GCRoot
Displays references to an object.

ObjSize
Displays the total size of an object.

FinalizeQueue
Lists all objects registered for finalization.

PrintException
Provides a nice output for Exception objects.

TraverseHeap
Creates a file in a format understood by the CLR profiler, which then can be used to create a graphical display of the GC heap.

DumpField
Dumps the object that is in a given field of an object. Allows you to avoid a !DumpObj on the parent object first.

DumpDynamicAssemblies
Provides you with a list of all dynamically created assemblies and their size.

GCRef
Prints a list of the parents and children of a given object. This allows you to see who holds a reference to an object, even if the object aren't rooted to a thread or handle table anymore.

DumpColumnNames
Dumps the column names of a given DataTable.

DumpRequestQueue
Dumps the queues for ASP.NET, threadpool and RequestQueue objects.

DumpUMService
Displays m_sipStackConnection objects for a UMService (Exchange).

Examininig CLR data structures

DumpDomain
List AppDomains a related information, such as assemblies loaded in the AppDomain.

EEHeap
Enumerates process memory consumed by internal CLR data structures. This can fx. be used to see if it is managed or unmanaged objects which are leaking memory.

Name2EE
Turns a class name into a MethodTable and EEClass.

SyncBlk
Helps you to detect managed deadlocks.

DumpThreadConfig
Dumps some thread values from config files, the values dumped are maxWorkerThreads, maxIoThreads, minFreeThreads, minLocalRequestFreeThreads, maxConnection and autoConfig.

DumpMT
Examines a MethodTable.

DumpClass
Allows you to see attributes and a list of static fields of a type.

DumpMD
Lists information about a MethodDesc.

Token2EE
Turns a metadata token into a MethodTable or MethodDesc.

EEVersion
Prints the CLR version and if the code is running in Workstation on Server mode.

DumpModule
Dumps module information, especially metadata tokens to CLR data structures.

ThreadPool
Lists basic information about the ThreadPool.

DumpHttpRuntime
Displays the HttpRuntime objects and prints some common properties for them.

DumpIL
Prints the IL code associated with a managed method.

PrintDateTime
Prints the time of the DateTime object passed to it.

DumpDataTables
Dumps the DataTables in the heap and shows how many rows and columns each table has.

DumpAssembly
Lists all modules associated with an assembly.

RCWCleanupList
Displays a list of runtime callable wrappers awaiting cleanup.

PrintIPAddress
Prints IP the address of a IPAddress object.

DumpHttpContext
Dumps the HttpContext in the heap.

ASPXPages
Prints information on ASPX pages running on threads.

DumpASPNETCache
Shows objects in the ASP.NET cache.

DumpSig
Displays information about a Sig structure.


DumpMethodSig
Displays information about a MethodSig structure.

DumpRuntimeTypes
Finds all System.RuntimeType objects in the GC heap.

ConvertVTDateToDate
Converts a VALUETYPE DateTime to a date.

ConvertTicksToDate
Converts a DateTime.Ticks or FILETIME to a date.

DumpRequestTable
Lists all request in the ISS ASP.NET request table.

DumpHistoryTable
Dumps the aspnet_wp history table.

DumpBuckets
Dumps entire request table buckets.

GetWorkItems
Displays request and work items associated with a CLinkListNode.

DumpXmlDocument
Prints out a System.Xml.XmlDocument.

DumpCollection
Dumps the contents of a collection.

Examining the GC history

HistInit
Initializes the PSSCOR structures from the stress log save in the debuggee.

HistStats
Provides a number of GC statistics obtained from the stress log.

HistRoot
Provides information related to promotions and relocations of the specified root.

HistObj
Displays the chain of GC relocations that may have led to the address specified.

HistObjFind
Displays all entries that reference the specified object.

HistClear
Releases any resources used by the Hist commands.

Examining code and stacks

Threads
Lists all managed threads in the process.

CLRStack
Displays the stack of the current thread.

IP2MD
Displays the MethodDesc from a code address.

BPMD
Provides managed breakpoint support.

U
Provides an annotated disassembly of a managed method.

EEStack
Displays the stack of all threads in the running process.

GCInfo
Displays internal information about the GC.

EHInfo
Displays exception handling blocks in a jitted method.

ComState
Lists the COM apartment model for each thread.

Diagnostics Utilities

VerifyHeap
Checks the heap for signs of corruption.

DumpLog
Dumps the stress log to a file.

FindAppDomain
Print the AppDomain of a given object.

SaveModule
Saves a in-memory module to disk.

SaveAllModuels
Save all in-memory modules to disk.

GCHandles
Provide statistics about the GC handles in the process.

GCHandleLeaks
Tracks down GC handle leaks.

VMMap
List the virtual address space and the type of protection applied.

VMStat
Shows a sumamry view of the virtual address space.

ProcInfo
Lists process information.

StopOnException
Allows you to defined exceptions where the debugger should stop the process.

MinidumpMode
Not all PSSCOR commands can be used on minidumps, this command allows you to restrict commands that don't work on minidumps.

FindDebugTrue
Find AppDomains which have debug=true in their web.config files.

FindDebugModules
Prints out all modules that are Debug builds.

Analysis
Runs common analysis commands and save the output to a file.

CLRUsage
Prints the memory that .NET is using.

CheckCurrentException
Check if the current exception are the one specified, and saves the result in the pseudo register defined.

CurrentExceptionName
Print the name of the managed exception on the current stack.

VerifyObj
Checks a object for signs of corruption.

HeapStat
Prints heap statistics.

GCWhere
Displays the location in the GC heap of the specified argument.

ListNearObj
Displays objects preceding and succeeding the address specified.

No comments:

Post a Comment