.Net Memory -- Windbg基本命令

命令解释
.cls清空命令窗口屏幕
.load dllfullpath加载debugger扩展dll如SOS sosex psscor。
.loadby dll moduleName加载debugger扩展dll, 该扩展dll与所指定的module的dll在同一目录下。例如.loadby sos clr
.sympath+ symbol path
添加符号文件路径
.sympath symbolpath1;symbolpath1
设置符号文件,如果没有加参数则会显示当前的符号文件设置
.hh command在帮助文档中显示该命令的帮助信息
lm列出目前加载的模块
![ExtensionDLL.]help [-v][CommandName]显示从扩展dll中导出的命令帮助信息
~threadIds切换到thread id所指定的线程
~列出所有线程
.dump dump进程,一般使用.dump /ma或者.dump /mf。可以使用.dump /?查看帮助信息
!threadpool
查看线程池的信息
!runaway查看线程运行时间信息
!clrstack
查看clr线程栈信息
!Name2EE <module name> <type or method name>
!Name2EE <module name>!<type or method name>
从方法名或者类名获得他的方法表和EEClass
!DumpMT [-MD] <MethodTable address> 输出在类中定义的方法列表
!DumpMD <MethodDesc address>列出方法描述信息
!IP2Md  <Code address>从managed代码地址获得方法描述
k显示线程的stack frame信息
!DumpIL <Managed DynamicMethod object> |
        <DynamicMethodDesc pointer> |
        <MethodDesc pointer> |
        /i <IL pointer>

输出和托管code的IL代码
!DumpDomain [<Domain address>]
 
dump应用程序域相关的信息
!DumpAssembly <Assembly address>
 
输出assembly的相关信息
!SaveModule <Base address> <Filename> This command allows you to take a image loaded in memory and write it to a
file
!EEHeap [-gc] [-loader] enumerates process memory consumed by internal CLR data structures. You
can limit the output by passing "-gc" or "-loader". All information will be
displayed otherwise.
 
!DumpHeap 输出垃圾收集堆相关的信息
!GCRoot [-nostacks] <Object address> !GCRoot looks for references (or roots) to an object. These can exist in four
places:

   1. On the stack
   2. Within a GC Handle
   3. In an object ready for finalization
   4. As a member of an object found in 1, 2 or 3 above.
.prefer_dml
sets the default behavior for commands that are capable of providing output in the Debugger Markup Language (DML) format. 
.chain
列出所有的windbg扩展dll信息
!sosex.refs objAddr

Lists all references held by the specified object

Lists all references to the specified object (searches heaps, stacks, registers, handle tables and the freachable queue)

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

转载于:https://www.cnblogs.com/dereklovecc/p/4489693.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值