windbg常用指令之四:虚拟内存操作指令

来源:互联网 发布:泗阳县网络问政论坛 编辑:程序博客网 时间:2024/06/03 18:10

.dvalloc 申请虚拟内存

.dvfree 释放虚拟内存

.writemem 写内存到文件

.readmem 读文件到内存

!address 内存信息查看

!vprot 看虚拟内存保护属性

0:001> .dvalloc 1000Allocated 1000 bytes starting at 011500000:001> !vprot 01150000BaseAddress:       01150000AllocationBase:    01150000AllocationProtect: 00000040  PAGE_EXECUTE_READWRITERegionSize:        00001000State:             00001000  MEM_COMMITProtect:           00000040  PAGE_EXECUTE_READWRITEType:              00020000  MEM_PRIVATE0:001> !address 01150000 + 5                                     Failed to map Heaps (error 80004005)Usage:                  <unclassified>Allocation Base:        01150000Base Address:           01150000End Address:            01151000Region Size:            00001000Type:                   00020000MEM_PRIVATEState:                  00001000MEM_COMMITProtect:                00000040PAGE_EXECUTE_READWRITE0:001> db 0115000001150000  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150050  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150070  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................0:001> .readmem c:\stringtest.txt 01150000 L1000Reading 1000 bytesUnable to read data for 01150000, load is incompleteUnable to read data for 01150000, load is incomplete0:001> .readmem c:\stringtest.txt 01150000 L0n19Reading 13 bytes.0:001> db 0115000001150000  77 69 6e 64 62 67 20 73-74 72 69 6e 67 20 74 65  windbg string te01150010  73 74 2e 00 00 00 00 00-00 00 00 00 00 00 00 00  st..............01150020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150030  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150050  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................01150070  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................0:001> .writemem c:\stringtest2.txt 01150000 L0n19Writing 13 bytes.0:001> .dvfree 01150000 0Freed 0 bytes starting at 011500000:001> !vprot 01150000BaseAddress:       01150000AllocationBase:    00000000RegionSize:        0eeb0000State:             00010000  MEM_FREEProtect:           00000001  PAGE_NOACCESS0:001> !address 01150000                                     Failed to map Heaps (error 80004005)Usage:                  FreeBase Address:           01150000End Address:            10000000Region Size:            0eeb0000Type:                   00000000State:                  00010000MEM_FREEProtect:                00000001PAGE_NOACCESS

原创粉丝点击