'NTSD'에 해당되는 글 1건
- 2009.06.30 debug
2009. 6. 30. 13:31
debug
2009. 6. 30. 13:31 in text/develop environment
1. 프로그램 실행 시 자동으로 debugger 에 attach 하기
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\note.exe
위 항목 IFEO(Image File Execution Options)레지스트리로 프로그램 실행에 영향을 주는 항목들이 저장이 된다.
"Debugger"="C:\....\windbg.exe"
위 항목이 있으면 해당 프로세스(notepad.exe)가 실행 시 windbg가 attach 된다.
gflags /p /enable notepad.exe /debug "c:\...\windbg.exe"
gflags /p /disable notepad.exe
위 기능은 IFEO registry에 정보를 넣고 삭제하는 역활을 한다.
2. child process debugging
windbg -o cmd.exe /c notepad.exe
-o option을 사용하면 자식 프로세서에도 attach된다.
3. Set The NTSD as Postmortem Debugger