windbg - automatically continue when child process created and .childdbg 1 enabled

主宰稳场 提交于 2020-01-23 08:12:05

问题


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

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

回答1:


Use sxi ibp to ignore initial breakpoint events You may also want to ignore process exit sxi epr



来源:https://stackoverflow.com/questions/5340336/windbg-automatically-continue-when-child-process-created-and-childdbg-1-enabl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!