<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx</link><description>Maybe it is a little to early to jump into this talk but I think for a user starting to use LCG, he will hit this problem in the first place. When you are emitting a dynamic method and doesn't have a way to persist it, you can imagine that it could be</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#422493</link><pubDate>Fri, 27 May 2005 11:25:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:422493</guid><dc:creator>barrkel</dc:creator><description>The ILGenerator.Emit() call has lots of overloads for the second parameter, including both int32 and int64. The LDC_I8 opcode tries to load an int64, but the C# type of 0 is int32, so the wrong overload is called, and not enough data gets written. If you change the line:&lt;br&gt;&lt;br&gt;ilgen.Emit(OpCodes.Ldc_I8, 0);&lt;br&gt;&lt;br&gt;to:&lt;br&gt;&lt;br&gt;ilgen.Emit(OpCodes.Ldc_I8, (long) 0);&lt;br&gt;&lt;br&gt;the program will work as expected.</description></item><item><title>Yiru on Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#422716</link><pubDate>Sat, 28 May 2005 00:07:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:422716</guid><dc:creator>.Net Security Blog</dc:creator><description>Yiru's got a great piece up on using SOS to debug code that was emitted using Whidbey's new Lightweight...</description></item><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#422789</link><pubDate>Sat, 28 May 2005 04:29:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:422789</guid><dc:creator>yirutang</dc:creator><description>You are right. ;-)</description></item><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#422950</link><pubDate>Sun, 29 May 2005 02:06:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:422950</guid><dc:creator>Anonymous</dc:creator><description>This is excellent information on LCG. Thanks, and keep up the great work!</description></item><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#430321</link><pubDate>Sat, 18 Jun 2005 01:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:430321</guid><dc:creator>yunjin</dc:creator><description>Nice post! It's exciting to see use of our new SOS command like DumpIL and DumpArray.&lt;br&gt;One comment: to make DumpMD work with decimal value, you could simply prepend &amp;quot;0n&amp;quot; to the number like &amp;quot;0n1541425360&amp;quot;. Or, you could even change the debugger engine's default number radix by the command &amp;quot;n 10&amp;quot; (&amp;quot;n 16&amp;quot; will set it back).</description></item><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#466530</link><pubDate>Thu, 15 Sep 2005 00:53:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:466530</guid><dc:creator>yirutang</dc:creator><description>I would like to save something just for my own record. Here is how our JIT dev would approach to see the LCG x86 code: &lt;br&gt;&lt;br&gt;From Shri: &lt;br&gt;&lt;br&gt;Here’s what I would do. I have not tried this out, so some steps might need to be twead. &lt;br&gt;&lt;br&gt;Write a program with method foo() that throws and catches a dummy exception (for step 3), and then creates and invokes an LCG method &lt;br&gt;Compile it and run under windbg &lt;br&gt;“sxe clr; g” in windbg to catch the dummy exception with foo() on the stack &lt;br&gt;“bp mscorjit!CILJit::compileMethod; g” to get to the JITing of the dynamic method. &lt;br&gt;“.loadby sos mscorwks” to load strike &lt;br&gt;“!dumpmd poi(poi(@esp+c))” to display the MethodDesc that gets passed to CILJit::compileMethod on the stack. &lt;br&gt;“!bpmd poi(poi(@esp+c))” to put a breakpoint in the dynamic method &lt;br&gt;“g” to get to the start of the dynamic method &lt;br&gt;“!u @eip” to display the x86 code</description></item><item><title>re: Debugging LCG</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#536165</link><pubDate>Tue, 21 Feb 2006 20:31:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:536165</guid><dc:creator>thanks</dc:creator><description>Your site is realy very interesting.</description></item><item><title>DebuggerVisualizer for DynamicMethod (Show me the IL)</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#805663</link><pubDate>Sun, 08 Oct 2006 21:59:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:805663</guid><dc:creator>Haibo Luo's weblog</dc:creator><description>&lt;p&gt;Have you ever tried DynamicMethod, one of the coolest features in the .NET 2.0? Hope you have; otherwise,&lt;/p&gt;
</description></item><item><title>LCG + Debuggability, and your feedback</title><link>http://blogs.msdn.com/yirutang/archive/2005/05/26/422373.aspx#1077624</link><pubDate>Tue, 14 Nov 2006 23:58:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1077624</guid><dc:creator>Mike Stall's .NET Debugging Blog</dc:creator><description>&lt;p&gt;I mentioned earlier that you can debug Reflection.Emit code . Unfortunately, Ref.Emit code can't be unloaded&lt;/p&gt;
</description></item></channel></rss>