windbg

WinDbg的安装、配置和功能

五迷三道 提交于 2019-11-28 00:53:54
一、WinDbg简介 WinDbg是微软发布的一款免费而十分强大的调试工具。既然是微软自己发布的调试工具,那它对微软产品的调试当然是十分的强大。 Windows 调试器 (WinDbg) 可用于调试内核模式和用户模式代码,来分析故障转储,并检查代码时 CPU 寄存器执行,同时也是 一款相当优秀的源码级(source-level)调试工具 。相比较于Visual Studio,它是一个轻量级的调试工具,所谓轻量级指的是它的安装文件大小较小,但是其调试功能,却比VS更为强大。 二、获取和安装 2.1、获取途径 可以将Windows调试工具作为开发工具包的一部分或作为独立工具集获取: 作为WDK的一部分 Windows的调试工具包含在Windows驱动程序工具包(WDK)中。 Download the Windows Driver Kit (WDK) . 作为Windows SDK的一部分 Windows软件开发工具包(SDK)中包含Windows调试工具。要下载安装程序或ISO映像,请参阅Windows开发人员中心上的 Windows 10 SDK 作为独立的工具集 通过开始安装Windows SDK,然后在要安装的功能列表中仅选择Windows的调试工具(并清除所有其他功能的选择),可以在不安装Windows SDK或WDK的情况下单独安装Windows的调试工具。

Windbg使用

