无法快速设置 EtwTrace。它似乎至少适用于我自己的班级:
0:000> !name2ee EtwTraceDebug EtwTraceDebug.Program
Module: 001d2eac
Assembly: EtwTraceDebug.exe
Token: 02000002
MethodTable: 001d37fc
EEClass: 001d1260
Name: EtwTraceDebug.Program
0:000> !dumpclass 001d1260
Class Name: EtwTraceDebug.Program
mdToken: 02000002
File: C:\...\EtwTraceDebug.exe
Parent Class: 699b34f8
Module: 001d2eac
Method Table: 001d37fc
Vtable Slots: 4
Total Method Slots: 6
Class Attributes: 100000
Transparency: Critical
NumInstanceFields: 0
NumStaticFields: 1
MT Field Offset Type VT Attr Value Name
69d83aa8 4000001 20 System.Int32 1 static 6 test
0:000> !mdt EtwTraceDebug.Program
EtwTraceDebug.Program
[s]test: int
AppDomain 'EtwTraceDebug.exe' (004b8280): 0x00000006
但是,这可能是特定于版本的。使用的版本:
WinDbg 6.2.9200.16384
SOS 4.0.30319.18444
SOSEX 4.5.0.783 (reported as 4.5.0.0, built Fri Mar 07 16:17:26 2014)
SOSEX 4.5.0.759 (reported as 4.5.0.0, built Mon Dec 02 16:43:57 2013)
SOSEX 4.5.0.721 (reported as 4.5.0.0, built Mon Nov 25 17:49:59 2013)
SOSEX 4.5.0.692 (reported as 4.5.0.0, built Wed Oct 03 16:57:42 2012)