Hi all:
Did you ever use Memory Window to go about debugging? If yes, can you provide some scenarios?
Thanks
Hi all:
Did you ever use Memory Window to go about debugging? If yes, can you provide some scenarios?
Thanks
It's most useful in unmanaged (C++) development, where you tend to care more about the exact contents of memory than when doing .NET work.
Any time you have large blocks of data which you're working with directly it's useful - much better than presenting it as an array of bytes, for example - think bitmap image files or audio files, for example, where you want to look at headers and precise data layout.
I used it alot when I was working with SSE and SSE2 instructions. There are C++ equivalents for the assembler instructions which take variables instead of plain registers. That made programming a lot easier.
The memory window was useful in combination with the disassembly window. I wanted to know which instruction loaded my data and I wanted to know where it was.
The whole thing was an implementation of a complex image filtering system, where speed was crucial. Optimizing a few dozens of lines of code took weeks, so I would recommend it only for a few scenarios.
C++ project crashed or worked depending on the order of include statements. Used the memory window to have a look at the structures accessed leading to the crash, saw that they were aligned in one version of the code, but not in the other. Solution: 3rd party library used #pragma pack in the header, sometimes undone later, sometimes not.
I use it all the time.
Some concrete examples of things I do there: