コード例 #1
0
ファイル: SymbolLoader.cs プロジェクト: googlestadia/vsi-lldb
 public Factory(ILldbModuleUtil moduleUtil, IBinaryFileUtil binaryFileUtil,
                IModuleFileFinder moduleFileFinder)
 {
     this.moduleUtil       = moduleUtil;
     this.binaryFileUtil   = binaryFileUtil;
     this.moduleFileFinder = moduleFileFinder;
 }
コード例 #2
0
ファイル: SymbolLoader.cs プロジェクト: googlestadia/vsi-lldb
 public SymbolLoader(ILldbModuleUtil moduleUtil, IBinaryFileUtil binaryFileUtil,
                     IModuleFileFinder moduleFileFinder, SbCommandInterpreter lldbCommandInterpreter)
 {
     this.moduleUtil             = moduleUtil;
     this.binaryFileUtil         = binaryFileUtil;
     this.moduleFileFinder       = moduleFileFinder;
     this.lldbCommandInterpreter = lldbCommandInterpreter;
 }
コード例 #3
0
 public void SetUp()
 {
     fileSystem     = new MockFileSystem();
     binaryFileUtil = Substitute.For <IBinaryFileUtil>();
     metrics        = Substitute.For <IMetrics>();
     checker        = new PreflightBinaryChecker(fileSystem, binaryFileUtil);
     action         = new ActionRecorder(metrics).CreateToolAction(
         ActionType.DebugPreflightBinaryChecks);
 }
コード例 #4
0
        public FlatSymbolStore(IFileSystem fileSystem, IBinaryFileUtil binaryFileUtil, string path)
            : base(false, false)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentException(
                          Strings.FailedToCreateFlatStore(Strings.PathNullOrEmpty));
            }

            _fileSystem     = fileSystem;
            _binaryFileUtil = binaryFileUtil;
            _path           = path;
        }
コード例 #5
0
 public SymbolPathParser(IFileSystem fileSystem, IBinaryFileUtil binaryFileUtil,
                         HttpClient httpClient, ICrashReportClient crashReportClient,
                         string defaultCachePath, string defaultSymbolStorePath,
                         IEnumerable <string> hostExcludeList = null)
 {
     this.fileSystem             = fileSystem;
     this.binaryFileUtil         = binaryFileUtil;
     this.httpClient             = httpClient;
     this.crashReportClient      = crashReportClient;
     this.defaultCachePath       = defaultCachePath;
     this.defaultSymbolStorePath = defaultSymbolStorePath;
     this.hostExcludeList        = new HashSet <string>(
         hostExcludeList ?? Enumerable.Empty <string>(), StringComparer.OrdinalIgnoreCase);
 }
コード例 #6
0
        public void SetUp()
        {
            searchLog = new StringWriter();

            mockBinaryFileUtil = Substitute.For <IBinaryFileUtil>();

            mockSuccessCommandReturnObject = Substitute.For <SbCommandReturnObject>();
            mockSuccessCommandReturnObject.GetOutput().Returns(LLDB_OUTPUT);
            mockSuccessCommandReturnObject.GetDescription().Returns("Success: " + LLDB_OUTPUT);
            mockSuccessCommandReturnObject.Succeeded().Returns(true);

            mockCommandInterpreter = Substitute.For <SbCommandInterpreter>();
            SetHandleCommandReturnValue(mockCommandInterpreter, COMMAND_WITH_MODULE_PATH,
                                        ReturnStatus.SuccessFinishResult,
                                        mockSuccessCommandReturnObject);

            mockPlatformFileSpec = Substitute.For <SbFileSpec>();
            mockPlatformFileSpec.GetDirectory().Returns(PLATFORM_DIRECTORY);
            mockPlatformFileSpec.GetFilename().Returns(BINARY_FILENAME);

            mockSymbolFileSpec = Substitute.For <SbFileSpec>();
            mockSymbolFileSpec.GetDirectory().Returns("");
            mockSymbolFileSpec.GetFilename().Returns(SYMBOL_FILE_NAME);

            mockBinaryFileSpec = Substitute.For <SbFileSpec>();
            mockBinaryFileSpec.GetDirectory().Returns(BINARY_DIRECTORY);
            mockBinaryFileSpec.GetFilename().Returns(BINARY_FILENAME);

            mockModuleFileFinder = Substitute.For <IModuleFileFinder>();
            SetFindFileReturnValue(PATH_IN_STORE);
            mockModuleUtil = Substitute.For <ILldbModuleUtil>();
            mockModuleUtil.HasSymbolsLoaded(Arg.Any <SbModule>()).Returns(false);

            symbolLoader = new SymbolLoader(mockModuleUtil, mockBinaryFileUtil,
                                            mockModuleFileFinder, mockCommandInterpreter);

            symbolFileInStore = Substitute.For <IFileReference>();
            symbolFileInStore.IsFilesystemLocation.Returns(true);
            symbolFileInStore.Location.Returns(PATH_IN_STORE);

            logSpy = new LogSpy();
            logSpy.Attach();
        }
コード例 #7
0
 public SymbolStoreSequence(IBinaryFileUtil binaryFileUtil) : base(false, false)
 {
     _binaryFileUtil = binaryFileUtil;
     _stores         = new List <ISymbolStore>();
 }
コード例 #8
0
 public PreflightBinaryChecker(IFileSystem fileSystem, IBinaryFileUtil binaryFileUtil)
 {
     this.fileSystem     = fileSystem;
     this.binaryFileUtil = binaryFileUtil;
 }