Windows Vista Kernel Remote Debugging 팁들(Tips)
Windows Vista Kernel Remote Debugging 팁들(Tips)
리버스 엔지니어링 2007/10/29 17:15하지만 몇달전 Vista에서 드라이버 개발을 처음 시작할 때에 가장 황당했던 것이 리모트 디버깅의 세팅이었다. 간단하게 boot.ini에서 다음 스트링을 추가해 주면 되었던 것이 복잡한 명령어들을 사용하도록 바뀐 것이다.
/debugport=com1 /baudrate=115200
간단한 구글링을 통해서 Debugging Windows Vista라는 문서를 찾았고, 사실 문서 내용이 장황하지만, 간단하게 다음 예제처럼 따라 하면 금방 원하는 디버깅이 활성화된 부트 엔트리를 생성할 수 있다.
C:\Windows\system32>bcdedit /copy {current} /d DebugEntry
The entry was successfully copied to {919494ed-866b-11dc-bcb1-000c294d72db}.
C:\Windows\system32>bcdedit /debug {919494ed-866b-11dc-bcb1-000c294d72db} ON
The operation completed successfully.
C:\Windows\system32>bcdedit /default {919494ed-866b-11dc-bcb1-000c294d72db}
The operation completed successfully.
물론 중간의 {} 사이의 랜덤 문자열은 때에 따라서 변하므로 주의해야 한다.
또 한가지 windbg의 명령행에서 Lord Of Ring0: Driver Debugging with WinDbg and VMWare의 예제는 resets=0를 지정하여 사용하지만, Vista의 경우에는 어떠한 이유에서인지 해당 값을 1로 세팅해서 사용해야만 했다.
"C:\Program Files\Debugging Tools for Windows\windbg" -b -k com:pipe,port=\\.\pipe\com_1,resets=1
이제 Vista에서 커널을 후빌 수 있는 만반의 준비가 된것이다.