WinDBG 常用命令表[转]
启动, 附加进程, 执行和退出(Starting, Attaching, Executing and Exiting)
=======================
|
Start -> All Programs -> Debugging Tools for Windows -> WinDBG |
启动 |
|
|
F6 |
attach to process |
附加到进程 |
|
Ctrl-Break |
interrupt debugee |
中断正在被debug的程序 |
|
.detach |
detach from a process |
脱离进程 |
|
g |
continue debugee execution |
继续执行被debug的程序 |
|
q |
exit WinDBG |
退出WinDBG |
获得帮助(Getting Help)
=======================
|
? |
help on commands that affect the debugee |
列出所有的内置命令和操作符 |
|
.help |
help on commands that affect the debugger |
列出所有的元命令 |
|
.hh command |
view the on line help file |
打开WinDBG的帮助文件 |
|
!help |
help on the extension dll at the top of the chain (e. g., SOS) |
列出扩展DLL中的扩展命令帮助 |
操纵命令(Issuing Commands)
=======================
|
up arrow, down arrow, enter |
scroll through command history |
浏览命令历史 |
|
Right mouse button |
paste into command window |
在命令窗口中粘贴 |
检查非托管环境(Examining the Unmanaged Environment)
=======================
|
lmf |
list loaded modules with full path |
列出已加载了的模块及其完整路径 |
|
lmt |
list loaded modules with last modified timestamp |
列出已加载了的模块和最后修改的时间戳 |
|
~ |
list unmanaged threads |
列出所有非托管线程 |
|
~thread s |
select a thread for thread specific commands |
|
|
!token -n |
view thread permissions |
|
|
k |
view the unmanaged call stack |
查看非托管调用栈 |
|
!runaway |
view thread CPU consumption |
显示每个线程占用的时间 |
|
bp |
set a breakpoint |
设置一个断点 |
|
.dump path |
dump small memory image |
创建一个小的dump内存镜像 |
|
.dump /ma path |
dump complete memory image |
创建一个完整的dump文件 |
使用Debuger DLL扩展(Working with Extension DLLs (e. g., SOS))
=======================
|
.chain |
list extensions dlls |
列出所有加载了的debugger extension |
|
.load clr10\sos |
load SOS for debugging framework 1.0 / 1.1 |
加载.net 1.1托管程序的debug扩展 |
|
.unload clr10\sos |
unload SOS |
卸载SOS |
|
.loadby sos mscorwks |
load SOS for debugging framework 2.0 |
加载.net 2.0的debug 扩展 |
SOS命令(SOS Commands)
=======================
|
!threads |
view managed threads |
查看所有托管线程 |
|
!clrstack |
view the managed call stack |
查看托管调用栈 |
|
!dumpstack |
view combined unmanaged & managed call stack |
查看非托管和托管结合的调用栈 |
|
!clrstack -p |
view function call arguments |
查看托管函数调用的参数 |
|
!clrstack –l |
view stack (local) variables |
查看托管栈的局部变量 |
|
!name2ee module class |
view addresses associated with a class or method |
查看某个类或方法的内存地址 |
|
!dumpmt –md address |
view the method table & methods for a class |
查看指定地址的方法表和一个类的方法集 |
|
!dumpmd address |
view detailed information about a method |
显示指定地址的MethodDesc结构信息 |
|
!do address |
view information about an object |
显示某地址的对象的信息, 包括fields, EEClass, Method Table和object size |
|
!dumpheap –stat |
view memory consumption by type |
显示堆内存的使用 |
|
!dumpheap –min size |
view memory consumption by object when at least size |
查看堆内存使用, 忽略小于size字节大小的对象 |
|
!dumpheap –type type |
view memory consumption for all objects of type type |
查看所有类型为type的对象的内存使用 |
|
!gcroot address |
view which object are holding a reference to address |
查看所有对指定地址的对象的引用 |
|
!syncblk |
view information about managed locks |
查看托管的锁(SyncBlock结构) |
SOS 2.0 命令(SOS 2.0 Commands)
========================
|
!bpmd module method |
set breakpoint |
在指定模块的某一指定的方法上设置断点 |
|
!DumpArray address |
view contents of an array |
查看数组中的元素 |
|
!PrintException |
view information about most recent exception |
格式化地显示最近的异常信息 |
资料来源:
WinDbg / SOS Cheat Sheet
http://geekswithblogs.net/.netonmymind/archive/2006/03/14/72262.aspx
SOS.dll (SOS Debugging Extension)
http://msdn.microsoft.com/en-us/library/bb190764.aspx
[转]http://www.cnblogs.com/awpatp/archive/2010/05/30/1747736.html
WinDBG 常用命令表[转]的更多相关文章
- Git教程(2)官方命令文档及常用命令表
http://www.cnblogs.com/angeldevil/archive/2013/11/26/3238470.html 1,官方命令文档 http://www.git-scm.com/do ...
- 【转载】windbg 常用命令详解
windbg 常用命令详解 https://blog.csdn.net/chenyujing1234/article/details/7743460 vertarget 显示当前进程的大致信息 lmv ...
- windbg常用命令
SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols CPU常用命令 载入sos.dll 执行.load C:\Windows\Micr ...
- windbg 常用命令详解
= kd> ln 8046e100 (8046e100) nt!KeServiceDescriptorTableShadow | (8046e140) nt!MmSectionExtendRes ...
- WinDebug 常用命令表【摘】
启动, 附加进程, 执行和退出(Starting, Attaching, Executing and Exiting) ======================= Start -> All ...
- WinDbg常用命令系列---源代码操作相关命令
lsf, lsf- (Load or Unload Source File) lsf和lsf-命令加载或卸载源文件. lsf Filename lsf- Filename 参数: Filename指定 ...
- WinDbg常用命令系列---显示段选择器dg、链接列表dl和字符串ds/dS
dg (Display Selector) dg命令显示指定选择器的段描述符. dg FirstSelector [LastSelector] 参数: FirstSelector指定要显示的第一个选择 ...
- WinDbg常用命令系列---断点操作b*
ba (Break on Access) ba命令设置处理器断点(通常称为数据断点,不太准确).此断点在访问指定内存时触发. 用户模式下 [~Thread] ba[ID] Access Size [O ...
- WinDbg常用命令系列---!uniqstack
简介 这个!uniqstack扩展扩展显示的所有线程的堆栈的所有当前进程,不包括显示为具有重复项的堆栈中. 使用形式 !uniqstack [ -b | -v | -p ] [ -n ] 参数 -b将 ...
随机推荐
- Mongodb安全认证及Java调用
Mongodb安全认证在单实例和副本集两种情况下不太一样,单实例相对简单,只要在启动时加上 --auth参数即可,但副本集则需要keyfile. 一.单实例 1.启动服务(先不要加auth参数) 2. ...
- 新买的mac笔记本,发现vi编辑器没有颜色的解决方案
新买的mac笔记本,发现vi编辑器没有颜色的解决方案 我在网络上找了一些资料,发现都有些问题,尤其是一些让修改根目录上的文件,发现根本无法修改. 但是在网络上找到了这篇文章: http://super ...
- JavaScript使用技巧精萃
(一).确认删除用法: 1. BtnDel.Attributes.Add("onclick","return confirm('"+"确认删除?& ...
- c#逐行分元素读取记事本txt数据写进数据库
其实这里最关键的一个方法是 StreamReader类里的 ReadLine();这个方法可以逐行读取txt流里面的数据.写了个简单的demo,已经加上了详细的注释说明. ok,好了,不废话,下面 ...
- natapp搭建外网服务器
首先在natapp官网注册一个账号:https://natapp.cn/ 注册好后登陆网站,点击左侧菜单中的购买隧道: 点击免费隧道后进入隧道配置页面,我这里已经配置好了直接展示如下: 点击保存后点击 ...
- 说一说activity
activity与service,provider,receiver并称为 android的四大对象. 而activity,是展现界面的必不可少的组件.我这里有几个问题要问了,他是如何加载,他是如何进 ...
- Tomcat gzip果然强大,js文件压缩率50%以上
Tomcat配置使用gzip,在server.xml中 <Connector port="9098" protocol="HTTP/1.1" connec ...
- SSIS包部署错误之运行环境设置
在SQLServer代理处新建了一个job,步骤里面的操作是指向一个SSIS模型包 执行,报错如下 根据报错信息是64bit,于是做出修改如下图 再次执行 OK
- Nginx的负载均衡的几种方式
Nginx的负载均衡的那点事 本节就聊聊采用Nginx负载均衡之后碰到的问题: Session问题 文件上传下载 通常解决服务器负载问题,都会通过多服务器分载来解决.常见的解决方案有: 网站入口通过分 ...
- 转:C#委托与事件
委托与事件 Ganesh Nataraj最近写了一篇解释委托与事件的文章,在坊间流传较广,今天翻译成中文与大家共享,如有不妥之处,欢迎留言讨论. C#中的委托类似于C或C++中的函数指针. ...