[Windbg] kernel dump에서 switching to user process
일단 명령어가 먹히는 기준이,
1. 라이브 디버깅이냐
2. 덤프를 떠온 것이냐의 차이가 있다.
1은 좀 더 쓸 수 있고 좋은 명령어가 많다.
일단 모든 프로세스 정보를 출력한다.
!process 0 0
> 모든 프로세스의 종류가 출력된다.
만약 프로세스 이름을 알고 있으면,
!process 0 0 a.exe
이런식으로 찾아도 된다.
1) 라이브 디버깅의 경우 .process /i EPROCESS주소 를 입력하면 해당 컨텍스트로 이동할 수 있다.
즉, 퍼온 덤프로는 쓸 수 없다.
연속기로 스레드는 .thread /p /r <threadid> 로 하면 된다.
windbg의 F1 설명서에 아래와 같이 나온다.
.process (Set Process Context)
The .process command specifies which process is used for the process context.
.process [/i] [/p [/r]] [/P] [Process]
Parameters
/i
(Windows XP and later; live debugging only;
2) 그렇다면 포기하느냐, 그렇지 않다. 퍼온 덤프일 때는
!process <PROCESS ID> 를 해서 맞춰준다.
맞춘 후에 일일이 스레드 컨텍스트 맞추기 귀찮으니 3)으로 확장 명령을 때려준다.
3) 여기에 아주 유용한 확장 명령어가 있다.
!dml_proc <해당 프로세스 컨텍슽느에 맞춰 프로세스/ 스레드별 정보로 출력된다>
docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-dml-proc?redirectedfrom=MSDN
dml_proc - Windows drivers
The dml_proc extension displays a list of processes and provides links for obtaining more detailed information about processes.
docs.microsoft.com
# 참고
Use kernel debugging to debug Device Fundamentals Reliability test failures
Use kernel debugging to debug Device Fundamentals Reliability test failures In this article --> This describes how to use common kernel debugging commands to debug Device Fundamentals Reliability test failures. Set symbols You can find Windows Hardware Lab
docs.microsoft.com
[WinDbg] Kernel 모드에서 특정 프로세스 디버깅하기
Kernel 모드에서 특정 프로세스 디버깅하기 이번 포스트에서는 WinDbg를 Debugee OS에 연결 한 후(Kernel-Mode), TestApp.exe프로세스를 디버깅하는 절차에 대해 설명합니다. n 디버깅 하려는 TestApp.exe의 EPROC..
thepassion.tistory.com
stackoverflow.com/questions/22249728/switching-to-user-stack-in-kernel-dumps
switching to user stack in kernel dumps
Is there a way to switch to user mode of a particular process in a kernel dump while doing postmortem debugging ? I remember doing this while live debugging using the .process command.
stackoverflow.com
platformengineer.tistory.com/53
System Hang 분석
VMware 에서 실행되는 Windows VM이 시스템 행 현상이 있다고 하여 분석을 진행해 보았습니다. 먼저 !vm 명령을 싱행해서 메모리 상태를 확인해 보았는데 별다른 문제가 확인되지 않았습니다. 0: kd> !vm
platformengineer.tistory.com
커널모드에서 유저모드 디버깅
WinDbg를 통해 커널 디버깅이 가능한건 다들 알고 계실 것입니다. 하지만 커널 디버깅 상태에서 특정 프로세스를 어떻게 디버깅 할까요?? 비록 유저모드 디버거로써 올디와 IDA라는 강력한 디버거
ezbeat.tistory.com