Windows内核 - 调试:符号文件和Windbg的安装与环境配置

WinDbg下载与初次使用:超详细版设置教程 手把手教你完成windbg下载及首次运行配置,涵盖调试环境搭建、符号文件设置与基础命令操作,让初学者快速上手内核调试工具。 阅读详情
 
flyingstarsoul
2007-9-21
 
 
       内核调试:
内核调试可以帮助我们查看内核的内部数据结构,跟踪内核中的函数,从而探查 Windows 的内部机理。内核调试工具有 Microsoft 的 Windows 调试工具箱、 Compuware NuMega 的 SoftIce 、www.sysinternals.com上的 LiveKD 等等。
 
       内核调试所需的符号文件:
符号文件包含了函数和变量的名称,由链接器产生,在调试过程中被用来引用和显示这些名称。为了使用任何一个内核调试工具来查看内核数据结构,必须首先至少获得内核映像 Ntoskrnl.exe 的正确的符号文件,即二者版本完全匹配。利用 Microsoft 的按需符号服务器,可以得到当前调试所需的正确版本,首先需要设置环境变量来指定符号文件的路径。
假如你想把符号文件存放在 C:/WINDOWS/Symbols 目录下,环境变量设置如下:
 
系统环境变量名: _NT_SYMBOL_PATH
本例变量值: srv*C:/WINDOWS/Symbols*http://msdl.microsoft.com/download/symbols
 
其中, http://msdl.microsoft.com/download/symbols 是 Microsoft 符号服务器。当运行内核调试器并在需要符号文件的时候,将连接到该服务器下载正确的符号文件。可以下载工具 LiveKD 放到 Windbg (见下文)安装目录下,第一次在命令行运行 Livekd.exe ,将会自动下载符号文件到指定的目录(耗时长,勿关闭命令行窗口,否则可能出现错误,导致符号文件不能正常使用)。
 
Microsoft Windows调试工具箱:
 
有命令行版本( KD.exe )和图形界面版本( Windbg.exe ),可以到 http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx 下载。有三种类型的内核调试类型:
Ø         打开一个崩溃转储文件。当 Windows 系统崩溃的时候会产生这样的文件。
Ø         连接到一个正在运行的系统上,检查该系统的状态或设置断点来调试设备驱动程序代码。一般要求有两台计算机——目标计算机(被调试系统)和控制主机(运行调试器),本机 + 虚拟机调试亦可。操作细节超出本文范围。
Ø         对于 Windows XP 和 Windows Server2003 ,可以连接到本地系统上来查看系统状态,称为本地内核调试。方法是:安装 Windbg 后,选择“ File ”菜单的“ Kernel Debug ”菜单项,再点击“ Local ”标签,再点“ OK ”按钮。在本地内核调试模式下,有些命令不能正常工作(如查看内核栈、用 .dump 命令创建一个内存转储)。当基本的本地内核调试功能不能工作的时候,可以用 www.sysinternals.com上的免费工具LiveKD.exe。
 
 
 
 
参考文献:
[1] 深入解析 Windows 操作系统(第 4 版), 2007.
[2] http://www.microsoft.com.

