goldshtn / msos

Command-line environment a-la WinDbg for executing SOS commands without having SOS available.
Other
96 stars 21 forks source link

Multiple entries to DbgEng mode produce duplicate output #31

Closed goldshtn closed 9 years ago

goldshtn commented 9 years ago

For example, open a dump file and run .dem. Quit with q. Repeat .dem again. Quit with q. Every time you enter with .dem, there is some engine output repeated multiple times. It seems that our call to SetOutputCallbacksWide is somehow being persisted across multiple DataTarget instances...

goldshtn commented 9 years ago

Tracked this down to CLRMD's DbgEngDataReader.Dispose not cleaning up the IDebugClient completely, so it will still have lingering output callbacks until the next GC-finalize cycle.

goldshtn commented 9 years ago

Fixed in a010785a28b536a9c4cd10e6563a0dcec3f161e7 by changing the Dispose method appropriately.