2011. 2. 16. 11:04

connect wrong pdb

해당 module 과 일치하는 pdb 파일이 없는 경우가 종종 생길 수 있다.
물론 이런 상황은 해당 모듈 배포 관리에 대한 시스템에 큰 문제가 있다는 것을 뜻하는 것이긴 하지만...

pdb 는 해당 모듈을 빌드 시 unique id 가 뷰여되며 이것으로 해당 모듈과 pdb 파일이 같이 빌드 되었다는 것을 보장한다.
하지만 위 처럼 그런 pdb 가 없는 상황에서는 windbg 에 .symopt+0x40 command를 사용하면 wrong pdb 도 attach가 가능하다.

 
2010. 7. 15. 19:37

AppVerifier

2010. 6. 8. 16:33

Windows Error Reporting Setting

WER Setting

Vista 이후부터 새롭게 선보인 Error Report 메커니즘이다.
기본적으로 crash dump를 생성을 하지 않는데 Window Error Reporting key 아래에 LocalDumps 라는 키를 생성하면 crash dump를 만들어 준다.
자세한 사항은 위 link를 참조

reg 파일을 이용하여 registry setting 방법
dump 생성 위치 : C:\Users\Public\CrashDumps


crash_dump_settings_use_only_on_vista_and_later.zip


2009. 6. 30. 13:31

debug

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
2009. 5. 21. 18:39

debug

google-breakpad  : chrome에 들어간 crash dump module
Winspector : spy++ 보다 좀 더 기능이 들어간 제품인 것 같다
vtune : intel 에서 개발된 profiler로 instrument 방식이 아니라 pdb 파일만 있다면 기존 모듈 변경없이 profile을 할 수 있다.