diff --git a/Sindarin-Tests/SindarinDebuggerTest.class.st b/Sindarin-Tests/SindarinDebuggerTest.class.st index 5c8515e..00bcded 100644 --- a/Sindarin-Tests/SindarinDebuggerTest.class.st +++ b/Sindarin-Tests/SindarinDebuggerTest.class.st @@ -650,6 +650,32 @@ SindarinDebuggerTest >> testSkipDoesNotSkipReturn [ self should: [ scdbg skip ] raise: SindarinSkippingReturnWarning ] +{ #category : #tests } +SindarinDebuggerTest >> testSkipStepsMethodNodes [ + + | scdbg realExecNode realExecPc realTopStack | + scdbg := SindarinDebugger debug: [ + self helperMethodWithBlockWithNoReturn ]. + + scdbg step. + scdbg stepOver. + + realExecNode := scdbg node. + realExecPc := scdbg pc. + realTopStack := scdbg topStack. + + scdbg := SindarinDebugger debug: [ + self helperMethodWithBlockWithNoReturn ]. + + scdbg + step; + skip. + + self assert: scdbg node identicalTo: realExecNode. + self assert: scdbg pc identicalTo: realExecPc. + self assert: scdbg topStack equals: realTopStack +] + { #category : #'tests - skipping' } SindarinDebuggerTest >> testSkipThroughNode [ | dbg realExecPC realValueOfA targetExecNode realExecTopStack nodeAfterSkipThrough | diff --git a/Sindarin/SindarinDebugger.class.st b/Sindarin/SindarinDebugger.class.st index dabdfd2..1087a88 100644 --- a/Sindarin/SindarinDebugger.class.st +++ b/Sindarin/SindarinDebugger.class.st @@ -531,11 +531,12 @@ SindarinDebugger >> sindarinSession: aSindarinDebugSession [ { #category : #'stepping - skip' } SindarinDebugger >> skip [ - + | nextBytecode | "If it is a message send or assignment, skips the execution of the current instruction, and puts nil on the execution stack." self node isAssignment ifTrue: [ ^ self skipAssignmentNodeCompletely ]. self node isMessage ifTrue: [ ^ self skipMessageNode ]. + self node isMethod ifTrue: [ ^ self step ]. nextBytecode := self currentBytecode detect: [ :each | each offset = self pc ]. (self node isReturn or: [