In Visual Studio 15, I am pulling up the memory window using Degug->Memory->Memory 1. In this window, I can type in either an address or an in-scope pointer while debugging to view the contents at that memory.
For instance:
int *p; //doesn't really matter what p is, but rather what it points to
*p = 5;
In the console, I can type 'p' and it will bring up a memory table showing 0xaabbccdd: 05 00 00 00 ...
I am working on a project which requires precise manipulation of values at memory locations, so I need to be efficient at reading these values; however, the current way in which they are displayed makes them very difficult to read. Normally, I would expect to read 5 in hexadecimal as 0x00000005, but in this format, it is much more foreign to me: the four sections are ordered in Big Endian, not Little Endian, and they are also reversed within each section. So for a more comprehensive example, *p = 0x12345678
becomes 0xaabbccdd: 21 43 65 87
and that is incredibly cumbersome to read. Is there a way to change the format of this in Visual Studio 15?
On the context menu for the memory window you can choose the units that bytes are grouped by. Personally I generally prefer the locals and watch window, the watch window in particular allows a great deal of control over how items are displayed. See https://msdn.microsoft.com/en-us/library/75w45ekt.aspx for details on that. You can also customize how types are displayed by creating a native visualization file, see https://msdn.microsoft.com/en-us/library/jj620914.aspx
User contributions licensed under CC BY-SA 3.0