예제 #1
0
        private void Init()
        {
            if (!_initilized)
            {
                if (_sos == null)
                    _sos = new Extension("sos.dll");

                InitIfPointer();
                _dumpObjOutput = _sos.Call("!do", _address.ToHex());
                _properties = _dumpObjOutput.Split('\n', '\r');
                _initilized = true;
                Name = string.Empty;
            }

        }
예제 #2
0
        /// <summary>
        /// pass the type string GetMT("System.Web.dll!System.Web.HttpContext");
        /// </summary>
        /// <param name="type"></param>
        /// <returns>Method table</returns>
        public static string GetMT(string type)
        {

            var d = Debugger.Current;
            var sos = new Extension("sos.dll");
            string sMethodTable = sos.Call("!Name2EE "+type);
            var rgMt = new System.Text.RegularExpressions.Regex(@"MethodTable:\W(?<methodtable>\S*)", System.Text.RegularExpressions.RegexOptions.Multiline);
            var matches = rgMt.Match(sMethodTable);

            if (matches.Success)

                //d.Output("matched");
                return matches.Groups["methodtable"].Value;

            throw new Exception("unable to get Method table of HttpContext\n");

        }