Check out the most up-to-date version of this extension on GitHub. How hard could it be to read/write debug target memory in Visual Studio? That was the question that led me down the rabbit-hole of VS internals and the pile of spaghetti that is MSDN documentation. This plugin (which is only tested for VS2010 but may support VS2011 and VS2012 too) uses a lot of hacky techniques to steal information from Visual Studio internals in order to be able to access the debug target's memory and allow you to dump the memory into a raw binary file or load a raw binary into the debugee memory space. UsageOpen the tool window with Tools -> Dump Memory. Select Dump Memory or Load Memory at the bottom. Select the input/output file. Type in a valid VS debug expression for address (that means an integer "1024", hex "0x1000", or anything that VS recognizes as an integer "0x100+128*3"). Type in a number (if hex, it has to start with "0x") for the length if dumping and press Go. InspirationsMacropolygon Very similar to what I wanted to do, but was incomplete in implementation Image Watch extension An offical Microsoft extension that suprisingly did most of the same hacky things I had to do to get access to raw memory. Parts were stolen from their implementation. Guess even Microsoft had to fall victim to Microsoft's crappy limited documentation and APIs. License (BSD 3-Clause)Copyright (c) 2014, Yifan Lu All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|