Beispiel #1
0
 public BreakpointManager(IDebugProgram2 program, BasmBreakpointBackend backend, SourceFile sourceFile, EngineCallbacks callbacks)
 {
     _program    = program;
     _sourceFile = sourceFile;
     _backend    = backend;
     _callbacks  = callbacks;
 }
Beispiel #2
0
        public PendingBreakpoint(BreakpointManager manager, BasmBreakpointBackend backend, EngineCallbacks callbacks, IDebugBreakpointRequest2 pBPRequest)
        {
            _manager   = manager;
            _backend   = backend;
            _callbacks = callbacks;
            _bpRequest = pBPRequest;

            BP_REQUEST_INFO[] requestInfo = new BP_REQUEST_INFO[1];
            EngineUtils.RequireOk(_bpRequest.GetRequestInfo(enum_BPREQI_FIELDS.BPREQI_BPLOCATION, requestInfo));
            _requestInfo = requestInfo[0];
        }
Beispiel #3
0
        // After engine initialization, SDM calls LaunchSuspended to start the debuggee in a suspended state.
        // ResumeProcess and Attach are invoked next.

        public int LaunchSuspended(string pszServer, IDebugPort2 port, string exe, string args, string dir, string env, string options, enum_LAUNCH_FLAGS launchFlags, uint hStdInput, uint hStdOutput, uint hStdError, IDebugEventCallback2 ad7Callback, out IDebugProcess2 process)
        {
            Debug.Assert(_program == null);

            var sourceFile = new SourceFile(Path.Combine(dir, exe));
            var runner     = new BasmRunner(sourceFile, OnProgramStop);
            var bpBackend  = new BasmBreakpointBackend(runner, OnProgramStepComplete, OnProgramBreakComplete);

            _program = new Program(runner, bpBackend, sourceFile);

            var processId = _program.StartBasmProcess();

            EngineUtils.RequireOk(port.GetProcess(processId, out process));

            _callbacks         = new EngineCallbacks(this, _program, process, ad7Callback);
            _breakpointManager = new BreakpointManager(_program, bpBackend, sourceFile, _callbacks);

            Debug.WriteLine("IDebugEngineLaunch2.LaunchSuspended: returning S_OK");
            return(VSConstants.S_OK);
        }
Beispiel #4
0
 public BoundBreakpoint(BasmBreakpointBackend backend, PendingBreakpoint pendingBreakpoint, BreakpointResolution breakpointResolution)
 {
     _backend           = backend;
     _pendingBreakpoint = pendingBreakpoint;
     _resolution        = breakpointResolution;
 }
Beispiel #5
0
 public Program(BasmRunner runner, BasmBreakpointBackend bpBackend, SourceFile sourceFile)
 {
     _runner            = runner;
     _breakpointBackend = bpBackend;
     _sourceFile        = sourceFile;
 }