Fixed problem with bpmd not working sometimes.
authorMike McLaughlin <mikem@microsoft.com>
Wed, 16 Mar 2016 04:38:28 +0000 (21:38 -0700)
committerMike McLaughlin <mikem@microsoft.com>
Thu, 17 Mar 2016 16:14:34 +0000 (09:14 -0700)
commit36ac82a4c9a2137cc9b213adc340d3a4490d4811
tree34bc3f85f0728ae2f63a95191f6e6ee7d87076fa
parent37fcb847444a1cec60d7910eb825b07032ccbbbb
Fixed problem with bpmd not working sometimes.

Fix some too earlier SOS initialization problem. Now returns an error.

The DAC interface (IXCLRDataProcess) was being created everytime an command was run and the JIT and GC notification tables where being reinitialized each time losing any JIT notifications needed to resolve a breakpoint. Only create the DAC interface instance once. It does need to be flushed each time sos is entered though.

Enable the module load and unload and exception callbacks when the DAC instance is created. This is what windbg does on Windows (along with flushing the DAC each time the target is restarted). It simplifies the breakpoint code; it no longer needs to enable/disable these notification flags.

Cleaned up places where the DAC instance (direct calls to LoadClrDebugDll) and not released properly.
src/ToolBox/SOS/Strike/WatchCmd.cpp
src/ToolBox/SOS/Strike/exts.h
src/ToolBox/SOS/Strike/strike.cpp
src/ToolBox/SOS/Strike/util.cpp
src/debug/daccess/daccess.cpp
src/vm/ceemain.cpp