Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set CPU register values while debugging a managed application in Visual Studio

I am debugging a .NET application in Visual Studio 2010 RC using disassembly view. The code is optimized and JIT-ed. At a particular point, I need to change the ZR CPU flag so that the JNE instruction would take a different path. For some strange reason, the registers window in Visual Studio is read-only and does not let me change register values, nor can I use "set next instruction" command to force the jumping myself. Any ideas?

P.S.: Are there alternatives, like a command for the "command window"? I doubt I could do it from the "Immediate window" since I don't think .NET allows register access.

like image 765
Yuri Astrakhan Avatar asked Mar 04 '10 20:03

Yuri Astrakhan


People also ask

How to see Register values in Visual Studio?

To open the Registers window Enable address-level debugging, by selecting Enable address-level debugging in Tools (or Debug) > Options > Debugging.

How do I view flags in Visual Studio?

Click on the debug menu then go on registers.


1 Answers

i was able to debug and just in the "Immediate Window" do:

EFL = (some value)

and it seemed to work.

like image 96
shelleybutterfly Avatar answered Oct 21 '22 00:10

shelleybutterfly