windbg抓取dump

本文档介绍了如何设置Windows系统以捕获完整内存转储,以及使用Windbg通过Kdnet进行设置。当应用程序崩溃时,可以通过任务管理器手动创建转储文件或配置Windbg自动触发。针对BSOD时缺少转储文件的问题,提供了将转储保存到USB驱动器的解决方案。参考链接包括Windbg帮助文档和有关缺失Windows转储文件的资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This is used for your reference to enableand get crash dumps. There are 5 parts:

WindowsDump Settings

Crash Dump ForProcesses

WindbgSettings Via Kdnet

SolutionsFor BSOD Dump Missing

Reference

 

 

Windows Dump Settings

·        Launch Control Panel ->System -> Advanced system settings

·        Tap Startup and Recovery Settings

·        Choose “Complete memory dump” (Full dump), see below screenshot

·        Save and reboot your machine to apply it

Dump file can be found at: %SystemRoot%\MEMORY.DMP

Crash Dump For Processes

1.      Capture Crash dump explicitly (Crash UI)

·        Launch ‘Task Manager”

·        Find the process and right click it, select “Create dump file

 

2.      Windbg Auto Triggered If Apps Crash

Two ways:

a.       Set in task manager:

·        Launch “Task manager”

·        Open “File->Run new task” and choose “Create this task with administrativeprivileges

·        Enter command to run

“<Windbg Path>\windbg.exe”-I

b.       Set in registry

·        Addbelow registry:

Key:

For X86:  HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/AeDebug/Debugger

For X64: HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/WindowsNT/CurrentVersion/AeDebug/Debugger

Value:

auto = 1,”Debugger = <Windbg Path>\windbg.exe”-p 1%d -e%1d -g

 

Note: If app crashes, it will launch windbg and break automatically,you can use below command to generate crash dump file:

 .dump -ma C:\test.dmp”

 

Windbg Settings Via Kdnet

(Host compute must be Windows XP or later,and the target compute must be Windows 8 or later)

Target Computer:

·        Open CMD as Administrator

·        Run below bcdedit command:

bcdedit /debug on

bcdedit /set testsigning on

bcdedit /dbgsettings net hostip:w.x.y.z port:n key:key

(If not set ‘Key:key”, you need to copy the key generated by bcdedit)

         If thereis more than one network adapter intarget computer, run below command:

bcdedit /set “{dbgsettings}” busparamsPCI.DEVICE.FUNCTION

 

·        reboot this target compute

 

HostComputer:

In WinDbg, choose Kernel Debug -> NET tab, then enter Port Numberand Key:

 

Solutions For BSOD Dump Missing

Below is the solution from an BSOD but dump missingissue, it will save the dump to USB drive (D: disk is the USB drive).

·        Add below registry settings:

reg addHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl /vDedicatedDumpFile /t REG_SZ /d “D:\dedicateddumpfile.sys” /f

 

reg addHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl /v AutoReboot/t REG_DWORD /d 0x0 /f

 

regaddHKLM\SYSTEM\CurrentControlSet\Control\crashControl /v DumpFile /tREG_EXPAND_SZ /d “D:\MEMORY.DMP” /f

·        Remove USB drive after device BSODand dump file 100% generated

 

Reference

·        Windbg Help document

·        https://osgwiki.com/wiki/Missing_Windows_Dump_File 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值