Happy Shrimp
http://blog.csdn.net/lights_joy/
Welcome reprint, but please keep the author information
to implement the display of memory blocks, you need to implement IDebugMemoryBytes2 interface, similar to this:
Class Ad7memorybytes:idebugmemorybytes2 { private ad7engine _engine; Public Ad7engine Engine {get {return _engine;}} Public ad7memorybytes (Ad7engine engine) { _engine = engine; } public int GetSize (out ulong pqwsize) { throw new notimplementedexception (); } public int ReadAt (IDEBUGMEMORYCONTEXT2 pstartcontext, uint dwcount, byte[] rgbmemory, out uint pdwread, ref uint Pdwunread Able) { ad7memoryaddress addr = Pstartcontext as ad7memoryaddress; Pdwread = dwcount; pdwunreadable = 0; return CONSTANTS.S_OK; } public int writeat (IDEBUGMEMORYCONTEXT2 pstartcontext, uint dwcount, byte[] rgbmemory) { throw new NotImplementedException (); }
when VS when the memory window is displayed, it is called:
The memory bytes as represented by the IDebugMemoryBytes2 object was for the program's image in memory and not any Memor Y//That is allocated when the program was executed. public int getmemorybytes (out IDebugMemoryBytes2 ppmemorybytes) { ppmemorybytes = new Ad7memorybytes (this); return CONSTANTS.S_OK; }
This only implements an empty interface, and does not implement the refresh of the actual memory value, but at this time it is possible to IDE see this effect in the following:
used in interfaces that read data gdb of the -data-read-memory after actually reading the data and populating it, it becomes this:
Get!
??
Application of Vs2013 in Linux development (31): Memory block display