Exemplo n.º 1
0
        protected BaseDebugStackFrame(DebugDocumentContext.Factory debugDocumentContextFactory,
                                      IChildrenProviderFactory childrenProviderFactory,
                                      DebugCodeContext.Factory debugCodeContextFactory,
                                      CreateDebugExpressionDelegate createExpressionDelegate,
                                      IVariableInformationFactory varInfoFactory,
                                      IVariableInformationEnumFactory varInfoEnumFactory,
                                      AD7FrameInfoCreator ad7FrameInfoCreator,
                                      IRegisterSetsBuilder registerSetsBuilder,
                                      IDebugEngineHandler debugEngineHandler, RemoteFrame frame,
                                      IDebugThread2 thread, IGgpDebugProgram debugProgram,
                                      ITaskExecutor taskExecutor)
        {
            this.debugDocumentContextFactory = debugDocumentContextFactory;
            this._childrenProviderFactory    = childrenProviderFactory;
            this.debugCodeContextFactory     = debugCodeContextFactory;
            this.createExpressionDelegate    = createExpressionDelegate;
            this.varInfoFactory      = varInfoFactory;
            this.varInfoEnumFactory  = varInfoEnumFactory;
            this.ad7FrameInfoCreator = ad7FrameInfoCreator;
            this.registerSetsBuilder = registerSetsBuilder;
            this.debugEngineHandler  = debugEngineHandler;
            this.debugProgram        = debugProgram;
            lldbFrame          = frame;
            this.thread        = thread;
            this._taskExecutor = taskExecutor;

            documentContext = new Lazy <IDebugDocumentContext2>(() => CreateDocumentContext());
            codeContext     = new Lazy <IDebugCodeContext2>(() => CreateCodeContext());
        }
        public void SetUp()
        {
            _lldbShell         = Substitute.For <ILLDBShell>();
            _breakpointManager = Substitute.For <IBreakpointManager>();
            _moduleFileLoader  = Substitute.For <IModuleFileLoader>();

            _debugger           = Substitute.For <SbDebugger>();
            _target             = Substitute.For <RemoteTarget>();
            _listenerSubscriber = Substitute.For <ILldbListenerSubscriber>();
            _process            = Substitute.For <SbProcess>();

            _debugEngineHandler = Substitute.For <IDebugEngineHandler>();
            _taskExecutor       = Substitute.For <ITaskExecutor>();
            _eventManager       = Substitute.For <IEventManager>();

            var exceptionManagerFactory =
                new LldbExceptionManager.Factory(new Dictionary <int, YetiCommon.Signal>());
            var exceptionManager = exceptionManagerFactory.Create(_process);

            _debugModuleCache = Substitute.For <IDebugModuleCache>();
            _debugProgram     = Substitute.For <IGgpDebugProgram>();

            _attachedProgram = new LldbAttachedProgram(
                _breakpointManager, _eventManager, _lldbShell, _moduleFileLoader,
                _debugEngineHandler, _taskExecutor, _debugProgram, _debugger, _target, _process,
                exceptionManager, _debugModuleCache, _listenerSubscriber, _remotePid);
        }
Exemplo n.º 3
0
 DebugProgram(
     JoinableTaskContext taskContext,
     ThreadCreator threadCreator,
     DebugDisassemblyStream.Factory debugDisassemblyStreamFactory,
     DebugDocumentContext.Factory documentContextFactory,
     DebugCodeContext.Factory codeContextFactory,
     ThreadEnumFactory threadEnumFactory,
     ModuleEnumFactory moduleEnumFactory,
     CodeContextEnumFactory codeContextEnumFactory,
     IDebugEngineHandler debugEngineHandler,
     IDebugProcess2 process,
     Guid programId,
     SbProcess lldbProcess,
     RemoteTarget lldbTarget,
     IDebugModuleCache debugModuleCache,
     bool isCoreAttach)
 {
     _id                            = programId;
     _process                       = process;
     _lldbProcess                   = lldbProcess;
     _lldbTarget                    = lldbTarget;
     _threadCache                   = new Dictionary <uint, IDebugThread>();
     _isCoreAttach                  = isCoreAttach;
     _debugEngineHandler            = debugEngineHandler;
     _taskContext                   = taskContext;
     _threadCreator                 = threadCreator;
     _debugDisassemblyStreamFactory = debugDisassemblyStreamFactory;
     _documentContextFactory        = documentContextFactory;
     _codeContextFactory            = codeContextFactory;
     _threadEnumFactory             = threadEnumFactory;
     _moduleEnumFactory             = moduleEnumFactory;
     _codeContextEnumFactory        = codeContextEnumFactory;
     _debugModuleCache              = debugModuleCache;
 }
