:: 덤프파일 분석.
1. !analyze -v
2. .ecxr
:: 콜스택 분석.
3. kn - 콜스택, 프레임no
kP - 파라미터 출력.
4. .frame -nunordered_map time complexity
:: 쓰레드
5. ~ 쓰레드.
6. ~1s 1번쓰레드로 전환.
7. ~* :모든쓰레드. ~* kn 모든 쓰레드 콜스택
~0k : 0번쓰레드 콜스택
8 lastevent
9. x -> x 모듈!클래스::**
10. dv : dispaly local variable
11 dt : data type : dt this
12 sxe eh ; first exception. – first exception 에 대해 처리를 한다.
13. !heap -s -v command can reveal a corrupt heap
14 sxe ld: dll 파일명.dll -> dll 파일명 로딩되었을 때 브레이크 포인트.
igdumdim64!OpenAdapter
sxe ld: dll dxwnd9.dll
sxe ld: dll igdumdim64.dll
데드락 조사.
1. !locks 으로 락카운터가 증가한 항목을 찾는다.
2. 쓰레드 id를 이용해서 그 쓰레드로 스위칭한다.
3. kvn 3 입력하여, RtlEnterCriticalSection 를 입력한 후, 첫번쩨 Args 값을 찾는다.
4. !cs 3번에서 찾은 args값을 입력하여 소유가 어떤 쓰레드인지 확인한다.
http://stackoverflow.com/questions/26573238/windbg-how-to-read-the-locks-output
핸들릭.
1. https://blogs.msdn.microsoft.com/mattn/2009/09/08/tracking-handle-misuse-using-application-verifier-and-windbg/
///////////////////////////////////////////
원격디버깅.
.server tcp:port=8899
WinDbg.exe -remote tcp:server=LG,port=8899
attach -이미 디버깅상태에서 attach 시도.
1. -windbg -pv -p Process di [ cmd prompt]
2. windbg.exe /pe -pn process id
3. windbg.exe -pn notepad.exe
'유지보수 > WinDBG' 카테고리의 다른 글
WINDBG 명령어 (0) | 2017.11.16 |
---|---|
메모리 릭 _CrtSetDbgFlag, / _CrtSetBreakAlloc (0) | 2017.07.19 |
덤프파일 만들기 관련 글. (0) | 2017.04.26 |
처리되지 않은 c++ 예외 처리. (0) | 2017.04.21 |
컴파일 옵션. (0) | 2016.12.08 |