I discovered that when I compiled my C++ /clr app with the /clr option, I
have lost the ability to view (and thus debug) Intel assembly language code I
am generating. In my app I allocate a piece of memory with VirtualAlloc and
use the PAGE_EXECUtE_READWRITE flag, but when I attempt to type an address
from the allocated range into the Address: combo in the Disassembly window, I
get the following popup message:
The specified address cannot be displayed. There is no code at the supplied
location.
Is there something I should be doing that am I'm not (or perhaps something I
shouldn't be doing that I am)?
Any guidance would be greatly appreciated.
Regards,
Mike
Ole Nielsby - 22 Mar 2006 19:32 GMT
>I discovered that when I compiled my C++ /clr app with the
> /clr option, I have lost the ability to view (and thus debug)
> Intel assembly language code I am generating.
Worse than that, I can't debug MASM code linked into a
C++ /clr app. Sometimes it is possible to see snippets of
MASM source in the disassembler window together with
the disassembly, at other times the display is erratic.
I suspect this quirk has to do with the MASM code being
called from inside a message handler.
Not sure this is really a microsoft.public.vstudio.extensibility
topic...
mclagett - 23 Mar 2006 13:36 GMT
Hi --
I found an anser to this problem through the general Visual C++ forum, so I
thought I would post the solution. It turns out that assembly code can't be
viewed from the disassembly window if the currently active stack frame is a
managed one. The solution is to switch via the call stack to some native
function (probably the one that calls the assembly code) and then it will be
visible. This certainly worked for me.
> I discovered that when I compiled my C++ /clr app with the /clr option, I
> have lost the ability to view (and thus debug) Intel assembly language code I
[quoted text clipped - 14 lines]
>
> Mike