Пример #1
0
        private void Analyze(IDebugControl6 debugControl, string logfilepath)
        {
            debugControl.OpenLogFile(logfilepath, false);
            try {
                LoadExtensions(debugControl);

                ExecuteCommand(debugControl, "|.", "status about process");
                //ExecuteCommand(debugControl, ".loadby sos clr", "try to find sos"); // this will load sos.dll from the location of clr.dll. if symbol servers work correctly, this is not what we need
                ExecuteCommand(debugControl, ".cordll -ve -u -l", "verbose loading of mscordacwks");
                ExecuteCommand(debugControl, ".chain", "list loaded debug-extensions");
                ExecuteCommand(debugControl, "!eeversion");                 // clr version
                ExecuteCommand(debugControl, "!threads");
                ExecuteCommand(debugControl, "!tp", "threadpool info");
                ExecuteCommand(debugControl, "lmf");                 // list loaded .dlls
                ExecuteCommand(debugControl, ".exr -1");             // last exception
                ExecuteCommand(debugControl, "!analyze -v");
                ExecuteCommand(debugControl, "~* k", "native stacks");
                ExecuteCommand(debugControl, "~*e !clrstack", "managed stacks");
                ExecuteCommand(debugControl, "x *!", "symbol paths");                 // only shows symbols of modules that have been requested, so it's important to do this after listing stacks
            } finally {
                debugControl.CloseLogFile();
            }
        }