SOS.dll (SOS Debugging Extension)
SOS.dll (SOS Debugging Extension)
|
|
|
ThreadState <State value field> |
Displays the state of the thread. The value parameter is the value of the State field in the Threads report output. Example: 0:003> !Threads |
|
TraverseHeap [-xml] <filename> |
Writes heap information to the specified file in a format understood by the CLR profiler. The -xml option causes the TraverseHeap command to format the file as XML. You can download the CLR Profiler from the Microsoft Download Center. |
|
U [-gcinfo] [-ehinfo] [-n] <MethodDesc address> | <Code address> |
Displays an annotated disassembly of a managed method specified either by a MethodDesc structure pointer for the method or by a code address within the method body. The U command displays the entire method from start to finish, with annotations that convert metadata tokens to names.
|
|
VerifyHeap |
Checks the garbage collector heap for signs of corruption and displays any errors found. Heap corruptions can be caused by platform invoke calls that are constructed incorrectly. |
|
VerifyObj <object address> |
Checks the object that is passed as an argument for signs of corruption. |
|
VMMap |
Traverses the virtual address space and displays the type of protection applied to each region. |
|
VMStat |
Provides a summary view of the virtual address space, ordered by each type of protection applied to that memory (free, reserved, committed, private, mapped, image). The TOTAL column displays the result of the AVERAGE column multiplied by the BLK COUNT column. |
Remarks
The SOS Debugging Extension lets you view information about code that is running inside the common language runtime. For example, you can use the SOS Debugging Extension to display information about the managed heap, look for heap corruptions, display internal data types used by the runtime, and view information about all managed code running inside the runtime.
To use the SOS Debugging Extension in Visual Studio, install the Windows Driver Kit (WDK). For information about the integrated debugging environment in Visual Studio, see Debugging Environments in the Windows Dev Center.
You can also use the SOS Debugging Extension by loading it into the WinDbg.exe debugger, which is available from the WDK and Developer Tools Web site, and executing commands within WinDbg.exe.
To load the SOS Debugging Extension into the WinDbg.exe debugger, run the following command in the tool:
.loadby sos clr
WinDbg.exe and Visual Studio use a version of SOS.dll that corresponds to the version of Mscorwks.dll currently in use. In versions 1.1 and 2.0 of the .NET Framework, SOS.dll is installed in the same directory as Mscorwks.dll. By default, you should use the version of SOS.dll that matches the current version of Mscorwks.dll.
To use a dump file created on another computer, make sure that the Mscorwks.dll file that came with that installation is in your symbol path, and load the corresponding version of SOS.dll.
To load a specific version of SOS.dll, type the following command into the Windows Debugger:
.load <full path to sos.dll>
Examples
The following command displays the contents of an array at the address 00ad28d0. The display starts from the second element and continues for five elements.
!dumparray -start 2 -length 5 -detail 00ad28d0
The following command displays the contents of an assembly at the address 1ca248.
!dumpassembly 1ca248
The following command displays information about the garbage collector heap.
!dumpheap
The following command writes the contents of the in-memory stress log to a (default) file called StressLog.txt in the current directory.
!DumpLog
The following command displays the MethodDesc structure at the address 902f40.
!dumpmd 902f40
The following command displays information about a module at the address 1caa50.
!dumpmodule 1caa50
The following command displays information about an object at the address a79d40.
!DumpObj a79d40
The following command displays the fields of a value class at the address 00a79d9c using the method table at the address 0090320c.
!DumpVC 0090320c 00a79d9c
The following command displays the process memory used by the garbage collector.
!eeheap -gc
The following command displays all objects scheduled for finalization.
!finalizequeue
The following command determines the application domain of an object at the address 00a79d98.
!findappdomain 00a79d98
The following command displays all garbage collector handles in the current process.
!gcinfo 5b68dbb8
The following command displays the MethodTable and EEClass structures for the Main method in the class MainClass in the module unittest.exe.
!name2ee unittest.exe MainClass.Main
The following command displays information about the metadata token at the address 02000003 in the module unittest.exe.
!token2ee unittest.exe 02000003
SOS.dll (SOS Debugging Extension)的更多相关文章
- CLR调试时的sos.dll/clr.dll/mscorwks.dll/mscordacwks.dll等动态库的版本对应
大家都知道,在调试托管代码时,一定会加载到sos/clr/mscorwks/mscordacwks这些动态库,才能够很好的完成我们的调试工作,那么他们的版本对应关系是怎样的呢,特别是clr.dll/m ...
- The version of SOS does not match the version of CLR you are debugging; SOS.dll版本不匹配; Dump文件不同环境mscordacwks.dll版本问题
The version of SOS does not match the version of CLR you are debugging 和 PDB symbol for clr.dll not ...
- windbg自行下载的sos.dll存放路径“..\SOS_x86_x86_4.7.3132.00.dll\5B5543296ee000\”里的“5B5543296ee000”是什么?
问题的引出 我在调试某个崩溃问题时,要跟踪clr的栈,于是,我先执行了指令.loadby sos clrjit,没有报错,然后我又执行!clrstack,结果却有如下输出:0:000:x86> ...
- SOS 调试扩展 (SOS.dll) 《第五篇》
一.SOS扩展命令 SOS包含几十个命令,要熟练使用SOS,首先要了解SOS有哪些命令.下面给出SOS命令列表. 命令 描述 BPMD [<module name> <method ...
- SOS.DLL在windbg里加载错误
sos.dll/mscordacwks.dll 公共语言运行库(CLR)是执行托管代码的Microsoft.NET框架的核心引擎.简单地说,它通过在托管程序集中使用中间语言和元数据,JIT按需编译代码 ...
- windbg加载sos.dll
SOS.dll 中提供的 Son of Strike 扩展 (SOS),用于调试 WinDbg 中的托管代码.在启动了调试程序并将其附加到托管进程(或加载故障转储) .load C:\Windows\ ...
- SOS.dll(SOS 调试扩展)
SecAnnotate.exe(.NET 安全批注器工具) SignTool.exe(签名工具) Sn.exe(强名称工具) SOS.dll(SOS 调试扩展) SqlMetal.exe(代码 ...
- SOS 调试扩展 (SOS.dll)
http://blog.csdn.net/cslie/article/details/2158780 SOS 调试扩展 (SOS.dll) 提供公共语言运行时(CLR)内部环境的有关信息,帮助你在Wi ...
- 【C# .Net GC】sos.dll 混合模式调试(托管调试+本机)
当我们想使用本机调试器(如CDB或WinDBG)调试.NET应用程序时,我们必须在本机调试器和托管世界之间使用"桥",因为本机调试器本身并不理解托管代码.它是本机调试器.为了提供这 ...
随机推荐
- 利用在线工具根据JSon数据自动生成对应的Java实体类
如果你希望根据JSon数据自动生成对应的Java实体类,并且希望能进行变量的重命名,那么“JSON To Java”一定适合你.(下面的地址需要FQ) https://jsontojava.appsp ...
- 我在用的mac软件(3)-效率篇
距离上篇博客竟然一晃就2个月过去了……最近确实太忙了,但一忙其实就容易乱,反而积累就少. 今天继续介绍下我在用的mac软件.标题为效率篇,其实没有严格的限定,就是杂乱的介绍我在用的感觉能提升效率的工具 ...
- 获取当前屏幕显示的viewcontroller
//获取当前屏幕显示的viewcontroller - (UIViewController *)getCurrentVC { UIViewController *result = nil; UIWin ...
- object-c中的类目,延展,协议
协议 协议只有方法的声明(类似于其他编程语言的接口) 协议相当于大家都所遵循的 关键字 @protocol 协议名 <所遵循的协议> 默认NSObject @end @pr ...
- 系统在某些情况下会自动调节UIScrollView的contentInset
出现情景 如果一个控制器(ViewController)被导航控制器管理,并且该控制器的第一个子控件是UIScrollView,系统默认会调节UIScrollView的contentInset UIE ...
- LCS修改版(Longest Common Subsequence 最长公共子序列)
题目描述 作为一名情报局特工,Nova君(2号)有着特殊的传达情报的技巧.为了避免被窃取情报,每次传达时,他都会发出两句旁人看来意义不明话,实际上暗号已经暗含其中.解密的方法很简单,分别从两句话里删掉 ...
- mysql 批量更新与批量更新多条记录的不同值实现方法
批量更新 mysql更新语句很简单,更新一条数据的某个字段,一般这样写: 代码如下: UPDATE mytable SET myfield = 'value' WHERE other_field = ...
- 敏捷软件开发:原则、模式与实践——第12章 ISP:接口隔离原则
第12章 ISP:接口隔离原则 不应该强迫客户程序依赖并未使用的方法. 这个原则用来处理“胖”接口所存在的缺点.如果类的接口不是内敛的,就表示该类具有“胖”接口.换句话说,类的“胖”接口可以分解成多组 ...
- 解决win2003/2008下注册机或破解补丁程序无法运行问题
win Server 2003/2008 64位系统均遇到注册机或破解补丁程序无法运行或报错或死机的情况,原因是win系统默认开启了文件数据执行保护导致的. (比如3DMax的破解补丁程序等...) ...
- 设计模式 --- 模型-视图-控制器(Model View Controller)
模型-视图-控制器(Model-View-Controller,MVC)是Xerox PARC在20世纪80年代为编程语言Smalltalk-80发明的一种软件设计模式,至今已广泛应用于用户交互应用程 ...