如何在重新连接时制作windbg力负载符号? [英] How can I make windbg force load symbols on reconnect?

查看:87
本文介绍了如何在重新连接时制作windbg力负载符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个愚蠢的家伙.我在内核模块中遇到了一个问题,该问题仅每50-100次重新启动一次发生,在windbg中,我想中断该行,并且只要发现未发生问题,我的测试机就会重新启动,因此它可以重新启动并查看故障是否再次发生.

This is a goofy one. I've got a problem in a kernel module that only happens once every 50-100 reboots, I have the line in windbg that I want to break on, and I have the test machine rebooting whenever it detects the problem hasn't happened so it can reboot and see if the failure happens next time.

问题是我希望windbg在启动过程中的断点处停止,在那里我可以看到问题的发生. 但是,当测试计算机重新启动时,windbg会断开连接(因为计算机已消失),然后在Windows启动时再次连接.它加载了我的工作区,但似乎没有加载符号,因此错过了我的断点.

The issue is that I want windbg to stop on the breakpoint in the bootup process where I can see the problem happen. But when the test machine reboots, windbg gets disconncted (as the machine is gone), and then when windows boots it connects again. It loads my workspace, but it doesn't seem to load symbols and therefore misses my breakpoints.

如果将循环初始中断"设置为打开,则在连接windbg时,它将中断并加载我的符号,然后按f5键继续,然后如果中断了点,它将停止. 但是关键是要使它自动化,我不想每次测试计算机重新启动时都必须坐在那里并按f5键.

If I set the "cycle initial break" to on, then as soon as windbg is connected, it breaks and loads my symbols, and I hit f5 to continue and then if my breakpoint gets hit it stops. But the point is to automate this, I don't want to have to sit there and hit f5 every time the test machine reboots.

有没有办法强制windbg在连接上加载符号,即使它尚未停止?

Is there a way to force windbg to load symbols on connection even if it hasn't stopped yet?

推荐答案

使用

sxe -c ".reload /f;g" ibp ; .reboot

此命令将在中断时请求初始中断,以加载符号 并发出执行命令,您也可以在此处将断点设置为命令,它将像这样

this command will request an initial break when broken will load the symbols and issue a go you can also set your breakpoint as a command here and it will be acted upon like this

kd> sxe -c ".reload /f;bp nt!IopInitializeBootDrivers;g" ibp ; .reboot

Shutdown occurred at (Wed Aug  2 13:14:49.008 2017 (UTC + 5:30))...unloading all symbol tables.

Waiting to reconnect...
Connected to Windows XP 2600 x86 compatible target at (Wed Aug  2 13:15:08.627 2017 (UTC + 5:30)), ptr64 FALSE
Kernel Debugger connection established.  (Initial Breakpoint requested)


Loading Kernel Symbols

* does, press "g" and "Enter" again.                                          *
*                                                                             *
*******************************************************************************


Breakpoint 0 hit
nt!IopInitializeBootDrivers:
806aa839 8bff            mov     edi,edi

kd> k
 # ChildEBP RetAddr  
00 fc8d3694 806a06df nt!IopInitializeBootDrivers
01 fc8d383c 806a1a6c nt!IoInitSystem+0x712
02 fc8d3dac 8057aeff nt!Phase1Initialization+0x9b5
03 fc8d3ddc 804f88ea nt!PspSystemThreadStartup+0x34
04 00000000 00000000 nt!KiThreadStartup+0x16

这篇关于如何在重新连接时制作windbg力负载符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