windbg-.process切換進程(核心)

來源:互聯網
上載者:User

標籤:tail   express   static   images   nts   word   指定   code   cpp   

.process


.process 命令指定要用作進程內容相關的進程(Set Process Context)
.process顯示當前進程的EPROCESS,這裡顯示當前進程為test.exe

[cpp] view plain copy print?
  1. kd> .process  
  2. Implicit process is now 821f5da0  
  3. kd> ? @$proc  
  4. Evaluate expression: -2111873632 = 821f5da0  
  5. kd> !process 821f5da0 0  
  6. PROCESS 821f5da0  SessionId: 0  Cid: 06e8    Peb: 7ffde000  ParentCid: 0620  
  7.     DirBase: 02b40380  ObjectTable: e1112818  HandleCount:  20.  
  8.     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:  20.    Image: test.exe


可以通過/r /p來切換進程上下文,意味著接下的命令都使用新的進程上下文,比如記憶體,但這沒有改變目標系統,只是影響了windbg的輸出

[cpp] view plain copy print?
  1. kd> .process /r /p 81e74b58    
  2. Implicit process is now 81e74b58  
  3. .cache forcedecodeuser done  
  4. Loading User Symbols  
  5. PEB is paged out (Peb.Ldr = 7ffdc00c).  Type ".hh dbgerr001" for details  
  6. kd> db 1000000  
  7. 01000000  4d 5a 90 00 03 00 00 00-04 00 00 00 ff ff 00 00  MZ..............  
  8. 01000010  b8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00  [email protected]  
  9. 01000020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................  
  10. 01000030  00 00 00 00 00 00 00 00-00 00 00 00 e0 00 00 00  ................  
  11. 01000040  0e 1f ba 0e 00 b4 09 cd-21 b8 01 4c cd 21 54 68  ........!..L.!Th  
  12. 01000050  69 73 20 70 72 6f 67 72-61 6d 20 63 61 6e 6e 6f  is program canno  
  13. 01000060  74 20 62 65 20 72 75 6e-20 69 6e 20 44 4f 53 20  t be run in DOS   
  14. 01000070  6d 6f 64 65 2e 0d 0d 0a-24 00 00 00 00 00 00 00  mode....$.......  
  15. kd> .process /r /p 821f5da0    
  16. Implicit process is now 821f5da0  
  17. .cache forcedecodeuser done  
  18. Loading User Symbols  
  19. .........  
  20. kd> db 1000000  
  21. 01000000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  22. 01000010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  23. 01000020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  24. 01000030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  25. 01000040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  26. 01000050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  27. 01000060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  28. 01000070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
kd> .process /r /p 81e74b58  Implicit process is now 81e74b58.cache forcedecodeuser doneLoading User SymbolsPEB is paged out (Peb.Ldr = 7ffdc00c).  Type ".hh dbgerr001" for detailskd> db 100000001000000  4d 5a 90 00 03 00 00 00-04 00 00 00 ff ff 00 00  MZ..............01000010  b8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00  [email protected]01000020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01000030  00 00 00 00 00 00 00 00-00 00 00 00 e0 00 00 00  ................01000040  0e 1f ba 0e 00 b4 09 cd-21 b8 01 4c cd 21 54 68  ........!..L.!Th01000050  69 73 20 70 72 6f 67 72-61 6d 20 63 61 6e 6e 6f  is program canno01000060  74 20 62 65 20 72 75 6e-20 69 6e 20 44 4f 53 20  t be run in DOS 01000070  6d 6f 64 65 2e 0d 0d 0a-24 00 00 00 00 00 00 00  mode....$.......kd> .process /r /p 821f5da0  Implicit process is now 821f5da0.cache forcedecodeuser doneLoading User Symbols.........kd> db 100000001000000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????01000070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

可以用/i來切換,它會進行實際的進程切換,所以執行後先g一下,如果使用了 /i,必須使用g (Go)命令來執行目標。數秒之後,目標會再次中斷到調試器中,並且指定的Process 被啟用並用作當前進程上下文。 


jpg改rar

windbg-.process切換進程(核心)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.