Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public Program(BasmRunner runner, BasmBreakpointBackend bpBackend, SourceFile sourceFile)
 {
     _runner            = runner;
     _breakpointBackend = bpBackend;
     _sourceFile        = sourceFile;
 }
Ejemplo n.º 3
0
 public BasmBreakpointBackend(BasmRunner runner, Action onStepComplete, Action onBreakComplete)
 {
     _runner          = runner;
     _onStepComplete  = onStepComplete;
     _onBreakComplete = onBreakComplete;
 }