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应用程序时,我们必须在本机调试器和托管世界之间使用"桥",因为本机调试器本身并不理解托管代码.它是本机调试器.为了提供这 ...
随机推荐
- android 浏览器开发实例
android app需要通过手机显示网页信息还是比较常用的,比如我最近业余开发的 抢商铺游戏,需要对游戏规则做说明,规则会比较多,而且要经常变动,就想到用网页来展示,更新起来方便,不像应用,一旦发布 ...
- iOS自定义AlertView 与 ActionSheet 遮罩提示+弹出动画
产品大人总是能够想到很多让人欣慰的点子,基本所有能提示的地方都要很多文案啊图片之类 由此封装了一个半透明黑色遮罩的alert类(假装有图.jpg) 代码略糙,just share (逃 下载链接
- 基础学习day02--标识符、关键字、数据类型与运算符
一.标识符和关键字 关键字: 就是被java语言赋予了特殊含义的单词. 特点就是所有的关键字都是小写. 标识符: 就是给包.类.接口.方法.变量名起的名字. 规则:1.以数字.字母._以及$符 ...
- iOS开发之网络编程--1、NSURLSession的基本使用
前言:学习NSURLSession的使用之前,先学习一篇关于NSURLSession的好文章<From NSURLConnection to NSURLSession>或者是国内的译文&l ...
- 我体验过的可以用的XCode插件
XCode版本:7.0.1 其实插件的使用,如果能得到直接的xclugin后缀文件,是可以直接放置在隐藏文件夹中: /Users/HeYang/Library/Application Support/ ...
- TXT记事本转换PDF文件
使用的方式为,读取TXT记事本的内容,然后写入创建的PDF文件. static void Main(string[] args) { const string txtFile = "D:\\ ...
- Effective Java 03 Enforce the singleton property with a private constructor or an enum type
Principle When implement the singleton pattern please decorate the INSTANCE field with "static ...
- Effective Java 31 Use instance fields instead of ordinals
Principle Never derive a value associated with an enum from its ordinal; store it in an instance fie ...
- MONGODB(三)——Java操作Mongo
相比于java调用MySqlApI来操作数据库,调用Mongo要简洁容易的多.通过一个简单的样例,很容易地就可以上手 一.导入Jar包 添加Monog支持Java的jar包,这里使用的是2.9.3 & ...
- MyCat 学习笔记 第十一篇.数据分片 之 分片数据查询 ( select * from table_name limit 100000,100 )
1 环境说明 VM 模拟3台MYSQL 5.6 服务器 VM1 192.168.31.187:3307 VM2 192.168.31.212:3307 VM3 192.168.31.150: 330 ...