巧了我就是萌 提交于 2019-11-28 00:50:43
windbg调试入口 打开windbg,点击:File->Open Executable,选中编译好的exe文件。 其它命令 Windbg导出User32.dll里面的所有函数 命令 x user32!* X [模块名] ![函数名/*] 解释: X :表示查询的意识 x user32!MessageBXA 表示在User32 中查询函数MessageBoxA x user32!* 表示查询所有语句 和SQL 中 * 的意思一样的 如果一个函数名称不记得全部了 你也可以,用部分匹配的方式去查找,如: x user32!Message* 打印User32中所有函数,结果如下 来源: https://www.cnblogs.com/code1992/p/11384023.html

WDK1.3. windbg调试配置

筅森魡賤 提交于 2019-11-27 19:22:43
目录 1.3.1. windbg简述 windbg是在windows平台下,强大的用户态和 内核态调试工具。相比较于Visual Studio,它是一个轻量级的调试工具,所谓轻量级指的是它的安装文件大小较小,但是其调试功能,却比VS更为强大。它的另外一个用途是可以用来分析 dump数据。 通过windbg可以对WDF驱动程序进行在线调试,也可以简单的输出显示调试功能。 在线调试能够设置断点、单步骤运行输出运行时栈信息等调试操作。本笔记只是涉及简单调试使用,更加复杂详细的windbg调试步骤自行搜索了解。 1.3.2. windbg使用 (1)工具路径 一般windbg工具都在安装路径下 C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe (2)环境配置 在线驱动调试,需要用到文字符号;否则在联调时候无法断点调试。基础配置方式方式, 在【我的电脑】-【属性】-【高级系统设置】-【高级】-【环境变量】中添加新的变量项。 变量名: _NT_SYMBOL_PATH 变量值: c:\pro\mysymbol;SRV*c:\pro\mysymbol*http://msdl.microsoft.com/download/symbols [外链图片转存失败(img-3yQQxjyd-1566134836238)(./img

WinDbg命令系统

隐身守侯 提交于 2019-11-27 19:14:56
WinDbg命令系统 WinDbug三种命令 WinDbug是一个强大的调试器,大部分很多功能都是通过命令来实现的,命令在命令窗口中输入,主要分为以下三类: 标准命令 标准命令提供了调试器的基本功能,大部分都是一个字母,共有130多个命令 类型 代表命令 程序控制类 g系列 t系列 p系列 内存查看修改类 d系列 e系列 s等 断点设置类 b系列 观察堆栈 k系列 反汇编命令 u系列 其他命令 x q l s等 在命令输入框输入?可以看到一些命令的简介 注意事项: 只用在程序在程序暂停时才能输入命令 直接回车可以重复上一条命令 按上下方向键可以浏览以前输入过的命令 当命令提示框为 * BUSY* 的时候,无法立即执行命令 元命令 元命令作为标准命令的一个补充也被内置在了WinDbg中,其特点是一个“ . ”开头 ,通常是一个单词: 例:.symopt .sympathy .asm .restart .reboot 输入.help可以查看到元命令以及他们的帮助说明 扩展命令 扩展命令通常用于实现特定调试的一些命令。他们实现与DLL中并非WinDbg内置,使用时一般以!开头,通常是一个单词。 扩展命令存在的DLL被称之为扩展模块,使用.chain命令可以列出所有的扩展模块,大部分模块都有help命令来显示这个模块的基本信息以及所含有的命令。 常用基本命令 命令 功能 lm

How can you change an age-mismatched PDB to match properly?

风流意气都作罢 提交于 2019-11-27 18:00:51
Our nightly build process was broken for a long time, such that it generated PDB files that were a few hours different in age than the corresponding image files. I have since fixed the problem. However, I would like to start using a symbol server, but cannot due to having to use these age-mismatched pdb files. I work around this issue by using the .symopt +0x40 method in windbg. That means I have to organize all my pdb files by hand, and after years upon years of releases, that adds up. I am looking for a way to modify the mechanism that windbg uses to mark a pdb's age, and force it to match

WinDbg Dr. Watson minidump - requires pdb/dll originally built for installed version?

孤者浪人 提交于 2019-11-27 17:12:33
问题 I have a mindmp file from a target's application crash. Is it possible for me to rebuild the dll/pdb files for a version of software and have windbg load symbols correctly? My problem is that our pdb files are only kept for major releases (unfortunately). This is a daily build, which I can rebuild myself, but I'm getting tripped up on errors. With !sym noisy on: "image header does not match memory image header." DBGENG: C:\...\XXX.dll image header does not match memory image header. DBGENG:

Why use WinDbg vs the Visual Studio (VS) debugger?

て烟熏妆下的殇ゞ 提交于 2019-11-27 16:52:57
What are the major reasons for using WinDbg vs the Visual Studio debugger? And is it commonly used as a complete replacement for the Visual Studio debugger, or more for when the need arises. If you are wondering why you should use windbg over Visual Studio, then you need to read Advanced Windows Debugging . Any time you need to debug a truly ugly problem windbg has better technology to do it with than Visual Studio. Windbg has a more powerful scripting language and allows you to write DLLs to automate difficult problems. It will install gflags.exe, which gives you better control over the heap

How do I make a '.cmdtree' window dock at startup in WinDbg?

醉酒当歌 提交于 2019-11-27 16:50:56
问题 I have followed Tess Ferrandez' blog for setting up a custom theme in WinDbg. I have also started launching WinDbg automatically with -c ".cmdtree c:\mycmdtree.txt" This correctly opens my cmdtree file as a commands window, but I can't get it to dock properly. The problem appears to be that 'commands' windows can only be opened after you have opened a DMP file, but opening a DMP file switches you out of the 'base' workspace, therefore any changes to your workspace aren't saved. Any ideas? 回答1

Good tutorial for WinDbg?

◇◆丶佛笑我妖孽 提交于 2019-11-27 16:35:37
Are there good tutorials for showing how to use WinDbg ? Colin Smith Basic Tutorials & Usage Demos Installing and Configuring WinDbg (Windows Debug Tools) Mike Taulty - A word for WinDbg WinDbg Tutorials Windows Debuggers: Part 1: A WinDbg Tutorial Different Ways to "Start"/Attach WinDbg Start Debugging with WinDbg (includes how to debug an .msi) How to debug a Windows service Setting up Windows Debugging Debugging SQL Server... here , here , here , here Workspaces (Understanding how they work) Pimp up your debugger: Creating a custom workspace for WinDbg debugging Uncovering How Workspaces

WinDbg 调试 Edge

妖精的绣舞 提交于 2019-11-27 15:29:58
如何用 windbg 调试 edge? 由于 edge 是 uwp 程序, 我们不能再像一般程序那样直接 attach to a process 。 微软官方说: A UWP app will not be suspended in the same ways that it does when not being debugged 那么到底要如何用windbg 调试 edge 呢?下面是官方的方法, 在命令行 启动调试器进行调试。 这里里面有三个参数, 分别是 packagename, appid, 和 parameters 。 首先,打开edge , 用windbg 随便附加一个edge进程 , 中断后, 执行下面的命令。 0:045> .querypackage Missing package name. The command is ".queryPackage <packageName>". 0:045> .querypackages Package Full Name: Microsoft.AAD.BrokerPlugin_1000.17134.1.0_neutral_neutral_cw5n1h2txyewy Package Display Name: PackageDisplayName Version: 1000.17134.1.0 Processor