. Process
. Process command to specify the process to use as the process context ( Set Process Context )
. Process shows the eprocess of the current session, which shows that the current process is Test.exe
[CPP]View PlainCopyPrint?
- kd> .process
- implicit process is now 821f5da0
- kd> ? @ $proc
- evaluate expression: -2111873632 = 821f5da0
- kd> !process 821f5da0 0
- process 821f5da0 sessionid: 0 cid: 06e8 peb: 7ffde000 parentcid: 0620
- DirBase: 02b40380 ObjectTable: e1112818 HandleCount: 20.
- image: test.exe
Kd>. Processimplicit process is now 821f5da0kd>? @ $procEvaluate expression: -2111873632 = 821f5da0kd>!process 821f5da0 0PROCESS 821f5da0 sessionid:0 Cid: 06e8 peb:7ffde000 parentcid:0620 dirbase:02b40380 objecttable:e1112818 handlecount: Image:test.exe.
The process context can be toggled through/r/p, which means that commands are used in the new process context, such as memory, but this does not change the target system, but only affects the output of WinDbg.
[CPP]View PlainCopyPrint?
- kd>. PROCESS/R/P 81e74b58
- Implicit process is now 81e74b58
- . Cache Forcedecodeuser Done
- Loading User Symbols
- PEB is paged out (Peb.ldr = 7ffdc00c). Type ". HH dbgerr001" for details
- Kd> DB 1000000
- 01000000 4d 5a (00-04)--------------FF FF
- 01000010 b8 xx xx xx xx 00-40 xx xx xx xx [email protected]
- 01000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 .......
- 01000030 xx xx xx 00-00 xx e0 00 00 00 .............
- 01000040 0e 1f Ba 0e b4 cd-21 b8, 4c cd .....!.. l.! Th
- 01000050 6f 72-61 6d, 6e 6e 6f is program Canno
- 01000060 (6e-20) 6e 4f, t be run in DOS
- 01000070 6d 6f 2e 0d 0d 0a-24 xx xx xx xx xx mode....$ ....
- kd>. PROCESS/R/P 821F5DA0
- Implicit process is now 821f5da0
- . Cache Forcedecodeuser Done
- Loading User Symbols
- .........
- Kd> DB 1000000
- 01000000?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000010?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000020?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000030?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000040?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000050?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000060?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
- 01000070 ?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
kd>. PROCESS/R/P 81e74b58 Implicit process is now 81e74b58.cache forcedecodeuser doneloading User SYMBOLSPEB is page D out (Peb.ldr = 7ffdc00c). Type ". HH dbgerr001" for detailskd> DB 100000001000000 4d 5a All-in-A-Z, 00-04-XX, ff FF, ... .. 01000010 B8 xx xx xx 00-40 xx xx xx xx (email protected]01000020 00 00 00 00 00 00 00 00-00 00 0 0 00 00 00 00 00 ......... 01000030 xx xx xx 00-00 xx e0 00 00 00 ............. 01000040 0e 1f Ba 0e b4 cd-21 b8, 4c cd .....!.. l.! Th01000050, 6f, 72-61 6d, 6e, 6e 6f is program canno01000060, 6e-20, 6e 20 4f T is run in DOS 01000070 6d 6f All-in 2e 0d 0d 0a-24 xx xx xx xx mode....$.......kd>. Process/ r/p 821f5da0 Implicit process is now 821f5da0.cache forcedecodeuser doneloading User symbols.........kd> db 100000001 000000?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000010?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000020?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000030?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000040?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000050?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000060?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ???????????????? 01000070?? ?? ?? ?? ?? ?? ?? ?? -?? ?? ?? ?? ?? ?? ?? ?? ????????????????
You can use/I to switch, it will be the actual process switching, so after the execution of the G, If you use/I, you must use the g (Go) command to execute the target. After a few seconds, the target is interrupted again into the debugger, and the specified process is activated and used as the current session context.
JPG change rar
Windbg-.process switching process (kernel)