1. CLR Process
- Source code -> Compiler -> .NET Assembly -> CLR JIT
- Application domains (System, Shared, Default)
- Assemblies (Private, Shared) (logical constructs)
- Modules (physical constructs)
- Types (Fundamental unit of programmability) (Value types, Reference types)
- Method Tables (Also known as a type handle, Contains information that describes the type)
- Method Descriptors
- Additional information that completes the descriptive nature of types
- Type handle contains basic information about method on the type
- Method descriptor augments that information (JIT status, Address of JIT’ed code)
Ref : http://msdn.microsoft.com/en-us/magazine/cc163791.aspx
2. Debugger Extensions
- SOS (Son of Strike)
- SOSEX (3rd party extension, http://www.stevestechspot.com/)
- PSSCOR2/PSSCOR4
3. Debugger Command Categories
- Object inspection
- !DumpObject : Dumps a single reference object
- !DumpArray: Dumps an array object
- !GCRoot: Dumps the reference chain of an object
- !mdv : Displays local variables
- !strings: Dump out all the strings
- !threads: shows the last exception thrown on any given thread
- !PrintException : shows the exception information of the specified exception
- Code and Threads
- !U : Disassembles the code at the specific address
- !IP2MD: Returns the method descriptor for the given code address
- !threads : Displays all managed threads in the process
- !ClrStack : Displays the managed call stack of the current thread
- ~*e!ClrStack: Displays all managed threads and their callstack
- Diagnostics
- !VerifyHeap : Validates managed heap integrity
- !GCHandles : Shows all handles in the process
- !GCHandleLeaks: Attempts to find leaked handles
- !VMStat: Virtual memory statistics
- CLR data structures
- !DumpDomain: Dumps out the application domains
- !ThreadPool : Dumps out information on the CLR thread pool
- !DumpIL : Dumps the IL for the specified address
4. Managed Debug Assistants
- Similar to Application Verifier
- Enabled via the registry and config files (HKLM\Software\Microsoft\.NETFramework\MDA=“1”, <appname>.exe.dma.config)
SOS Cheat Sheet: http://blogs.msdn.com/b/alejacma/archive/2009/06/30/sos-cheat-sheet-net-2-0-3-0-3-5.aspx
posted @
2013-01-30 16:13
asiasea
阅读(
306)
评论()
编辑
收藏
举报
点击右上角即可分享
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库