第一个SSCLI范例:echo的调试问题

 

今天好不容易把sslic2.0调试好。Hello world!!也终于面试。激动之余,开始了我的sscli之旅。

由于调试sscli的那几天,我没有停歇,直接看sscli2.0的书籍,都是英文版的。烦啊。所以就直接开始了第一个程序echo.cs。看过《Shared Source CLI 2.0 Internals》的朋友都应该知道这个程序吧,是第一个教学程序。Ctrl+cctrl+v。进行调试,运行csc /target:library /debug echo.cs。很简单的啊,我完全没想到这都会报错:

    error CS0583:  Internal Compiler Error (0x80000003 at address 7C921230): likely culprit is 'PARSE'.

    无语啊。后来我想到我进入sscli是运行env的时候用的checked,会不会是这个问题呢?我重新进入,env free;然后再csc /target:library /debug echo.cs。果然成功。看来是freecheckedfastchecked的问题了。

    现在来看看书上对这三个模式的讲解:

One of three different build variants can be established using command-line arguments to the script.

 In the checked build, symbols are generated for debugging and no compiler optimizations are used when building code. Some extra instrumentation is also built into the CLI execution engine. This mode is slow but very useful when debugging.

Free mode, in contrast, is built without debugging instrumentation. It is also built using compiler optimizations so that it can be as fast as possible and will have the best performance of the three variants.

Fastchecked is a compromise between the free and checked: it preserves debug symbols and instrumentation but also uses some compiler optimizations.

 

本人英语比较差,自己翻译了一点点,还是不拿出来献丑了,大家自己看吧。

posted on 2009-10-14 08:40  John Connor  阅读(420)  评论(1编辑  收藏  举报

导航