我希望能够查看是否已设置或重置ManualResetEvent。有没有办法在dotnet核心运行时使用LLDB和SOS来看这个?
我可以获得对象的状态:
(lldb) sos DumpObj 00007f69c0028510
Name: System.Threading.ManualResetEvent
MethodTable: 00007f6b10701a88
EEClass: 00007f6b0fef9a80
Size: 40(0x28) bytes
File: /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.7/System.Private.CoreLib.dll
Fields:
MT Field Offset Type VT Attr Value Name
00007f6b106ef088 4000a30 10 System.IntPtr 1 instance 00000000000008E0 waitHandle
00007f6b106ed3d8 4000a31 8 ...es.SafeWaitHandle 0 instance 00007f69c0028538 safeWaitHandle
00007f6b106d36f8 4000a32 18 System.Boolean 1 instance 0 hasThreadAffinity
00007f6b106ef088 4000a33 780 System.IntPtr 1 shared static InvalidHandle
我假设我需要上面IntPtr引用的底层内核对象的状态。