Beispiel #1
0
        public void Init()
        {
            filesystem     = new Mock <IFilesystem>();
            processHandler = new ProcessHandlerDouble();
            analysisResult = new SDResult();
            var coredump = new Mock <IFileInfo>();

            coredump.Setup(c => c.FullName).Returns(PATH + "dump.core");
            analysis = new GdbAnalyzer(filesystem.Object, processHandler, coredump.Object, analysisResult);

            this.analysisResult.ThreadInformation = new Dictionary <uint, SDThread>();
            SDThread thread = new SDThread();
            var      frames = new List <SDCombinedStackFrame> {
                new SDCDCombinedStackFrame("module", "method", 0, 0, 0, 0, 0, null)
            };

            thread.StackTrace = new SDCombinedStackTrace(frames);
            this.analysisResult.ThreadInformation.Add(0, thread);
            SDCDSystemContext context = new SDCDSystemContext()
            {
                FileName = PATH + "my-executable"
            };

            analysisResult.SystemContext = context;
        }
Beispiel #2
0
        public void InitAnalysis()
        {
            result         = new SDResult();
            filesystem     = new Mock <IFilesystem>();
            processHandler = new ProcessHandlerDouble();
            analysis       = new DebugSymbolAnalysis(filesystem.Object, processHandler, result);

            targetDebugFile = new Mock <IFileInfo>();
            targetDebugFile.Setup(f => f.FullName).Returns(DEBUG_FILE_PATH);
            filesystem.Setup(fs => fs.GetFile(It.IsAny <string>())).Returns(targetDebugFile.Object);
        }