ILSpy:
Debug.ProcedureEnter(ldtoken($1())); // WTF?
Reflector:
Crashes blatantly! Unhandled ‘ldtoken’ at offset 0000.
dotPeek:
Well well, at least it got this right! Not sure why it is an issue though…
// ISSUE: method reference Debug.ProcedureEnter(__methodref (eval\u002Dcore\u0028003\u0029.\u00241));
This means that ILSpy has encountered a code which is does not know how to convert to C#. I am not sure it is even posible to generate a valid C# in this case. The ILSpy’s solution in these cases is to use the unknown bytecodes as pseudo-functions so that you can still see what is happening. The dotPeek seems to have invented their own keywords.
I would call the “$1()” a bug though. It should display the method name.
So what is the parameter of Debug.ProcedureEnter? I believe that in this case ldtoken will give you RuntimeMethodHandle.
The C# way would be to create a delegate by ldftn + delegate constructor.
By: David Srbecky on July 20, 2011
at 12:18 pm
Yes, the parameter is RuntimeMethodHandle. It is simply used for tracking the current method (name), but more than likely will be more utilized for parameter info perhaps.
I do see your point regarding the made up name by dotPeek. 🙂
By: leppie on July 20, 2011
at 12:37 pm
I just found out about http://www.telerik.com/products/decompiling.aspx would be interesting to see how it stacks up to the rest.
By: Patrik on July 21, 2011
at 4:35 pm
What are you working on?
By: grettkeg on July 21, 2011
at 12:28 am
Hey Grant!
Working on an in-process lightweight debugger for IronScheme.
By: leppie on July 21, 2011
at 8:02 am
Just discovered this project, and looks nice!! 🙂
Is it still alive? 😐
By: boriel on January 11, 2014
at 12:57 pm
Nope, sorry. VS2008 pretty much killed the need for it.
By: leppie on May 21, 2014
at 7:28 am