1. 使用!process 0 0 获取用户空间的所有的进程的信息
如果有多个相同进程名,!process 0 0 SampleExe.exe
kd> !process 0 0
**** NT ACTIVE PROCESS DUMP ****
PROCESS fe5039e0 SessionId: 0 Cid: 0008 Peb: 00000000 ParentCid: 0000
DirBase: 00030000 ObjectTable: fe529b68 TableSize: 50.
Image: System
2. 使用.process /i 指定进程地址
因为要对用户态代码下断点,这里不用/p,而使用/i
If you want to use the kernel debugger to set breakpoints in user space, use the /i option to switch the target to the correct process context.
3. g继续,再次发生int 3中断后,进程Context就已切换,使用!process查看确认。
4. reload符号文件。
5. bu, bp下用户态断点。