在使用sosex调试时,如果想查看某一个方法的反汇编代码时,可以使用命令!muf,只需提供方法地址,如:
0:029> !muf 000007ff001b064b
WebApplication1._Default.Go(int, string): void
tmp:int
000007ff`001b05d0 4c89442418 mov qword ptr [rsp+18h],r8
000007ff`001b05d5 89542410 mov dword ptr [rsp+10h],edx
000007ff`001b05d9 48894c2408 mov qword ptr [rsp+8],rcx
000007ff`001b05de 53 push rbx
000007ff`001b05df 4883ec30 sub rsp,30h
000007ff`001b05e3 c744242000000000 mov dword ptr [rsp+20h],0
000007ff`001b05eb 48b8988e1700ff070000 mov rax,7FF00178E98h
000007ff`001b05f5 8b00 mov eax,dword ptr [rax]
000007ff`001b05f7 85c0 test eax,eax
000007ff`001b05f9 7405 je 000007ff`001b0600
000007ff`001b05fb e8c0f4c1f1 call mscorwks!CorMarkThreadInThreadPool+0x3f30 (000007fe`f1dcfac0)
{
IL_0000: nop
000007ff`001b0600 90 nop
int tmp = a;
IL_0001: ldarg.1 (b)
IL_0002: stloc.0 (tmp)
000007ff`001b0601 8b442448 mov eax,dword ptr [rsp+48h]
000007ff`001b0605 89442420 mov dword ptr [rsp+20h],eax
throw new System.NullReferenceException("hello");
IL_0003: ldstr "hello"
IL_0008: newobj System.NullReferenceException::.ctor
000007ff`001b0609 48ba988b1700ff070000 mov rdx,7FF00178B98h
000007ff`001b0613 b90d000070 mov ecx,7000000Dh
000007ff`001b0618 e8f3a8d7f1 call mscorwks!PreBindAssembly+0x5a5d0 (000007fe`f1f2af10)
000007ff`001b061d 488bd8 mov rbx,rax
000007ff`001b0620 48b978302bf0fe070000 mov rcx,offset mscorlib_ni+0x453078 (000007fe`f02b3078)
000007ff`001b062a e8c1e19bf1 call mscorwks!IEE+0xbfa4 (000007fe`f1b6e7f0)
000007ff`001b062f 4889442428 mov qword ptr [rsp+28h],rax
000007ff`001b0634 488bd3 mov rdx,rbx
000007ff`001b0637 488b4c2428 mov rcx,qword ptr [rsp+28h]
000007ff`001b063c e87ff962f0 call mscorlib_ni+0x97ffc0 (000007fe`f07dffc0)
IL_000d: throw
000007ff`001b0641 488b4c2428 mov rcx,qword ptr [rsp+28h]
000007ff`001b0646 e8952be0f1 call mscorwks!CorLaunchApplication+0xed60 (000007fe`f1fb31e0)
000007ff`001b0641 488b4c2428 mov rcx,qword ptr [rsp+28h]
000007ff`001b0646 e8952be0f1 call mscorwks!CorLaunchApplication+0xed60 (000007fe`f1fb31e0)