示例#1
0
        void ProcessResult(string line, outputType eventType, Match matchResult)
        {
            // after getting the result and putting it to the lastResult var we are pulsing lock
            AutoResetEvent are = (AutoResetEvent)syncHandle [0];

            switch (eventType)
            {
            case outputType.interrupt:
                lastResult.threadId = Convert.ToInt32(matchResult.Groups [1].Value);
                lastResult.depth    = lastResult.depth_unprocessed = Convert.ToInt32(matchResult.Groups [2].Value);

                are.Set();
                break;

            case outputType.backtrace:
                var element = new HxcppStackInfo();
                //2: function name. 3: file name. 4: line number
                element.name = Convert.ToString(matchResult.Groups [2].Value);
                element.file = Convert.ToString(matchResult.Groups [3].Value);
                element.line = Convert.ToInt32(matchResult.Groups [4].Value);
                lastResult.stackElements.Add(element);
                lastResult.depth_unprocessed--;
                if (lastResult.depth_unprocessed < 0)
                {
                    are.Set();
                }
                break;

            case outputType.varsList:
                if (line != "}")
                {
                    lastResult.vars.Add(line);
                }
                else
                {
                    waitForVars = false;
                    are.Set();
                }
                break;
            }
        }
        void ProcessResult(string line, outputType eventType, Match matchResult)
        {
            // after getting the result and putting it to the lastResult var we are pulsing lock
            AutoResetEvent are = (AutoResetEvent)syncHandle [0];
            switch (eventType)
            {
            case outputType.interrupt:
                lastResult.threadId = Convert.ToInt32 (matchResult.Groups [1].Value);
                lastResult.depth = lastResult.depth_unprocessed = Convert.ToInt32 (matchResult.Groups [2].Value);

                are.Set ();
                break;
            case outputType.backtrace:
                var element = new HxcppStackInfo ();
                //2: function name. 3: file name. 4: line number
                element.name = Convert.ToString (matchResult.Groups [2].Value);
                element.file = Convert.ToString (matchResult.Groups [3].Value);
                element.line = Convert.ToInt32 (matchResult.Groups [4].Value);
                lastResult.stackElements.Add (element);
                lastResult.depth_unprocessed--;
                if (lastResult.depth_unprocessed < 0) {
                    are.Set ();
                }
                break;
            case outputType.varsList:
                if (line != "}") {
                    lastResult.vars.Add (line);
                } else {
                    waitForVars = false;
                    are.Set ();
                }
                break;
            }
        }