本文介绍了windbg - 创建子进程并启用 .childdbg 1 时自动继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Windbg 的启动脚本,并且想要调试子进程 (.childdbg 1).但是,一旦启用它,我发现创建子进程时windbg 会自动中断.我不确定为什么会发生这种情况,但这是我正在使用的脚本:
I'm using a startup script for windbg, and would like to debug child processes (.childdbg 1). However, once I enable it, i find that windbg automatically breaks when the child process is created. I'm not sure why this is occurring, but here's the script I'm using:
sxe -c ".echo ********** CLR 1st Chance Exception **********;!pe -nested;.echo ----------- CLRStack ----------;!clrstack;g" clr
sxe -c ".echo Child Process Created;g" cpr
sxe -c ".echo Child Process Exited;g" epr
.load psscor2.dll
.childdbg 1
我通过以下命令调用它:
I'm invoking this via the following command:
windbg.exe -Q -c "$<c:\path\startup.ini" Foo.exe
最后,这是windbg中的输出:
Lastly, here's the output in windbg:
(1d14.191c): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=0022f86c edx=778670b4 esi=fffffffe edi=00000000
eip=778c04f6 esp=0022f888 ebp=0022f8b4 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
ntdll!LdrpDoDebuggerBreak+0x2c:
778c04f6 cc int 3
推荐答案
使用 sxi ibp
忽略初始断点事件您可能还想忽略进程退出 sxi epr
Use sxi ibp
to ignore initial breakpoint eventsYou may also want to ignore process exit sxi epr
这篇关于windbg - 创建子进程并启用 .childdbg 1 时自动继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!