[英]Why is the Disassembly Window of VS 2012 C# Showing x64 Assembly Rather Than IL?
When I use the disassembly window of Visual Studio 2012 for a C# project, I expect to see IL code. 当我将Visual Studio 2012的反汇编窗口用于C#项目时,我希望看到IL代码。 But it shows x64 assembly.
但它显示了x64汇编。 Is this caused by the jitter?
这是由抖动引起的吗? The assembly below is a portion of the assembly code disassembled.
下面的程序集是反汇编代码的一部分。
public static void Main() {
00000000 sub rsp,1C8h
00000007 xor eax,eax
00000009 mov qword ptr [rsp+60h],rax
0000000e mov qword ptr [rsp+58h],rax
00000013 mov qword ptr [rsp+50h],rax
00000018 mov qword ptr [rsp+38h],rax
0000001d mov qword ptr [rsp+30h],rax
00000022 mov qword ptr [rsp+28h],rax
00000027 mov qword ptr [rsp+20h],rax
0000002c xor eax,eax
0000002e mov dword ptr [rsp+4Ch],eax
00000032 mov dword ptr [rsp+48h],eax
00000036 mov dword ptr [rsp+44h],eax
0000003a mov dword ptr [rsp+40h],eax
0000003e mov rax,7F8786239C0h
00000048 mov eax,dword ptr [rax]
0000004a test eax,eax
0000004c je 0000000000000053
0000004e call 000000005FA4647C
The current C# .NET debugger always shows the native code for methods (at least for x86 and x64). 当前的C#.NET调试器始终显示方法的本机代码(至少对于x86和x64)。 This is the code produced from the IL by the JIT.
这是JIT从IL生成的代码。 If you want to see the IL for a method, I recommend taking a look at ILSpy .
如果要查看方法的IL,建议查看ILSpy 。
The dissembly window looks at the code which is running directly on the processor. 反汇编窗口查看直接在处理器上运行的代码。 Hence it will show assembler and not IL.
因此它将显示汇编程序而不显示IL。
If you want to see the raw IL of a C# method then look at a tool like ildasm or reflector 如果要查看C#方法的原始IL,请查看ildasm或反射器之类的工具
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.