public static Thread stepInto() { if (DI.o2MDbg.IsActive) { DI.log.info("Steping Into attached process: {0}", DI.o2MDbg.ActiveProcess.Name); return(O2Thread.mtaThread(() => { DI.o2MDbg.execSync(O2MDbgCommands.stepInto()); if (DI.o2MDbg.currentLocation != null && false == DI.o2MDbg.currentLocation.hasSourceCodeDetails) // automatically stepout and over if we don't have the source code of the current location { var threadForStepOut = stepOut(); if (threadForStepOut != null) { threadForStepOut.Join(); // wait for its execution before calling the StepOver var threadForStepOver = stepOver(); if (threadForStepOver != null) { threadForStepOver.Join(); } } } })); } return(null); }
public static Thread startProcessUnderDebugger(string executableToStart) { if (executableToStart == null) { return(null); } DI.log.info("Starting process under debugger: {0}", executableToStart); return(O2Thread.mtaThread( () => { DI.o2MDbg.execSync(O2MDbgCommands.run(executableToStart)); DI.o2MDbg.BreakPoints.addArchivedBreakpoints(); DI.o2MDbg.execSync(O2MDbgCommands.stepInto()); })); }