Windows 内核之双机调试与windbg命令大全 在今后会有相当的实验环节,对于windows内核实验,调试环境是必不可少的,本章讲解双机调试的环境搭建与常见的WINDBG指令。 准备材料: VMware workstation : [https://www.vmware.com/go/downloadworkstation-cn] windows 7 x64 ISO (请使用种子下载工具进行下载): [ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|34205573 阅读详情

相关推荐

Windbg调试Windows内核模块:从零实现基础环境搭建

手把手教你使用windbg搭建Windows内核调试环境,涵盖工具配置与基础操作,适合初学者快速上手内核调试技术。

weixin_35749786的博客 962

基于VS Code的Linux内核调试环境搭建及start_kernel跟踪分析

在内核引导时,init_task会被创建并启动,是所有其他进程的起点。在start_kernel()函数末尾,arch_call_rest_init()函数体内为rest_init()函数,因此设置一个rest_init函数断点,进入rest_init函数体内,该函数由0号进程执行。新建一个.vscode文件夹,将配置文件放入该文件夹内,配置如下五个文件:c_cpp_properties.json,init,launch.json,settings.json,tasks.json。

weixin_45169012的博客 297

WinDbg Preview下载安装详解:适用于内核调试场景

详细介绍WinDbg Preview下载与安装步骤,聚焦内核调试场景的配置要点,帮助开发者快速上手使用这一高效调试工具,提升问题排查效率。

weixin_42600128的博客 734

Linux内核调试环境搭建及start_kernel实验

命令行下打断点跟踪代码还是不够方便,用VSCode边看代码随时打断点单步执行会更方便一些,这需要配置.vscode/tasks.json和.vscode/launch.json。配置文件参见https://github.com/mengning/linuxkernel/tree/master/src/kerneldebuging。总是卡在这里,调用堆栈如左侧所示,未找到原因。5.使用vscode调试。init脚本执行成功!

Zsy_1112的博客 457

WinDbg下载与内核调试环境搭建:新手教程

手把手教你完成windbg下载并配置内核调试环境,涵盖常用设置与实战技巧,帮助开发者快速上手调试Windows系统问题。

weixin_42575505的博客 836

WinDbg Preview下载详细步骤:系统学习内核调试工具

掌握WinDbg Preview下载的完整流程,深入学习内核调试技巧。通过实际操作理解系统底层机制,提升问题排查能力,是进阶Windows调试的必备技能。

weixin_36277197的博客 856

内核学习——Windows XP双机调试 及 NT symbols are incorrect

我的XP是SP2,踩了很多坑… 跟着任意网址都行,做到能双机调试了,但是输入 !process 会出现 NT symbols are incorrect, please fix symbols的问题 这是因为没下载调试所需的符号 网上很多关于它的解决方案所用的资源基本都莫了,幸好我找到了这个可用资源https://download.csdn.net/download/fzy20062008/114...

q1uTruth的博客 1272

WinDbg Preview与KD对比:内核调试入门核心要点

深入解析WinDbg Preview和传统KD在内核调试中的差异与优势,聚焦windbg preview的现代化调试体验,帮助新手快速掌握内核调试关键要点。

weixin_42627459的博客 916

Windows内核调试:符号文件和Windbg的安装与环境配置

Windows内核调试:符号文件和Windbg的安装与环境配置 flyingstarsoul 2007-9-21 内核调试: 内核调试可以帮助我们查看内核的内部数据结构,跟踪内核中的函数,从而探查Windows的内部机理。内核调试工具有Microsoft的Windows调试工具箱、Compuware NuMega的SoftIce、www.sysinternals.com上的LiveKD等等

xu的blog 7228

WinDbg中文调试入门:从零开始掌握Windows程序诊断核心技能

调试器是理解程序运行本质的基础工具,其核心原理在于控制执行流、读取内存与寄存器状态,并结合符号信息映射到源码逻辑。Windbg作为Windows平台最深入的原生调试工具,具备用户模式与内核模式双轨调试能力,技术价值体现在对崩溃分析、蓝屏诊断、驱动行为追踪等关键场景的不可替代性。它广泛应用于系统编程、安全研究、故障排查及软件测试等领域。本文聚焦Windbg中文环境搭建与首个实战——记事本用户模式断点调试,覆盖主机/目标模型、符号配置、断点设置与现场分析等核心热词,助力新手跨越从‘看不懂报错’到‘看得见执行’的

weixin_28840591的博客 227

精通Windows软件调试:使用Windbg指南

调试是软件开发流程中不可或缺的一个环节,它是识别、分析并解决程序运行中出现错误的过程。随着软件复杂度的增加,高效的调试策略可以显著提升开发效率和产品质量。在复杂的调试场景中,开发者可能需要自定义符号解析规则,以便在多个符号文件之间进行更细致的选择。例如,可以设置规则仅加载特定编译器或特定版本生成的符号文件。过滤规则可以在符号路径设置中指定,或通过创建符号配置文件(.sym)来实现更复杂的符号管理策略。自定义过滤规则可以排除不必要的符号加载,减轻调试器的负担,加快调试过程。

weixin_42527589的博客 2116

windows 2000 debug symbols

windows 2000 debug symbols If you plan to install symbols manually, it is crucial that you remember this basic rule: the symbol files on the host computer are required to match the version of Windows installed on the target computer. If you are planning to do a kernel mode debug of a Windows XP target from a Windows 2000 host, you need to install the Windows XP symbol files on the Windows 2000 system. If you plan to perform user-mode debugging on the same computer as the target application, then install the symbol files that match the version of Windows running on that system. If you are analyzing a memory dump file, then the version of symbol files needed on the debug computer are those that match the version of the operating system that produced the dump file, not necessarily those matching the version of the operating system on the machine running the debug session.

使用WinDbg进行Windows内核调试的详细过程

使用WinDbg进行Windows内核调试的详细过程,安装虚拟机。比楚狂人介绍的稍详细。巨崇拜楚狂人

Vmware进行Windows系统内核调试(WinDbg、WinDbg Preview)

下载:https://down.52pojie.cn/Tools/Debuggers/ 配置vmware https://www.microsoft.com/zh-cn/p/windbg-preview/9pgjgd53tn86?rtc=1&activetab=pivot:regionofsystemrequirementstab .sympath F:\symbol 参考:https://blog.51cto.com/14317856/2410156 https://download.c

、moddemod 3205

windows 内核调试工具 Windbg

windows平台下,用户态和内核态调试工具 Windbg WIN7 64位系统可用,也可以用来分析dump数据,查内存泄漏

windows 7 debug symbols 32位 64位 sp1的symbols是另一个文件

windows 7 debug symbols 不含win7 sp1的symbol If you plan to install symbols manually, it is crucial that you remember this basic rule: the symbol files on the host computer are required to match the version of Windows installed on the target computer. If you are planning to do a kernel mode debug of a Windows XP target from a Windows 2000 host, you need to install the Windows XP symbol files on the Windows 2000 system. If you plan to perform user-mode debugging on the same computer as the target application, then install the symbol files that match the version of Windows running on that system. If you are analyzing a memory dump file, then the version of symbol files needed on the debug computer are those that match the version of the operating system that produced the dump file, not necessarily those matching the version of the operating system on the machine running the debug session.

上一篇: operator new
下一篇: Debug 武侠世界
blizmax6
博客等级 码龄17年 106粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值