用WinDbg加载Reflector
Microsoft (R) Windows Debugger Version 6.6.0003.5
...
在加载mscorjit.dll时设异常,执行 0:000> sxe ld:mscorjit.dll 0:000> g
...
ModLoad: 79430000 7947d000 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\MSCORJIT.DLL
eax=00000000 ebx=00000000 ecx=00f60000 edx=7c92eb94 esi=00000000 edi=00000000
eip=7c92eb94 esp=0012e99c ebp=0012ea90 iopl=0 nv up ei ng nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000296
ntdll!KiFastSystemCallRet:
7c92eb94 c3 ret
载入sos.dll (WinDbg的插件,就在%windir%\Microsoft.NET\Framework\v1.1.4322\下。如果不能加载,请先设PATH环境变量) 0:000> .load sos
找Assembly.Load的MethodDesc 0:000> !name2ee mscorlib.dll System.Reflection.Assembly.Load
Loaded Son of Strike data table version 5 from "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll"
...
-----------------------
MethodDesc: 79ba35a8
Name: [DEFAULT] Class System.Reflection.Assembly System.Reflection.Assembly.Load(SZArray UI1)
-----------------------
给这个MethodDesc的m_CodeOrIL上加个断点(等RV添入) 0:000> ba w4 79ba35a8+4 0:000> g
Breakpoint 0 hit
...
RV应该添入了,设个断点 0:000> bp poi(79ba35a8+4) 0:000> g
Breakpoint 1 hit
eax=79a3bea8 ebx=01283de0 ecx=02447a68 edx=00b4568c esi=01285f54 edi=01285f30
eip=79a3bea8 esp=0012f644 ebp=0012f674 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000206
mscorlib_79990000+0xabea8:
79a3bea8 50 push eax