Exemplo n.º 4
0
        public void SetUp()
        {
            var taskContext = new JoinableTaskContext();

            remoteThread = Substitute.For <RemoteThread>();
            mockThread   = Substitute.For <IDebugThread>();
            mockThread.GetRemoteThread().Returns(remoteThread);
            mockDebugEngineHandler            = Substitute.For <IDebugEngineHandler>();
            mockDebugThreadCreator            = Substitute.For <DebugProgram.ThreadCreator>();
            mockDebugDisassemblyStreamFactory = Substitute.For <DebugDisassemblyStream.Factory>();
            mockProcess = Substitute.For <IDebugProcess2>();
            var guid = new Guid();

            mockSbProcess              = Substitute.For <SbProcess>();
            mockRemoteTarget           = Substitute.For <RemoteTarget>();
            mockDocumentContextFactory = Substitute.For <DebugDocumentContext.Factory>();
            mockCodeContextFactory     = Substitute.For <DebugCodeContext.Factory>();
            threadEnumFactory          = new ThreadEnumFactory();
            moduleEnumFactory          = new ModuleEnumFactory();
            codeContextEnumFactory     = new CodeContextEnumFactory();

            mockDebugModuleCache = Substitute.For <IDebugModuleCache>();
            program = new DebugProgram.Factory(taskContext, mockDebugDisassemblyStreamFactory,
                                               mockDocumentContextFactory, mockCodeContextFactory, threadEnumFactory,
                                               moduleEnumFactory, codeContextEnumFactory)
                      .Create(mockDebugEngineHandler, mockDebugThreadCreator, mockProcess, guid,
                              mockSbProcess, mockRemoteTarget, mockDebugModuleCache, false);
        }
