Welcome to MSDN Blogs Sign in | Join | Help

Yiru on Debugging LCG

Yiru's got a great piece up on using SOS to debug code that was emitted using Whidbey's new Lightweight CodeGen feature.  Debugging any code written at the IL level can be tricky for anyone who doesn't have Partition III of ECMA committed to mind.  LCG makes it even more fun since the code is generated dynamically, so there's generally not any source to look at when figuring out the problem.  Yiru shows how to use the the SOS commands !DumpMD, !DumpIL and friends to help figure out what is wrong with the emitted method.

As I've mentioned a few times before in this blog WinDBG is my debugger of choice, and working with managed code all the time means knowing SOS is a must.  I'm always glad to learn a new trick or two about that particular extension.

Published Friday, May 27, 2005 3:03 PM by shawnfa
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Dynamic Assemblies and Declarative Security

Friday, May 27, 2005 7:50 PM by .Net Security Blog
Speaking of dynamic IL generation ...
Before Whidbey, the framework supplied two ways of creating code...

# Viewing IL at Debug Time

Wednesday, June 08, 2005 11:55 AM by .Net Security Blog
Last week, I mentioned Yiru’s post on using SOS to see the IL of a dynamically generated method. ...

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker