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 detachFromDebuggedProcess() { if (DI.o2MDbg.IsActive) { DI.log.info("Detaching from process: {0}", DI.o2MDbg.ActiveProcess.Name); return(O2Thread.mtaThread(() => DI.o2MDbg.execSync(O2MDbgCommands.detach()))); } return(null); }
public static Thread stepOut() { if (DI.o2MDbg.IsActive) { DI.log.info("Steping Out attached process: {0}", DI.o2MDbg.ActiveProcess.Name); return(O2Thread.mtaThread(() => DI.o2MDbg.execSync(O2MDbgCommands.stepBack()))); } return(null); }
public static Thread stopDebuggedProcess() { if (DI.o2MDbg.IsActive) { DI.log.info("Stopping attached process: {0}", DI.o2MDbg.ActiveProcess.Name); return(O2Thread.mtaThread(() => DI.o2MDbg.execSync(O2MDbgCommands.quit()))); } return(null); }
public static Thread continueAttachedProjet() { if (DI.o2MDbg.IsActive) { DI.log.info("Continuing (breaked into) attached process: {0}", DI.o2MDbg.ActiveProcess.Name); return(O2Thread.mtaThread(() => DI.o2MDbg.execSync(O2MDbgCommands.go()))); } 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()); })); }
public void startO2MDbgAndRunTestProcess() { o2MDbg = new O2MDbg(); o2MDbg.o2MdbgIsReady.WaitOne(); // make sure the o2Mdbg is ready Assert.That(File.Exists(mockObjects_CompiledExe.PathToCreatedAssemblyFile), "Test exe file was not created"); // Processes.Sleep(1000); // give it 1s to start the process Assert.That(!o2MDbg.IsActive && !o2MDbg.IsRunning, "At this stage both o2MDbg.IsActive and o2MDbg.IsRunning should be false"); Assert.That(o2MDbg.lastCommandExecutionMessage != "", "o2MDbg.lastCommandExecutionMessage was empty"); // start test process o2MDbg.execSync(O2MDbgCommands.run(mockObjects_CompiledExe.PathToCreatedAssemblyFile)); //Processes.Sleep(1000); // give it 1s to start Assert.That(o2MDbg.IsActive && !o2MDbg.IsRunning, "At this stage both o2MDbg.IsActive should be true and o2MDbg.IsRunning should be false"); }
private void llHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { DI.o2MDbg.executeMDbgCommand(O2MDbgCommands.help()); }