`
v5browser
  • 浏览: 1137776 次
社区版块
存档分类
最新评论

利用windbg分析dump文件

 
阅读更多

windbgwindows下一个分析调试的工具,功能非常强大。这里主要记录利用windbg来分析windows蓝屏时所产生的内存转储文件*.dmp

1,下载:

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

<wbr style="line-height:25px"></wbr>

2,配置symbol path

windows程序在编译生成后,会产生一些.exe,dll文件。同时也会用到一些symbol文件,这些文件包含全局变量,局部变量等信息。在调试不同的系统的时候,用到的symbol是不同的,而且这些文件会很大,如果下载安装会占用很大的硬盘空间。如果下载,在上面提供的地址也可以下载。微软还提供了一个网络上的symbol服务器。其网络地址是:http://msdl.microsoft.com/download/symbols,设置symbol时可以在打开windbg后,file->symbol file path设置如下:其d:\temp是本地缓存的目录:SRV*d:/temp/*http://msdl.microsoft.com/download/symbols。也可以用命令如下设置:

set<wbr style="line-height:25px">_NT_SYMBOL_PATH=srv*</wbr>DownstreamStore*http://msdl.microsoft.com/download/symbols

利用windbg分析dump文件(二)基本调试

1,打开dump文件,在正确设置了symbol路径后,会有如下的显示:

Microsoft (R) Windows Debugger<wbr style="line-height:23px">Version 6.5.0003.7<br style="line-height:23px"> Copyright (c) Microsoft Corporation. All rights reserved.</wbr>


Loading Dump File [D:\important\document\win
系统\debug\Mini121605-01.dmp]
Mini Kernel Dump File: Only registers and stack trace are available

Symbol search path is: SRV*d:/temp/*http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 2000 Kernel Version 2195 (Service Pack 4) UP Free x86 compatible
Kernel base = 0x80400000 PsLoadedModuleList = 0x8046e8f0
Debug session time: Fri Dec 16 13:30:21.203 2005 (GMT+8)
System Uptime: not available
Loading Kernel Symbols
....................................................................................................................
Loading unloaded module list
...................
Loading User Symbols
*******************************************************************************
*<wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px">*<br style="line-height:23px"> *<span></span><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px">Bugcheck Analysis<span></span><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px">*<br style="line-height:23px"> *<span></span><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px">*<br style="line-height:23px"> *******************************************************************************</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

Use !analyze -v to get detailed debugging information.

BugCheck 7F, {8, 0, 0, 0}

c0000005 Exception in ext.Analyze debugger extension.
<wbr style="line-height:23px"><span></span><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px"><wbr style="line-height:23px">PC: 77c16fa3<span></span><wbr style="line-height:23px">VA: 01fe8000<span></span><wbr style="line-height:23px">R/W: 0<span></span><wbr style="line-height:23px">Parameter: 0001003f</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

<wbr style="line-height:25px"></wbr>

2,关于调试窗口:view菜单下面有详细的列表:可以调出对应的窗口,默认的打开窗口是command窗口

3,基本调试命令:

r<wbr style="line-height:23px"><wbr style="line-height:23px"></wbr></wbr>可以显示系统崩溃时的寄存器,和最后的命令状态。

dd显示当前内存地址,dd参数:显示参数处的内存。

u<wbr style="line-height:23px"><wbr style="line-height:23px"></wbr></wbr>可以显示反汇编的指令

analyze -v显示分析的详细信息。

kb显示call stack内容

kv.bugcheck可以显示出错的代码

分享到:
评论

相关推荐

    调试技巧 —— 如何利用windbg + dump + map分析程序异常

    调试技巧 —— 如何利用windbg + dump + map分析程序异常 http://blog.csdn.net/wangningyu/article/details/6748138

    dump调试样例分析

    很多人写的程序会莫名其妙地崩溃,弹出的崩溃...这个时候dump文件就会发挥大用处了,程序崩溃时自动生成.dmp文件,再利用windbg工具就能确定问题出在哪里了,具体可以看我的blog上面:http://blog.csdn.net/wu_123_456

    vs2010下利用dmp和pdb文件分析异常行号

    此代码用与分析代码中异常位置的实例,可以生成pdb文件、dmp文件,二者通过Windbg可以得到源码中异常行号。已测试,没有问题。

    analyze iis crash

    利用 windbg 对iis crash 时进行Dump,并对该文件进行分析

    Windows内部原理(十一):存储和文件系统

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理(十)驱动和硬件的管理

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理 (八)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    windows 内部原理(一)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理(九)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理 (三)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理(四)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    WINDOWS 内部原理(五)

    本讲座将解释蓝屏产生的原因和过程,引发蓝屏错误典型的根源,并向您介绍使用WinDbg分析DUMP文件的高级技巧。 深入研究Windows内部原理系列之十四:用户模式的程序排错(上) 讲师信息:喻勇 2007年03月09日 14:00...

    window内核监控工具源代码

    3搜索内核空间匹配驱动的特征来列举(这个功能里面我自己的主机一运行就死机,别的机器都没事,手动设置热键来蓝屏都不行,没dump没法分析,哎,郁闷) 4从本驱动的Modulelist开始遍历来列举驱动 四:进程的列举和...

    Windows驱动开发技术详解的光盘-part1

     从Windows最基本的两类驱动程序的编译、安装、调试入手讲解,非常容易上手,用实例详细讲解PCI、USB、虚拟串口、虚拟摄像头、SDIO等驱动程序的开发,归纳了多种调试驱动程序的高级技巧,如用WinDBG和VMWARE软件对...

    windows驱动开发技术详解-part2

    用WinDBG和VMWARE软件对驱动进行源码级调试,深入Windows操作系统的底层和内核,透析Windows驱动 开发的本质。 本书是作者结合教学和科研实践经验编写而成的,不仅详细介绍了Windows内核原理,而且介绍了编程技 巧...

Global site tag (gtag.js) - Google Analytics