Dump only part of memory in VS 2005

Does anyone know if there is a way to dump just a chunk of memory to disk using VS? Basically, I want to give it an address and length and write the write to disk. This way I can make binary difference. Thank.

+2


source to share


3 answers


I'm surprised VS won't let you do this from a memory dump window ...

You can get what you want (or close to) using the VS Command Prompt window:



>Tools.LogCommandWindowOutput c:\temp\testdump.log /overwrite
>Debug.ListMemory /Count:16 0x00444B20
0x00444B20  00 00 00 00 00 00 00 00 13 00 12 00 86 07 19 00  ................
>Tools.LogCommandWindowOutput /off

      

If you want to use WinDBG (or ntsd / cdb), you can use the debug command .writemem

to do exactly what you want.

+3


source


I believe you can only store a binary mini drive. However, you can use the Debug Memory window and copy / paste to a text file to make a difference in memory.



0


source


OK, I tried this in VS 2008, but I believe VS 2005 should allow for the same:

If the memory is a string (if it does not contain null bytes), you can put the following in the viewport: (unsigned char*)(ptr),1024

to see 1kB in the text renderer. However, this stops at byte zero, so if you have binary data, it won't work.

0


source







All Articles