如何使用Visual Studio 2005调试/运行.il文件 [英] how to debug/run .il file with visual studio 2005

查看:166
本文介绍了如何使用Visual Studio 2005调试/运行.il文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我对CIL语言很感兴趣.我在互联网上找到了Kerr的'example,并创建了文件test.il,内容如下:


Hello,

I am interesting experimentig with CIL language. I have found Kerr's 'example on the internet and created the file test.il with following content:


<身体>
.assembly \ extern \ mscorlib {}
.assemblytest3 {}
.static void void main()
{
.maxstack1
..entrypoint
ldstr您好,世界!"
调用void [mscorlib] System.Console :: WriteLine(string)
ret
}
.assembly extern mscorlib {}  
.assembly test3 {}  
 
.method static void main()  
{  
   .maxstack 1   
   .entrypoint  
   ldstr "Hello world!"  
   call void [mscorlib]System.Console::WriteLine(string)   
   ret  
}  

推荐答案

zorank

对不起,回复. DbgCLR.exe提供了图形界面来调试MSIL代码.有关更多信息,您可以参考 有调试MSIL代码时需要注意的一些事情.即时编译器在运行时将MSIL编译为机器代码.编译器会省略一些MSIL语句,因此调试器不会在这些语句上停止.您可以阅读 Mike Stall的.NET调试博客

zorank 

I’m sorry for the late reply. DbgCLR.exe provides a graphical interface to debug MSIL code. For more information, you can reference CLR Debugger (DbgCLR.exe). There are some things to be aware when you debugging MSIL code. The Just-In-Time complier compile MSIL to machine code at run time. Some MSIL sentences are omitted by the compiler, thus the debugger will not stop on those sentences. You can read Mike Stall's .NET Debugging Blog. It’s very helpful for debugging MSIL code. Any problems, please let me know.


这篇关于如何使用Visual Studio 2005调试/运行.il文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