/RELEASE 옵션.  - 바이너리내 타임스템프 생성 옵션,

PDB 파일이 있는데도, WinDBG가 pdb를 찾지 못하는 경우가 발생되는데, 타임스템프값이

바이너리파일에 기록이 되지 않았기 때문이다.



설정:

  VC++6.0: Link command.

  VC2010 이상:Proejct 속성->Configuration Properties->Linker->Advanced->Set Checksum

                        을 1로 설정.



/d2Zi+ ,  /Zo 옵션.


배포용 릴리즈 파일인 경우, 기본적으로 최적화가 되어 있는데, 최적화된 바이너리는 WinDBG에서  로컬변수,인라인함수 관련 변수를 콜스택에서 출력되지 않고, 조사해야 하는 번거로움이 발생된다.


VC++ 2012이상에서 이와같은 문제를 해결할 수 있는 컴파일 옵션을 제공한다.

다만, 2012 이전버전에서는 지원되지 않고 있다.



VC++ 2012 [비공식적 지원]

/d2Zi+ [비공식지원- ms내부에서 사용하는듯]

  Proejct 속성->Configuration Properties->C/C++ -> Command Line



VC++ 2013 이상

/Zo   [공식지원]

 Proejct 속성->Configuration Properties->C/C++ -> Command Line


-끝-

'유지보수 > WinDBG' 카테고리의 다른 글

WINDBG 명령어  (0) 2017.11.16
메모리 릭 _CrtSetDbgFlag, / _CrtSetBreakAlloc  (0) 2017.07.19
덤프파일 만들기 관련 글.  (0) 2017.04.26
처리되지 않은 c++ 예외 처리.  (0) 2017.04.21
명령어 정리  (1) 2016.12.07

1. https://backlogtool.com/git-guide/kr/intro/intro1_1.html - 입문,발전 순으로 보기 쉽게 설명. 원숭이도 이해할 수 있단다.

2.  쿠다 메모리 및 뱅크 충돌 

  



' > URL' 카테고리의 다른 글

OUTLOOK PLUG IN  (0) 2018.04.04
펌] 각 언어별 딥러닝~ 라이브러리.  (0) 2017.01.17
CUDA  (0) 2016.12.12
NVIDIA, CUDA  (0) 2016.11.23


:: 덤프파일 분석.

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.xlsx

'유지보수 > 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

+ Recent posts