//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // // Performs a step. // LoggingUtils.PrintFunction(); try { if (AttachedEngine == null) { throw new InvalidOperationException(); } LoggingUtils.RequireOk(AttachedEngine.NativeDebugger.NativeProgram.Step(pThread, sk, Step)); //LoggingUtils.RequireOk (AttachedEngine.JavaDebugger.JavaProgram.Step (pThread, sk, Step)); return(Constants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); return(Constants.E_FAIL); } }
public async Task Step(int threadId, enum_STEPKIND kind, enum_STEPUNIT unit) { if ((unit == enum_STEPUNIT.STEP_LINE) || (unit == enum_STEPUNIT.STEP_STATEMENT)) { switch (kind) { case enum_STEPKIND.STEP_INTO: await MICommandFactory.ExecStep(threadId); break; case enum_STEPKIND.STEP_OVER: await MICommandFactory.ExecNext(threadId); break; case enum_STEPKIND.STEP_OUT: await MICommandFactory.ExecFinish(threadId); break; default: throw new NotImplementedException(); } } else if (unit == enum_STEPUNIT.STEP_INSTRUCTION) { await MICommandFactory.ExecStepInstruction(threadId); } else { throw new NotImplementedException(); } }
// Token: 0x06000182 RID: 386 RVA: 0x000060AC File Offset: 0x000042AC public int Step(IDebugThread2 t, enum_STEPKIND u_kind, enum_STEPUNIT u_step) { Thread thread = (Thread)t; if (u_step == enum_STEPUNIT.STEP_INSTRUCTION) { Utils.Message("STEP INSTRUCTION !"); } switch (u_kind) { case enum_STEPKIND.STEP_INTO: this.Session.StepLine(); break; case enum_STEPKIND.STEP_OVER: this.Session.NextLine(); break; case enum_STEPKIND.STEP_OUT: this.Session.Finish(); break; default: return(1); } return(0); }
/// <summary> /// Performs a step. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND stepKind, enum_STEPUNIT stepUnit) { // This method is deprecated. Use the IDebugProcess3::Step method instead. DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.Step kind={0}, step={1}", stepKind, stepUnit); Jdwp.StepDepth stepDepth; switch (stepKind) { case enum_STEPKIND.STEP_INTO: stepDepth = Jdwp.StepDepth.Into; break; case enum_STEPKIND.STEP_BACKWARDS: return(VSConstants.E_NOTIMPL); case enum_STEPKIND.STEP_OVER: stepDepth = Jdwp.StepDepth.Over; break; case enum_STEPKIND.STEP_OUT: stepDepth = Jdwp.StepDepth.Out; break; default: return(VSConstants.E_INVALIDARG); } var stepMode = stepUnit == enum_STEPUNIT.STEP_INSTRUCTION ? StepMode.SingleInstruction : StepMode.Line; StepAsync(new StepRequest((DalvikThread)pThread, stepDepth, stepMode)); return(VSConstants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // This method is deprecated. Use the IDebugProcess3::Step method instead. mProcess.Step((enum_STEPKIND)sk); return(VSConstants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { var thread = (MonoThread)pThread; _dispatcher.Queue(() => DebuggedProcess.Step(thread, sk)); return(VSConstants.S_OK); }
int IDebugProgram2.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Debug.WriteLine("AD7ProgramNode: Entering Step"); if (sk == enum_STEPKIND.STEP_BACKWARDS) { return(VSConstants.E_NOTIMPL); } Thread thread = new Thread(new ThreadStart(() => { // Just to ensure main method returns before running thread. Thread.Sleep(10); SteppingTypeEnum stepping = SteppingTypeEnum.None; switch (sk) { case enum_STEPKIND.STEP_INTO: stepping = SteppingTypeEnum.StepInto; break; case enum_STEPKIND.STEP_OVER: stepping = SteppingTypeEnum.StepOver; break; case enum_STEPKIND.STEP_OUT: stepping = SteppingTypeEnum.StepOut; break; } DebuggerManager.Instance.SteppingType = stepping; DebuggerManager.Instance.Run(); //Debugger.Step(); })); thread.Start(); return(VSConstants.S_OK); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // // Performs a step. // LoggingUtils.PrintFunction(); try { CLangDebuggeeThread thread = pThread as CLangDebuggeeThread; LoggingUtils.RequireOk(thread.GetThreadId(out uint threadId)); GdbClient.StepType stepType = (GdbClient.StepType)Step; switch (sk) { case enum_STEPKIND.STEP_INTO: { m_debugger.GdbClient.StepInto(threadId, stepType, false); break; } case enum_STEPKIND.STEP_OVER: { m_debugger.GdbClient.StepOver(threadId, stepType, false); break; } case enum_STEPKIND.STEP_OUT: { m_debugger.GdbClient.StepOut(threadId, stepType, false); break; } case enum_STEPKIND.STEP_BACKWARDS: { throw new NotImplementedException(); } } return(Constants.S_OK); } catch (NotImplementedException e) { LoggingUtils.HandleException(e); return(Constants.E_NOTIMPL); } catch (Exception e) { LoggingUtils.HandleException(e); return(Constants.E_FAIL); } }
public int Step(IDebugThread2 pThread, enum_STEPKIND kind, enum_STEPUNIT unit) { AD7Thread thread = (AD7Thread)pThread; try { if (null == thread || null == thread.GetDebuggedThread()) { return(Constants.E_FAIL); } _debuggedProcess.WorkerThread.RunOperation(() => _debuggedProcess.Step(thread.GetDebuggedThread().Id, kind, unit)); } catch (InvalidCoreDumpOperationException) { return(AD7_HRESULT.E_CRASHDUMP_UNSUPPORTED); } catch (Exception e) { _engineCallback.OnError(EngineUtils.GetExceptionDescription(e)); return(Constants.E_ABORT); } return(Constants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND kind, enum_STEPUNIT unit) { AD7Thread thread = (AD7Thread)pThread; _debuggedProcess.WorkerThread.RunOperation(() => _debuggedProcess.Step(thread.GetDebuggedThread().Id, kind, unit)); return(Constants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT stepUnit) { DebugHelper.TraceEnteringMethod(); var thread = (AD7Thread)pThread; _dispatcher.Queue(() => DebuggedProcess.Step(thread, sk, stepUnit)); return(VSConstants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT step) { if (sk == enum_STEPKIND.STEP_INTO || sk == enum_STEPKIND.STEP_OUT || sk == enum_STEPKIND.STEP_OVER) { _breakpointBackend.Step(); return(VSConstants.S_OK); } return(VSConstants.E_NOTIMPL); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // // Steps forward one instruction or statement in the process. // LoggingUtils.PrintFunction(); throw new NotImplementedException(); }
public async Task Step(int threadId, enum_STEPKIND kind, enum_STEPUNIT unit) { ThreadCache.MarkDirty(); if ((unit == enum_STEPUNIT.STEP_LINE) || (unit == enum_STEPUNIT.STEP_STATEMENT)) { switch (kind) { case enum_STEPKIND.STEP_INTO: await CommandFactory.ExecStepInto(threadId); break; case enum_STEPKIND.STEP_OVER: await CommandFactory.ExecStepOver(threadId); break; case enum_STEPKIND.STEP_OUT: await CommandFactory.ExecStepOut(threadId); break; default: throw new NotImplementedException(); } } else if (unit == enum_STEPUNIT.STEP_INSTRUCTION) { switch (kind) { case enum_STEPKIND.STEP_INTO: await CommandFactory.ExecStepInto(threadId); break; case enum_STEPKIND.STEP_OVER: await CommandFactory.ExecStepOver(threadId); break; case enum_STEPKIND.STEP_OUT: await CommandFactory.ExecStepOut(threadId); break; default: throw new NotImplementedException(); } } //RokuControllerOnRunModeEvent(); ProcessState = ProcessState.Running; }
/// <summary> /// Steps to the next statement. /// </summary> /// <param name="thread"></param> /// <param name="kind"></param> /// <param name="unit"></param> /// <returns>If successful, returns S_OK; otherwise, returns an error code.</returns> public int Step(IDebugThread2 thread, enum_STEPKIND kind, enum_STEPUNIT unit) { try { Program.Step(kind, unit); return(S_OK); } catch { return(E_FAIL); } }
void Step(enum_STEPKIND stepKind, enum_STEPUNIT stepUnit) { EnsureProgramIsSelected(); EnsureThreadIsSelected(); var curThread = _debugSessionContext.SelectedThread; SetRunningState(); // TODO: Figure out if we need to unwrap interop values passed back // to the debug engine. HResultChecker.Check( _debugSessionContext.DebugProgram.Step(curThread, stepKind, stepUnit)); }
public int Step(IDebugThread2 thread, enum_STEPKIND sk, enum_STEPUNIT step) { if (_isCoreAttach) { return(AD7Constants.E_CRASHDUMP_UNSUPPORTED); } var lldbThread = ((IDebugThread)thread).GetRemoteThread(); switch (step) { case enum_STEPUNIT.STEP_STATEMENT: switch (sk) { case enum_STEPKIND.STEP_INTO: lldbThread.StepInto(); break; case enum_STEPKIND.STEP_OVER: lldbThread.StepOver(); break; case enum_STEPKIND.STEP_OUT: lldbThread.StepOut(); break; default: return(VSConstants.E_NOTIMPL); } return(VSConstants.S_OK); case enum_STEPUNIT.STEP_INSTRUCTION: switch (sk) { case enum_STEPKIND.STEP_OVER: lldbThread.StepInstruction(true); break; case enum_STEPKIND.STEP_INTO: lldbThread.StepInstruction(false); break; case enum_STEPKIND.STEP_OUT: lldbThread.StepOut(); break; default: return(VSConstants.E_NOTIMPL); } return(VSConstants.S_OK); } return(VSConstants.E_NOTIMPL); }
public int Step(IDebugThread2 thread, enum_STEPKIND kind, enum_STEPUNIT unit) { switch (kind) { case enum_STEPKIND.STEP_BACKWARDS: return(VSConstants.E_NOTIMPL); } EventHandler <TargetEventArgs> stepFinished = null; stepFinished = (sender, args) => { Session.TargetStopped -= stepFinished; Send(new MonoStepCompleteEvent(), MonoStepCompleteEvent.IID, ThreadManager[args.Thread]); }; Session.TargetStopped += stepFinished; switch (kind) { case enum_STEPKIND.STEP_OVER: switch (unit) { case enum_STEPUNIT.STEP_INSTRUCTION: Session.NextInstruction(); break; default: Session.NextLine(); break; } break; case enum_STEPKIND.STEP_INTO: switch (unit) { case enum_STEPUNIT.STEP_INSTRUCTION: Session.StepInstruction(); break; default: Session.StepLine(); break; } break; case enum_STEPKIND.STEP_OUT: Session.Finish(); break; } return(VSConstants.S_OK); }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Debug.Assert(Worker.MainThreadId == Worker.CurrentThreadId); AD7Thread thread = (AD7Thread)pThread; // RunOperationAsync m_pollThread.RunOperation(new Operation(delegate { m_debuggedProcess.Step(thread.GetDebuggedThread(), (int)sk, (int)Step); })); return(Constants.S_OK); }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { var thread = ((AD7Thread)pThread).GetDebuggedThread(); switch (sk) { case enum_STEPKIND.STEP_INTO: thread.StepInto(); break; case enum_STEPKIND.STEP_OUT: thread.StepOut(); break; case enum_STEPKIND.STEP_OVER: thread.StepOver(); break; } return(VSConstants.S_OK); }
internal void Step(AD7Thread thread, enum_STEPKIND sk, enum_STEPUNIT stepUnit) { DebugHelper.TraceEnteringMethod(); if (!_isStepping) { if (currentStepRequest == null) { currentStepRequest = _vm.CreateStepRequest(thread.ThreadMirror); } else { currentStepRequest.Disable(); } _isStepping = true; if (stepUnit == enum_STEPUNIT.STEP_LINE || stepUnit == enum_STEPUNIT.STEP_STATEMENT) { switch (sk) { case enum_STEPKIND.STEP_INTO: currentStepRequest.Depth = StepDepth.Into; break; case enum_STEPKIND.STEP_OUT: currentStepRequest.Depth = StepDepth.Out; break; case enum_STEPKIND.STEP_OVER: currentStepRequest.Depth = StepDepth.Over; break; default: return; } } else if (stepUnit == enum_STEPUNIT.STEP_INSTRUCTION) { //TODO: by techcap } else { throw new NotImplementedException(); } currentStepRequest.Size = StepSize.Line; currentStepRequest.Enable(); } ResumeVM(); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT step) { switch (sk) { case enum_STEPKIND.STEP_INTO: case enum_STEPKIND.STEP_OUT: case enum_STEPKIND.STEP_OVER: _engineIntegration.Execute(step: true); return(VSConstants.S_OK); default: return(VSConstants.E_NOTIMPL); } }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { AD7Thread thread = (AD7Thread)pThread; try { _debuggedProcess.WorkerThread.RunOperation(() => _debuggedProcess.Step(thread.GetDebuggedThread().Id, sk, Step)); } catch (InvalidCoreDumpOperationException) { return(AD7_HRESULT.E_CRASHDUMP_UNSUPPORTED); } return(VSConstants.S_OK); }
public int Step(IDebugThread2 pThread, uint sk, uint step) { enum_STEPKIND stepKind = (enum_STEPKIND)sk; enum_STEPUNIT stepUnit = (enum_STEPUNIT)step; if (stepKind == enum_STEPKIND.STEP_BACKWARDS) { return(S_FALSE); } //Handle the stepping event _softDebugger.HandleStepEvent(sk, step); //Do step switch (stepKind) { case enum_STEPKIND.STEP_INTO: if (stepUnit == enum_STEPUNIT.STEP_INSTRUCTION) { _softDebugger.StepIntoInstruction(); } else { _softDebugger.StepIntoLine(); } break; case enum_STEPKIND.STEP_OUT: _softDebugger.StepOutOfMethod(); break; case enum_STEPKIND.STEP_OVER: if (stepUnit == enum_STEPUNIT.STEP_INSTRUCTION) { _softDebugger.StepOverInstruction(); } else { _softDebugger.StepOverLine(); } break; } return(S_OK); }
int IDebugProgram2.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { ThrowIfDisposed(); Task <bool> step; switch (sk) { case enum_STEPKIND.STEP_OVER: step = DebugSession.StepOverAsync(); break; case enum_STEPKIND.STEP_INTO: step = DebugSession.StepIntoAsync(); break; case enum_STEPKIND.STEP_OUT: goto default; // step = DebugSession.StepOutAsync(); // break; default: return(VSConstants.E_NOTIMPL); } step.ContinueWith(t => { // If step was interrupted midway (e.g. by a breakpoint), we have already reported breakpoint // hit event, and so we must not report step complete. Note that interrupting is not the same // as canceling, and if step was canceled, we must report step completion. bool completed = true; try { completed = t.GetAwaiter().GetResult(); } catch (OperationCanceledException) { } catch (MessageTransportException) { } if (completed) { Send(new AD7SteppingCompleteEvent(), AD7SteppingCompleteEvent.IID); } }); return(VSConstants.S_OK); }
// This method is deprecated. Use the IDebugProcess3::Step method instead. /// <summary> /// Performs a step. /// In case there is any thread synchronization or communication between threads, other threads in the program should run when a particular thread is stepping. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT step) { switch (sk) { case enum_STEPKIND.STEP_INTO: _process.Debugger.StepInto(); break; case enum_STEPKIND.STEP_OUT: _process.Debugger.StepOut(); break; case enum_STEPKIND.STEP_OVER: Process.Debugger.StepOver(); break; } return(VSConstants.S_OK); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { switch (sk) { case enum_STEPKIND.STEP_OVER: ctx.StepOver(); return(Microsoft.VisualStudio.VSConstants.S_OK); case enum_STEPKIND.STEP_INTO: ctx.StepInto(); return(Microsoft.VisualStudio.VSConstants.S_OK); case enum_STEPKIND.STEP_OUT: ctx.StepReturn(); return(Microsoft.VisualStudio.VSConstants.S_OK); } return(Microsoft.VisualStudio.VSConstants.S_FALSE); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Log.Debug("ScriptProgramNode: Entering Step"); switch (sk) { case enum_STEPKIND.STEP_OVER: Debugger.StepOver(); break; case enum_STEPKIND.STEP_INTO: Debugger.StepInto(); break; case enum_STEPKIND.STEP_OUT: Debugger.StepOut(); break; } return(VSConstants.S_OK); }
internal void Step(MonoThread thread, enum_STEPKIND sk) { if (isStepping) { return; } if (currentStepRequest == null) { currentStepRequest = _vm.CreateStepRequest(thread.ThreadMirror); } else { currentStepRequest.Disable(); } isStepping = true; switch (sk) { case enum_STEPKIND.STEP_INTO: currentStepRequest.Depth = StepDepth.Into; break; case enum_STEPKIND.STEP_OUT: currentStepRequest.Depth = StepDepth.Out; break; case enum_STEPKIND.STEP_OVER: currentStepRequest.Depth = StepDepth.Over; break; default: return; } currentStepRequest.Size = StepSize.Line; currentStepRequest.Enable(); _vm.Resume(); }
public int /*IDebugProgram3*/ Step( IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { if (sk == enum_STEPKIND.STEP_OVER) { Debugger.StepOver(); } else if (sk == enum_STEPKIND.STEP_INTO) { Debugger.StepInto(); } else if (sk == enum_STEPKIND.STEP_OUT) { Debugger.StepOut(); } else { return(VSConstants.E_FAIL); } return(VSConstants.S_OK); }
/// <summary> /// Causes the process to step one instruction or statement. /// ** This method should be used instead of IDebugProgram2::Step. /// </summary> /// <param name="pThread">An IDebugThread2 object representing the thread being stepped.</param> /// <param name="sk">One of the STEPKIND values.</param> /// <param name="Step">One of the STEPUNIT values.</param> /// <returns>If successful, returns S_OK; otherwise returns error code.</returns> /// <remarks> /// In case there is any thread synchronization or communication between threads, other threads in the process should run when a particular thread is stepping. /// /// Warning Do not send a stopping event or an immediate (synchronous) event to IDebugEventCallback2::Event while handling this call; otherwise the debugger might stop responding. /// </remarks> public virtual int Step( IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step ) { Logger.Debug( string.Empty ); return VSConstants.E_NOTIMPL; }
/// <summary> /// Performs a step. This method is deprecated. Use the IDebugProcess3::Step method instead. /// (http://msdn.microsoft.com/en-us/library/bb162134.aspx) /// </summary> /// <param name="pThread"> An IDebugThread2 object that represents the thread being stepped. </param> /// <param name="sk"> A value from the STEPKIND enumeration that specifies the kind of step. </param> /// <param name="Step"> A value from the STEPUNIT enumeration that specifies the unit of step. </param> /// <returns> If successful, returns S_OK; otherwise, returns an error code. </returns> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // Don't allow stepping through unknown code because it can lead to future problems with stepping and break-all. if (VSNDK.DebugEngine.EventDispatcher.m_unknownCode) { m_state = AD7Engine.DE_STATE.STEP_MODE; m_eventDispatcher.continueExecution(); return VSConstants.S_OK; } if (sk == enum_STEPKIND.STEP_INTO) { // Equivalent to F11 hotkey. // Sends the GDB command that resumes the execution of the inferior program, stopping at the next instruction, diving // into function if it is a function call. (http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html) GDBParser.addGDBCommand("-exec-step --thread " + this.m_threads[this._currentThreadIndex]._id); } else if (sk == enum_STEPKIND.STEP_OVER) { // Equivalent to F10 hotkey. // Sends the GDB command that resumes the execution of the inferior program, stopping at the next instruction, but // without diving into functions. (http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html) GDBParser.addGDBCommand("-exec-next --thread " + this.m_threads[this._currentThreadIndex]._id); } else if (sk == enum_STEPKIND.STEP_OUT) { // Equivalent to Shift-F11 hotkey. if (eDispatcher.getStackDepth(this.m_threads[this._currentThreadIndex]._id) > 1) { // Sends the GDB command that resumes the execution of the inferior program until the current function is exited. // (http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html) GDBParser.addGDBCommand("-exec-finish --thread " + this.m_threads[this._currentThreadIndex]._id + " --frame 0"); } else { // If this the only frame left, do a step-over. // Sends the GDB command that resumes the execution of the inferior program, stopping at the next instruction, but // without diving into functions. (http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html) GDBParser.addGDBCommand("-exec-next --thread " + this.m_threads[this._currentThreadIndex]._id); } } else if (sk == enum_STEPKIND.STEP_BACKWARDS) { return VSConstants.E_NOTIMPL; } else { m_engineCallback.OnStepComplete(); // Have to call this otherwise VS gets "stuck" } // Transition DE state m_state = AD7Engine.DE_STATE.STEP_MODE; return VSConstants.S_OK; }
/// <summary> /// Performs a step. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND stepKind, enum_STEPUNIT stepUnit) { // This method is deprecated. Use the IDebugProcess3::Step method instead. DLog.Debug(DContext.VSDebuggerComCall, "IDebugProgram2.Step kind={0}, step={1}", stepKind, stepUnit); Jdwp.StepDepth stepDepth; switch (stepKind) { case enum_STEPKIND.STEP_INTO: stepDepth = Jdwp.StepDepth.Into; break; case enum_STEPKIND.STEP_BACKWARDS: return VSConstants.E_NOTIMPL; case enum_STEPKIND.STEP_OVER: stepDepth = Jdwp.StepDepth.Over; break; case enum_STEPKIND.STEP_OUT: stepDepth = Jdwp.StepDepth.Out; break; default: return VSConstants.E_INVALIDARG; } StepAsync(new StepRequest((DalvikThread) pThread, stepDepth)); return VSConstants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. /// <summary> /// Performs a step. /// /// In case there is any thread synchronization or communication between threads, other threads in the program should run when a particular thread is stepping. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { if (_mixedMode) { return VSConstants.E_NOTIMPL; } var thread = ((AD7Thread)pThread).GetDebuggedThread(); switch (sk) { case enum_STEPKIND.STEP_INTO: thread.StepInto(); break; case enum_STEPKIND.STEP_OUT: thread.StepOut(); break; case enum_STEPKIND.STEP_OVER: thread.StepOver(); break; } return VSConstants.S_OK; }
/// <summary> /// Performs a step. This method is deprecated. Use the IDebugProcess3::Step method instead. /// (http://msdn.microsoft.com/en-us/library/bb162134.aspx) /// Not implemented because this class is not used by the debug engine. Read the description of this class at the top. /// </summary> /// <param name="pThread"> An IDebugThread2 object that represents the thread being stepped. </param> /// <param name="sk"> A value from the STEPKIND enumeration that specifies the kind of step. </param> /// <param name="Step"> A value from the STEPUNIT enumeration that specifies the unit of step. </param> /// <returns> If successful, returns S_OK; otherwise, returns an error code. </returns> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { return VSConstants.S_OK; }
int IDebugProgram2.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { throw new NotImplementedException(); }
public int Step(IDebugThread2 pThread, enum_STEPKIND kind, enum_STEPUNIT unit) { AD7Thread thread = (AD7Thread)pThread; _debuggedProcess.WorkerThread.RunOperation(() => _debuggedProcess.Step(thread.GetDebuggedThread().Id, kind, unit)); return Constants.S_OK; }
/// <summary> /// Steps forward one instruction or statement in the process. /// </summary> int IDebugProcess3.Step(IDebugThread2 pThread, enum_STEPKIND stepKind, enum_STEPUNIT stepUnit) { DLog.Debug(DContext.VSDebuggerComCall, "IDebugProcess3.Step"); return VSConstants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // Don't allow stepping through unknown code because it can lead to future problems with stepping and break-all // resetStackFrames(); if (VSNDK.DebugEngine.EventDispatcher.m_unknownCode) { m_state = AD7Engine.DE_STATE.STEP_MODE; m_eventDispatcher.continueExecution(); return VSConstants.S_OK; } if (sk == enum_STEPKIND.STEP_INTO) { // F11 GDBParser.addGDBCommand("-exec-step --thread " + this.m_threads[this._currentThreadIndex]._id); // ??? Create a method to inspect all of the current variables } else if (sk == enum_STEPKIND.STEP_OVER) { // F10 GDBParser.addGDBCommand("-exec-next --thread " + this.m_threads[this._currentThreadIndex]._id); // ??? Create a method to inspect all of the current variables } else if (sk == enum_STEPKIND.STEP_OUT) { // Shift-F11 if (eDispatcher.getStackDepth(this.m_threads[this._currentThreadIndex]._id) > 1) { GDBParser.addGDBCommand("-exec-finish --thread " + this.m_threads[this._currentThreadIndex]._id + " --frame 0"); } else { // If this the only frame left, do a step-over GDBParser.addGDBCommand("-exec-next --thread " + this.m_threads[this._currentThreadIndex]._id); } // ??? Create a method to inspect all of the current variables } else if (sk == enum_STEPKIND.STEP_BACKWARDS) { return VSConstants.E_NOTIMPL; } else { m_engineCallback.OnStepComplete(); // Have to call this otherwise VS gets "stuck" } // Transition DE state // Debug.Assert(m_state == AD7Engine.DE_STATE.BREAK_MODE); m_state = AD7Engine.DE_STATE.STEP_MODE; return VSConstants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. /// <summary> /// Performs a step. /// In case there is any thread synchronization or communication between threads, other threads in the program should run when a particular thread is stepping. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT step) { switch (sk) { case enum_STEPKIND.STEP_INTO: _process.Debugger.StepInto(); break; case enum_STEPKIND.STEP_OUT: _process.Debugger.StepOut(); break; case enum_STEPKIND.STEP_OVER: Process.Debugger.StepOver(); break; } return VSConstants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. /// <summary> /// Performs a step. /// /// In case there is any thread synchronization or communication between threads, other threads in the program should run when a particular thread is stepping. /// </summary> public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT step) { DebugWriteCommand("Step"); var thread = ((AD7Thread)pThread).GetDebuggedThread(); switch (sk) { case enum_STEPKIND.STEP_INTO: thread.StepInto(); break; case enum_STEPKIND.STEP_OUT: thread.StepOut(); break; case enum_STEPKIND.STEP_OVER: thread.StepOver(); break; } return VSConstants.S_OK; }
public int Step(IDebugThread2 pThread, enum_STEPKIND kind, enum_STEPUNIT unit) { AD7Thread thread = (AD7Thread)pThread; try { if (null == thread || null == thread.GetDebuggedThread()) { return Constants.E_FAIL; } _debuggedProcess.WorkerThread.RunOperation(() => _debuggedProcess.Step(thread.GetDebuggedThread().Id, kind, unit)); } catch (InvalidCoreDumpOperationException) { return AD7_HRESULT.E_CRASHDUMP_UNSUPPORTED; } return Constants.S_OK; }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Debug.WriteLine("AD7Process: Step"); return VSConstants.S_OK; }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Log.Debug("ScriptProgramNode: Entering Step"); switch(sk) { case enum_STEPKIND.STEP_OVER: Debugger.StepOver(); break; case enum_STEPKIND.STEP_INTO: Debugger.StepInto(); break; case enum_STEPKIND.STEP_OUT: Debugger.StepOut(); break; } return VSConstants.S_OK; }
internal void Step(AD7Thread thread, enum_STEPKIND sk, enum_STEPUNIT stepUnit) { if (!isStepping) { if (currentStepRequest == null) currentStepRequest = _vm.CreateStepRequest(thread.ThreadMirror); else { currentStepRequest.Disable(); } isStepping = true; if (stepUnit == enum_STEPUNIT.STEP_LINE || stepUnit == enum_STEPUNIT.STEP_STATEMENT) { switch (sk) { case enum_STEPKIND.STEP_INTO: currentStepRequest.Depth = StepDepth.Into; break; case enum_STEPKIND.STEP_OUT: currentStepRequest.Depth = StepDepth.Out; break; case enum_STEPKIND.STEP_OVER: currentStepRequest.Depth = StepDepth.Over; break; default: return; } } else if (stepUnit == enum_STEPUNIT.STEP_INSTRUCTION) { //TODO: by techcap } else throw new NotImplementedException(); currentStepRequest.Size = StepSize.Line; currentStepRequest.Enable(); } _vm.Resume(); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int Step (IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { // // Performs a step. // LoggingUtils.PrintFunction (); try { CLangDebuggeeThread thread = pThread as CLangDebuggeeThread; uint threadId; LoggingUtils.RequireOk (thread.GetThreadId (out threadId)); GdbClient.StepType stepType = (GdbClient.StepType)Step; switch (sk) { case enum_STEPKIND.STEP_INTO: { m_debugger.GdbClient.StepInto (threadId, stepType, false); break; } case enum_STEPKIND.STEP_OVER: { m_debugger.GdbClient.StepOver (threadId, stepType, false); break; } case enum_STEPKIND.STEP_OUT: { m_debugger.GdbClient.StepOut (threadId, stepType, false); break; } case enum_STEPKIND.STEP_BACKWARDS: { throw new NotImplementedException (); } } return Constants.S_OK; } catch (NotImplementedException e) { LoggingUtils.HandleException (e); return Constants.E_NOTIMPL; } catch (Exception e) { LoggingUtils.HandleException (e); return Constants.E_FAIL; } }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { EnqueueCommand(new Command(CommandKind.Step)); return VSConstants.S_OK; }
int IDebugProgram2.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Debug.WriteLine("AD7ProgramNode: Entering Step"); if (sk == enum_STEPKIND.STEP_BACKWARDS) return VSConstants.E_NOTIMPL; Thread thread = new Thread(new ThreadStart(() => { // Just to ensure main method returns before running thread. Thread.Sleep(10); SteppingTypeEnum stepping = SteppingTypeEnum.None; switch (sk) { case enum_STEPKIND.STEP_INTO: stepping = SteppingTypeEnum.StepInto; break; case enum_STEPKIND.STEP_OVER: stepping = SteppingTypeEnum.StepOver; break; case enum_STEPKIND.STEP_OUT: stepping = SteppingTypeEnum.StepOut; break; } DebuggerManager.Instance.SteppingType = stepping; DebuggerManager.Instance.Run(); //Debugger.Step(); })); thread.Start(); return VSConstants.S_OK; }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { throw new NotImplementedException(); }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { DebugHelper.TraceEnteringMethod(); return VSConstants.S_OK; }
int IDebugProgram3.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { return IDebugProgram2.Step(pThread, sk, Step); }
public async Task Step(int threadId, enum_STEPKIND kind, enum_STEPUNIT unit) { this.VerifyNotDebuggingCoreDump(); await ExceptionManager.EnsureSettingsUpdated(); if ((unit == enum_STEPUNIT.STEP_LINE) || (unit == enum_STEPUNIT.STEP_STATEMENT)) { switch (kind) { case enum_STEPKIND.STEP_INTO: await MICommandFactory.ExecStep(threadId); break; case enum_STEPKIND.STEP_OVER: await MICommandFactory.ExecNext(threadId); break; case enum_STEPKIND.STEP_OUT: await MICommandFactory.ExecFinish(threadId); break; default: throw new NotImplementedException(); } } else if (unit == enum_STEPUNIT.STEP_INSTRUCTION) { switch (kind) { case enum_STEPKIND.STEP_INTO: await MICommandFactory.ExecStepInstruction(threadId); break; case enum_STEPKIND.STEP_OVER: await MICommandFactory.ExecNextInstruction(threadId); break; case enum_STEPKIND.STEP_OUT: await MICommandFactory.ExecFinish(threadId); break; default: throw new NotImplementedException(); } } else { throw new NotImplementedException(); } }
int IDebugProgram2.Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { ThrowIfDisposed(); Task<bool> step; switch (sk) { case enum_STEPKIND.STEP_OVER: step = Tracer.StepOverAsync(); break; case enum_STEPKIND.STEP_INTO: step = Tracer.StepIntoAsync(); break; case enum_STEPKIND.STEP_OUT: goto default; // step = DebugSession.StepOutAsync(); // break; default: return VSConstants.E_NOTIMPL; } step.ContinueWith(t => { // If step was interrupted midway (e.g. by a breakpoint), we have already reported breakpoint // hit event, and so we must not report step complete. Note that interrupting is not the same // as canceling, and if step was canceled, we must report step completion. bool completed = true; try { completed = t.GetAwaiter().GetResult(); } catch (OperationCanceledException) { } if (completed) { Send(new AD7SteppingCompleteEvent(), AD7SteppingCompleteEvent.IID); } }); return VSConstants.S_OK; }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT stepUnit) { var thread = (AD7Thread) pThread; _dispatcher.Queue(() => DebuggedProcess.Step(thread, sk, stepUnit)); return VSConstants.S_OK; }
internal void Step(MonoThread thread, enum_STEPKIND sk) { if (isStepping) return; if (currentStepRequest == null) currentStepRequest = _vm.CreateStepRequest(thread.ThreadMirror); else { currentStepRequest.Disable(); } isStepping = true; switch (sk) { case enum_STEPKIND.STEP_INTO: currentStepRequest.Depth = StepDepth.Into; break; case enum_STEPKIND.STEP_OUT: currentStepRequest.Depth = StepDepth.Out; break; case enum_STEPKIND.STEP_OVER: currentStepRequest.Depth = StepDepth.Over; break; default: return; } currentStepRequest.Size = StepSize.Line; currentStepRequest.Enable(); _vm.Resume(); }
internal void Step(enum_STEPKIND aKind) { if (aKind == enum_STEPKIND.STEP_INTO) { // F11 mStepping = true; if (ASMSteppingMode) { mDbgConnector.SendCmd(Vs2Ds.AsmStepInto); mDbgConnector.SendRegisters(); } else { SetINT3sOnCurrentMethod(); mDbgConnector.SendCmd(Vs2Ds.StepInto); } } else if (aKind == enum_STEPKIND.STEP_OVER) { // F10 mStepping = true; if (ASMSteppingMode) { ASMStepOver(); } else { SetINT3sOnCurrentMethod(); mDbgConnector.SendCmd(Vs2Ds.StepOver); } } else if (aKind == enum_STEPKIND.STEP_OUT) { // Shift-F11 ClearINT3sOnCurrentMethod(); mStepping = true; if (ASMSteppingMode) { mASMSteppingOut = true; mASMSteppingOut_NumEndMethodLabelsPassed = 0; mDbgConnector.SendCmd(Vs2Ds.AsmStepInto); //Set a condition to say we should be doing step out //On break, check line just stepped. //If current line is RET - do one more step then break. //Else do another step } else { mDbgConnector.SendCmd(Vs2Ds.StepOut); } } else if (aKind == enum_STEPKIND.STEP_BACKWARDS) { // STEP_BACKWARDS - Supported at all by VS? // // Possibly, by dragging the execution location up // or down through the source code? -Orvid MessageBox.Show("Step backwards is not supported."); mCallback.OnStepComplete(); // Have to call this otherwise VS gets "stuck" } else { MessageBox.Show("Unknown step type requested."); mCallback.OnStepComplete(); // Have to call this otherwise VS gets "stuck" } }
public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { JavaDebugThread thread = pThread as JavaDebugThread; if (thread == null) return VSConstants.E_INVALIDARG; StepSize size; StepDepth depth; switch (Step) { case enum_STEPUNIT.STEP_INSTRUCTION: size = StepSize.Instruction; break; case enum_STEPUNIT.STEP_LINE: size = StepSize.Line; break; case enum_STEPUNIT.STEP_STATEMENT: size = VirtualMachine.GetCanStepByStatement() ? StepSize.Statement : StepSize.Line; break; default: throw new NotSupportedException(); } switch (sk) { case enum_STEPKIND.STEP_INTO: depth = StepDepth.Into; break; case enum_STEPKIND.STEP_OUT: depth = StepDepth.Out; break; case enum_STEPKIND.STEP_OVER: depth = StepDepth.Over; break; case enum_STEPKIND.STEP_BACKWARDS: default: throw new NotSupportedException(); } IStepRequest stepRequest = thread.GetStepRequest(size, depth); if (stepRequest == null) throw new InvalidOperationException(); Task.Factory.StartNew(() => { // make sure the global "Break All" step request is disabled this._causeBreakRequest.IsEnabled = false; stepRequest.IsEnabled = true; VirtualMachine.Resume(); Interlocked.Decrement(ref _suspended); }).HandleNonCriticalExceptions(); return VSConstants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { Debug.Assert(Worker.MainThreadId == Worker.CurrentThreadId); AD7Thread thread = (AD7Thread)pThread; // RunOperationAsync m_pollThread.RunOperation(new Operation(delegate { m_debuggedProcess.Step(thread.GetDebuggedThread(), (int)sk, (int)Step); })); return Constants.S_OK; }
// This method is deprecated. Use the IDebugProcess3::Step method instead. public int Step(IDebugThread2 pThread, enum_STEPKIND sk, enum_STEPUNIT Step) { m_debuggedProcess.Step(((AD7Thread)pThread).GetDebuggedThread(), sk); return Constants.S_OK; }