启动, 附加进程, 执行和退出(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 常用命令表[转]的更多相关文章

  1. Git教程(2)官方命令文档及常用命令表

    http://www.cnblogs.com/angeldevil/archive/2013/11/26/3238470.html 1,官方命令文档 http://www.git-scm.com/do ...

  2. 【转载】windbg 常用命令详解

    windbg 常用命令详解 https://blog.csdn.net/chenyujing1234/article/details/7743460 vertarget 显示当前进程的大致信息 lmv ...

  3. windbg常用命令

    SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols CPU常用命令 载入sos.dll  执行.load C:\Windows\Micr ...

  4. windbg 常用命令详解

    = kd> ln 8046e100 (8046e100) nt!KeServiceDescriptorTableShadow | (8046e140) nt!MmSectionExtendRes ...

  5. WinDebug 常用命令表【摘】

    启动, 附加进程, 执行和退出(Starting, Attaching, Executing and Exiting) ======================= Start -> All ...

  6. WinDbg常用命令系列---源代码操作相关命令

    lsf, lsf- (Load or Unload Source File) lsf和lsf-命令加载或卸载源文件. lsf Filename lsf- Filename 参数: Filename指定 ...

  7. WinDbg常用命令系列---显示段选择器dg、链接列表dl和字符串ds/dS

    dg (Display Selector) dg命令显示指定选择器的段描述符. dg FirstSelector [LastSelector] 参数: FirstSelector指定要显示的第一个选择 ...

  8. WinDbg常用命令系列---断点操作b*

    ba (Break on Access) ba命令设置处理器断点(通常称为数据断点,不太准确).此断点在访问指定内存时触发. 用户模式下 [~Thread] ba[ID] Access Size [O ...

  9. WinDbg常用命令系列---!uniqstack

    简介 这个!uniqstack扩展扩展显示的所有线程的堆栈的所有当前进程,不包括显示为具有重复项的堆栈中. 使用形式 !uniqstack [ -b | -v | -p ] [ -n ] 参数 -b将 ...

随机推荐

  1. data-stream-as-disjoint-intervals

    https://leetcode.com/problems/data-stream-as-disjoint-intervals/ /** * Definition for an interval. * ...

  2. spring cloud-给Eureka Server加上安全的用户认证

    前言 在前面的一篇文章中 spring cloud中启动Eureka Server 我们启动了Eureka Server,然后在浏览器中输入http://localhost:8761/后,直接回车,就 ...

  3. 五条强化 SSH 安全的建议

    当你查看你的 SSH 服务日志,可能你会发现充斥着一些不怀好意的尝试性登录.这里有 5 条常规建议(和一些个别特殊策略)可以让你的 OpenSSH 会话更加安全. 强化密码登录 密码登录很方便,因为你 ...

  4. cocos2d-x -3.81+win7+vs2013开发环境创建新的项目

    cocos2d-x -3.81+win7+vs2013开发环境创建新的项目 1.准备阶段 (1) vs2013下载及安装 (2)cocos2d-x 3.8.1下载及解压 (3)python下载及安装( ...

  5. [Functional Programming] mapReduce over Async operations and fanout results in Pair(rejected, resolved) (fanout, flip, mapReduce)

    This post is similar to previous post. The difference is in this post, we are going to see how to ha ...

  6. 【Javascript Demo】根据Email地址跳转到相应的邮箱登录页面

    我的初步想法是通过指定的邮箱地址自动查找到对应的邮箱登录页面,但是用数据库.js什么的都有局限性,因为各种各样的邮箱太多了,不能都包含的到,网上找了半天都没有找到满意的答案,自己又想不出方法,只能暂时 ...

  7. Python-__builtin__与__builtins__的区别与关系(超详细,经典)(转)

    Python-__builtin__与__builtins__的区别与关系(超详细,经典) (2013-07-23 15:27:32) 转载▼   分类: Python 在学习Python时,很多人会 ...

  8. C#.NET常见问题(FAQ)-如何生成release版本的程序,生成debug版本的程序

    除了右击项目在生成中配置改成Release还要在顶部切换成Release     更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku.com/acetaohai1 ...

  9. Httpclient 4, error 302. How to redirect?

    http://stackoverflow.com/questions/3658721/httpclient-4-error-302-how-to-redirect DefaultHttpClient ...

  10. _PyUnicodeUCS4_AsDefaultEncodedString

    "_PyUnicodeUCS4_AsDefaultEncodedString"的出现一般源于你在两个地方分别装了python,两个分别用UCS2和UCS4编码进行的build. 解 ...