Exemplo n.º 5
0
 private DebugAsyncExpression(IDebugEngineHandler debugEngineHandler,
                              IAsyncExpressionEvaluator asyncEvaluator, ITaskExecutor taskExecutor,
                              IGgpDebugProgram program, IDebugThread2 thread) :
     base(debugEngineHandler, asyncEvaluator, taskExecutor, program, thread)
 {
     this.asyncEvaluator = asyncEvaluator;
     this.taskExecutor   = taskExecutor;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Send a breakpoint bound event to the SDM.
 /// </summary>
 public static void OnBreakpointBound(
     this IDebugEngineHandler handler, IPendingBreakpoint pendingBreakpoint,
     IEnumerable <IDebugBoundBreakpoint2> newlyBoundBreakpoints,
     BoundBreakpointEnumFactory breakpointBoundEnumFactory,
     IGgpDebugProgram program) =>
 handler.SendEvent(
     new BreakpointBoundEvent(pendingBreakpoint, newlyBoundBreakpoints,
                              breakpointBoundEnumFactory), program);
Exemplo n.º 7
0
 public virtual IEventManager Create(IDebugEngineHandler debugEngineHandler,
                                     IBreakpointManager breakpointManager,
                                     IGgpDebugProgram program, SbProcess process,
                                     LldbListenerSubscriber listenerSubscriber)
 {
     return(new LldbEventManager(debugEngineHandler, breakpointManager,
                                 _boundBreakpointEnumFactory, program, process,
                                 listenerSubscriber, _taskContext));
 }
Exemplo n.º 8
0
            public virtual IDebugAsyncExpression Create(RemoteFrame frame, string text,
                                                        IDebugEngineHandler debugEngineHandler, IGgpDebugProgram debugProgram,
                                                        IDebugThread2 thread)
            {
                IAsyncExpressionEvaluator evaluator = asyncEvaluatorFactory.Create(frame, text);

                return(new DebugAsyncExpression(debugEngineHandler, evaluator, taskExecutor,
                                                debugProgram, thread));
            }
Exemplo n.º 9
0
 public virtual IDebugStackFrame Create(AD7FrameInfoCreator ad7FrameInfoCreator,
                                        RemoteFrame frame, IDebugThread thread,
                                        IDebugEngineHandler debugEngineHandler,
                                        IGgpDebugProgram debugProgram) =>
 new DebugStackFrame(debugDocumentContextFactory, childrenProviderFactory,
                     debugCodeContextFactory, createExpressionDelegate,
                     varInfoFactory, varInfoEnumFactory, ad7FrameInfoCreator,
                     registerSetsBuilderFactory.Create(frame), debugEngineHandler,
                     frame, thread, debugProgram, taskExecutor);
Exemplo n.º 10
0
 public virtual IDebugModule3 Create(
     IModuleFileLoader moduleFileLoader, IModuleSearchLogHolder moduleSearchLogHolder,
     SbModule lldbModule, uint loadOrder, IDebugEngineHandler debugEngineHandler,
     IGgpDebugProgram program) => new DebugModule(_cancelableTaskFactory,
                                                  _actionRecorder,
                                                  _moduleFileLoadRecorderFactory,
                                                  _moduleUtil, moduleFileLoader,
                                                  moduleSearchLogHolder, lldbModule,
                                                  loadOrder, debugEngineHandler, program,
                                                  _symbolSettingsProvider);
Exemplo n.º 11
0
 protected DebugCommonExpression(IDebugEngineHandler debugEngineHandler,
                                 IAsyncExpressionEvaluator asyncEvaluator, ITaskExecutor taskExecutor,
                                 IGgpDebugProgram program, IDebugThread2 thread)
 {
     this.debugEngineHandler = debugEngineHandler;
     this.asyncEvaluator     = asyncEvaluator;
     this.taskExecutor       = taskExecutor;
     this.program            = program;
     this.thread             = thread;
 }
Exemplo n.º 12
0
 public IGgpDebugProgram Create(IDebugEngineHandler debugEngineHandler,
                                ThreadCreator threadCreator,
                                IDebugProcess2 process, Guid programId, SbProcess lldbProcess,
                                RemoteTarget lldbTarget,
                                IDebugModuleCache debugModuleCache, bool isCoreAttach)
 {
     return(new DebugProgram(_taskContext, threadCreator,
                             _debugDisassemblyStreamFactory,
                             _documentContextFactory, _codeContextFactory, _threadsEnumFactory,
                             _moduleEnumFactory, _codeContextEnumFactory, debugEngineHandler, process,
                             programId, lldbProcess, lldbTarget, debugModuleCache, isCoreAttach));
 }
Exemplo n.º 13
0
 private LldbBreakpointManager(
     JoinableTaskContext taskContext,
     DebugPendingBreakpoint.Factory pendingBreakpointFactory,
     DebugWatchpoint.Factory watchpointFactory,
     IDebugEngineHandler debugEngineHandler,
     IGgpDebugProgram debugProgram)
 {
     this.taskContext = taskContext;
     this.pendingBreakpointFactory = pendingBreakpointFactory;
     this.watchpointFactory        = watchpointFactory;
     this.debugEngineHandler       = debugEngineHandler;
     this.debugProgram             = debugProgram;
 }
Exemplo n.º 14
0
 LldbEventManager(IDebugEngineHandler debugEngineHandler,
                  IBreakpointManager breakpointManager,
                  BoundBreakpointEnumFactory boundBreakpointEnumFactory,
                  IGgpDebugProgram program, SbProcess process,
                  LldbListenerSubscriber listenerSubscriber, JoinableTaskContext taskContext)
 {
     _debugEngineHandler         = debugEngineHandler;
     _lldbBreakpointManager      = breakpointManager;
     _boundBreakpointEnumFactory = boundBreakpointEnumFactory;
     _program                = program;
     _lldbProcess            = process;
     _lldbListenerSubscriber = listenerSubscriber;
     _taskContext            = taskContext;
 }
Exemplo n.º 15
0
        public void SetUp()
        {
            lineEntry                  = new LineEntryInfo();
            mockDocumentContext        = Substitute.For <IDebugDocumentContext2>();
            mockThread                 = Substitute.For <IDebugThread>();
            mockDocumentContextFactory = Substitute.For <DebugDocumentContext.Factory>();
            mockDocumentContextFactory.Create(lineEntry).Returns(mockDocumentContext);
            mockDebuggerStackFrame = Substitute.For <RemoteFrame>();
            mockDebuggerStackFrame.GetLineEntry().Returns(lineEntry);
            mockDebuggerStackFrame.GetPC().Returns(TEST_PC);
            mockDebuggerStackFrame.GetFunctionName().Returns(NAME);
            mockDebuggerStackFrame.GetFunctionNameWithSignature().Returns(NAME);

            mockCodeContextFactory = Substitute.For <DebugCodeContext.Factory>();
            mockExpressionFactory  = Substitute.For <DebugExpression.Factory>();
            mockModuleCache        = Substitute.For <IDebugModuleCache>();

            mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>();
            mockProgram            = Substitute.For <IGgpDebugProgram>();

            taskExecutor = new TaskExecutor(new JoinableTaskContext().Factory);

            var childAdapterFactory     = new RemoteValueChildAdapter.Factory();
            var varInfoFactory          = new LLDBVariableInformationFactory(childAdapterFactory);
            var varInfoEnumFactory      = new VariableInformationEnum.Factory(taskExecutor);
            var childrenProviderFactory = new ChildrenProvider.Factory();
            var propertyFactory         =
                new DebugProperty.Factory(varInfoEnumFactory, childrenProviderFactory,
                                          Substitute.For <DebugCodeContext.Factory>(),
                                          new VsExpressionCreator(), taskExecutor);

            childrenProviderFactory.Initialize(propertyFactory.Create);
            var registerSetsBuilderFactory = new RegisterSetsBuilder.Factory(varInfoFactory);

            stackFrame = new DebugStackFrame.Factory(mockDocumentContextFactory,
                                                     childrenProviderFactory, mockCodeContextFactory, mockExpressionFactory.Create,
                                                     varInfoFactory, varInfoEnumFactory, registerSetsBuilderFactory, taskExecutor)
                         .Create(new AD7FrameInfoCreator(mockModuleCache), mockDebuggerStackFrame,
                                 mockThread, mockDebugEngineHandler, mockProgram);

            stackFrameAsync = new DebugStackFrameAsync.Factory(mockDocumentContextFactory,
                                                               childrenProviderFactory, mockCodeContextFactory, mockExpressionFactory.Create,
                                                               varInfoFactory, varInfoEnumFactory, registerSetsBuilderFactory, taskExecutor)
                              .Create(new AD7FrameInfoCreator(mockModuleCache), mockDebuggerStackFrame,
                                      mockThread, mockDebugEngineHandler, mockProgram);
        }
Exemplo n.º 16
0
        public void SetUp()
        {
            _mockDebuggerStackFrame = Substitute.For <RemoteFrame>();
            var childAdapterFactory = new RemoteValueChildAdapter.Factory();
            var varInfoFactory      = new LLDBVariableInformationFactory(childAdapterFactory);

            _vsExpressionCreator = new VsExpressionCreator();

            _metrics = Substitute.For <IMetrics>();
            var eventScheduler        = new EventSchedulerFake();
            var eventSchedulerFactory = Substitute.For <IEventSchedulerFactory>();

            eventSchedulerFactory.Create(Arg.Do <System.Action>(a => eventScheduler.Callback = a))
            .Returns(eventScheduler);
            var       timer = new TimerFake();
            const int minimumBatchSeparationMilliseconds = 1;
            var       batchEventAggregator =
                new BatchEventAggregator <ExpressionEvaluationBatch, ExpressionEvaluationBatchParams,
                                          ExpressionEvaluationBatchSummary>(minimumBatchSeparationMilliseconds,
                                                                            eventSchedulerFactory, timer);

            _expressionEvaluationRecorder =
                new ExpressionEvaluationRecorder(batchEventAggregator, _metrics);
            _timeSource = new MonotonicTimeSource();

            _taskExecutor = Substitute.ForPartsOf <FakeTaskExecutor>();

            var enumFactory = new VariableInformationEnum.Factory(_taskExecutor);

            var childrenProviderFactory = new ChildrenProvider.Factory();
            var debugPropertyFactory    = new DebugProperty.Factory(
                enumFactory, childrenProviderFactory, null, _vsExpressionCreator, _taskExecutor);

            _createPropertyDelegate = debugPropertyFactory.Create;

            childrenProviderFactory.Initialize(_createPropertyDelegate);

            _varInfoBuilder = new VarInfoBuilder(varInfoFactory);
            varInfoFactory.SetVarInfoBuilder(_varInfoBuilder);

            _engineCommandsMock = Substitute.For <IDebugEngineCommands>();

            _mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>();
            _mockProgram            = Substitute.For <IGgpDebugProgram>();
            _mockThread             = Substitute.For <IDebugThread2>();
        }
Exemplo n.º 17
0
 DebugModule(CancelableTask.Factory cancelableTaskFactory, ActionRecorder actionRecorder,
             ModuleFileLoadMetricsRecorder.Factory moduleFileLoadRecorderFactory,
             ILldbModuleUtil moduleUtil, IModuleFileLoader moduleFileLoader,
             IModuleSearchLogHolder moduleSearchLogHolder, SbModule lldbModule,
             uint loadOrder, IDebugEngineHandler engineHandler, IGgpDebugProgram program,
             ISymbolSettingsProvider symbolSettingsProvider)
 {
     _cancelableTaskFactory         = cancelableTaskFactory;
     _actionRecorder                = actionRecorder;
     _moduleFileLoadRecorderFactory = moduleFileLoadRecorderFactory;
     _moduleUtil            = moduleUtil;
     _moduleFileLoader      = moduleFileLoader;
     _moduleSearchLogHolder = moduleSearchLogHolder;
     _lldbModule            = lldbModule;
     _loadOrder             = loadOrder;
     _engineHandler         = engineHandler;
     _program = program;
     _symbolSettingsProvider = symbolSettingsProvider;
 }
Exemplo n.º 18
0
 DebugStackFrameAsync(DebugDocumentContext.Factory debugDocumentContextFactory,
                      IChildrenProviderFactory childrenProviderFactory,
                      DebugCodeContext.Factory debugCodeContextFactory,
                      CreateDebugExpressionDelegate createExpressionDelegate,
                      IVariableInformationFactory varInfoFactory,
                      IVariableInformationEnumFactory varInfoEnumFactory,
                      AD7FrameInfoCreator ad7FrameInfoCreator,
                      IRegisterSetsBuilder registerSetsBuilder,
                      IDebugEngineHandler debugEngineHandler, RemoteFrame frame,
                      IDebugThread2 thread, IGgpDebugProgram debugProgram,
                      ITaskExecutor taskExecutor) : base(debugDocumentContextFactory,
                                                         childrenProviderFactory,
                                                         debugCodeContextFactory,
                                                         createExpressionDelegate,
                                                         varInfoFactory, varInfoEnumFactory,
                                                         ad7FrameInfoCreator,
                                                         registerSetsBuilder,
                                                         debugEngineHandler, frame, thread,
                                                         debugProgram, taskExecutor)
 {
 }
Exemplo n.º 19
0
        public void SetUp()
        {
            _mockSbListener         = Substitute.For <SbListener>();
            _mockSbProcess          = Substitute.For <SbProcess>();
            _mockSbEvent            = Substitute.For <SbEvent>();
            _mockRemoteThread       = Substitute.For <RemoteThread>();
            _mockBreakpointManager  = Substitute.For <IBreakpointManager>();
            _mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>();

            _mockPendingBreakpoint1 = Substitute.For <IPendingBreakpoint>();
            _mockPendingBreakpoint2 = Substitute.For <IPendingBreakpoint>();
            _mockBoundBreakpoint1   = Substitute.For <IBoundBreakpoint>();
            _mockBoundBreakpoint2   = Substitute.For <IBoundBreakpoint>();
            _mockBoundBreakpoint3   = Substitute.For <IBoundBreakpoint>();
            _mockWatchpoint         = Substitute.For <IWatchpoint>();
            _mockProgram            = Substitute.For <IGgpDebugProgram>();

            MockEvent(EventType.STATE_CHANGED, StateType.STOPPED, false);
            MockListener(_mockSbEvent, true);
            MockThread(_mockRemoteThread, StopReason.BREAKPOINT, _breakpointStopData);
            MockProcess(new List <RemoteThread> {
                _mockRemoteThread
            });
            MockBreakpointManager();

            _mockListenerSubscriber = Substitute.For <LldbListenerSubscriber>(_mockSbListener);

            var threadContext = new FakeMainThreadContext();

            _eventManager =
                new LldbEventManager
                .Factory(new BoundBreakpointEnumFactory(), threadContext.JoinableTaskContext)
                .Create(_mockDebugEngineHandler, _mockBreakpointManager, _mockProgram,
                        _mockSbProcess, _mockListenerSubscriber);

            var lldbEventManager = _eventManager as LldbEventManager;

            lldbEventManager?.SubscribeToChanges();
        }
Exemplo n.º 20
0
        public void SetUp()
        {
            _mockCancelableTaskFactory = Substitute.For <CancelableTask.Factory>();
            _mockModuleUtil            = Substitute.For <ILldbModuleUtil>();
            _mockModuleUtil.HasSymbolsLoaded(Arg.Any <SbModule>()).Returns(false);
            _mockModuleFileLoader      = Substitute.For <IModuleFileLoader>();
            _mockModuleSearchLogHolder = Substitute.For <IModuleSearchLogHolder>();
            _mockModule         = Substitute.For <SbModule>();
            _mockActionRecorder = Substitute.For <ActionRecorder>(null, null);
            var mockModuleFileLoadRecorderFactory =
                Substitute.For <ModuleFileLoadMetricsRecorder.Factory>();

            _mockEngineHandler          = Substitute.For <IDebugEngineHandler>();
            _mockDebugProgram           = Substitute.For <IGgpDebugProgram>();
            _mockSymbolSettingsProvider = Substitute.For <ISymbolSettingsProvider>();
            _debugModule =
                new DebugModule
                .Factory(_mockCancelableTaskFactory, _mockActionRecorder,
                         mockModuleFileLoadRecorderFactory, _mockModuleUtil,
                         _mockSymbolSettingsProvider)
                .Create(_mockModuleFileLoader, _mockModuleSearchLogHolder, _mockModule,
                        _testLoadOrder, _mockEngineHandler, _mockDebugProgram);
        }
Exemplo n.º 21
0
 public LldbAttachedProgram(IBreakpointManager breakpointManager, IEventManager eventManager,
                            ILLDBShell lldbShell, IModuleFileLoader moduleFileLoader,
                            IDebugEngineHandler debugEngineHandler,
                            ITaskExecutor taskExecutor, IGgpDebugProgram debugProgram,
                            SbDebugger debugger, RemoteTarget target, SbProcess process,
                            IExceptionManager exceptionManager,
                            IDebugModuleCache debugModuleCache,
                            ILldbListenerSubscriber listenerSubscriber, uint remotePid)
 {
     _debugProgram       = debugProgram;
     _breakpointManager  = breakpointManager;
     _eventManager       = eventManager;
     _lldbShell          = lldbShell;
     _moduleFileLoader   = moduleFileLoader;
     _debugEngineHandler = debugEngineHandler;
     _taskExecutor       = taskExecutor;
     _debugger           = debugger;
     _target             = target;
     _process            = process;
     _exceptionManager   = exceptionManager;
     _debugModuleCache   = debugModuleCache;
     _listenerSubscriber = listenerSubscriber;
     RemotePid           = remotePid;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Called to send a DebugEvent with no associated thread to the Visual Studio SDM.
 /// </summary>
 public static int SendEvent(this IDebugEngineHandler handler, DebugEvent evnt,
                             IGgpDebugProgram program) =>
 handler.SendEvent(evnt, program, (IDebugThread2)null);
Exemplo n.º 23
0
 /// <summary>
 /// Send a breakpoint error event to the SDM.
 /// </summary>
 public static void OnBreakpointError(this IDebugEngineHandler handler,
                                      DebugBreakpointError breakpointError,
                                      IGgpDebugProgram program) =>
 handler.SendEvent(new BreakpointErrorEvent(breakpointError), program);
Exemplo n.º 24
0
 public virtual IBreakpointManager Create(IDebugEngineHandler debugEngineHandler,
                                          IGgpDebugProgram debugProgram)
 {
     return(new LldbBreakpointManager(taskContext, pendingBreakpointFactory,
                                      watchpointFactory, debugEngineHandler, debugProgram));
 }
Exemplo n.º 25
0
 /// <summary>
 /// Send a watchpoint bound event to the SDM.
 /// </summary>
 public static void OnWatchpointBound(this IDebugEngineHandler handler,
                                      IWatchpoint pendingWatchpoint,
                                      IGgpDebugProgram program) =>
 handler.SendEvent(new BreakpointBoundEvent(pendingWatchpoint), program);
Exemplo n.º 26
0
 /// <summary>
 /// Send a module load or unload event to the SDM.
 /// </summary>
 public static void OnModuleLoad(this IDebugEngineHandler handler, IDebugModule2 module,
                                 IGgpDebugProgram program) =>
 handler.SendEvent(new DebugModuleLoadEvent(module, true), program);
Exemplo n.º 27
0
 /// <summary>
 /// Send a symbols loaded event.
 /// </summary>
 public static void OnSymbolsLoaded(this IDebugEngineHandler handler, IDebugModule3 module,
                                    string moduleName, string errorMessage, bool loaded,
                                    IGgpDebugProgram program) =>
 handler.SendEvent(new DebugSymbolSearchEvent(module, moduleName, errorMessage, loaded),
                   program);
Exemplo n.º 28
0
 /// <summary>
 /// Called to abort the debug engine.
 /// </summary>
 public static void Abort(this IDebugEngineHandler handler, IGgpDebugProgram program,
                          ExitInfo exitInfo) =>
 handler.SendEvent(new ProgramDestroyEvent(exitInfo), program);
Exemplo n.º 29
0
 public virtual IDebugExpression Create(RemoteFrame frame, string text,
                                        IDebugEngineHandler debugEngineHandler,
                                        IGgpDebugProgram debugProgram, IDebugThread2 thread)
 => new DebugExpression(debugEngineHandler,
                        asyncEvaluatorFactory.Create(frame, text), taskExecutor,
                        debugProgram, thread);
 public void SetUp()
 {
     debugEngineHandler = Substitute.For <IDebugEngineHandler>();
     program            = Substitute.For <IGgpDebugProgram>();
 }