This is a combination of the Tess’s entry http://blogs.msdn.com/tess/archive/2008/04/28/setting-breakpoints-in-net-code-using-bpmd.aspx and Kristoffer’s http://blogs.msdn.com/kristoffer/archive/2007/01/02/setting-a-breakpoint-in-managed-code-using-windbg.aspx
The twist is in using directly !Name2EE and !DumpMT with setting a bp breakpoint with a command
First, getting the method table:
0:003> !Name2EE *!TestRWLocks.Program Module: 790c1000 (mscorlib.dll) -------------------------------------- Module: 00952354 (sortkey.nlp) -------------------------------------- Module: 00952010 (sorttbls.nlp) -------------------------------------- Module: 00932c5c (TestRWLocks.exe) Token: 0x02000002 MethodTable: 00933030 EEClass: 0093136c Name: TestRWLocks.Program -------------------------------------- Module: 7a441000 (System.dll) -------------------------------------- Module: 64891000 (System.Configuration.dll) -------------------------------------- Module: 637a1000 (System.Xml.dll) |
Second, finding the entry address:
0:003> !DumpMT -MD 00933030 |
Finally, setting a breakpoint with a command:
bp 00c701c0 ".echo --> Calling DummyMethod;!clrstack -p;g" |
Lets check if breakpoint is really set:
0:003> bl |
No comments:
Post a Comment