Commit 3675c5ae authored by Sarah Grebing's avatar Sarah Grebing
Browse files

bugfix context in stepOverreverse

parent 3ae847f4
Pipeline #17018 failed with stages
in 3 minutes and 8 seconds
...@@ -16,10 +16,9 @@ public class StepIntoReverseCommand<T> extends DebuggerCommand<T> { ...@@ -16,10 +16,9 @@ public class StepIntoReverseCommand<T> extends DebuggerCommand<T> {
} else{ } else{
dbg.setStatePointer(statePointer); dbg.setStatePointer(statePointer);
} else { /*if (statePointer.isLastNode() || statePointer.isFirstNode()) {
if (statePointer.isLastNode() || statePointer.isFirstNode()) {
System.out.println("We need Sonderbehandlung here"); System.out.println("We need Sonderbehandlung here");
} }*/
} }
} }
} }
......
...@@ -6,14 +6,19 @@ public class StepOverReverseCommand<T> extends DebuggerCommand<T> { ...@@ -6,14 +6,19 @@ public class StepOverReverseCommand<T> extends DebuggerCommand<T> {
@Override @Override
public void execute(DebuggerFramework<T> dbg) throws DebuggerException { public void execute(DebuggerFramework<T> dbg) throws DebuggerException {
val statePointer = dbg.getCurrentStatePointer(); val statePointer = dbg.getCurrentStatePointer();
PTreeNode<T> stepOverReverse = statePointer.getStepInvInto() != null ? PTreeNode<T> stepOverReverse = statePointer.getStepInvOver();
statePointer.getStepInvInto() :
statePointer.getStepInvOver();
if (stepOverReverse == null) { if (stepOverReverse == null) {
info("There is no previous state to the current one."); int size = statePointer.getContextNodes().size();
} dbg.setStatePointer(statePointer.getContextNodes().get(size - 1));
dbg.setStatePointer(stepOverReverse); /*if(statePointer.isAtomic()) {
dbg.setStatePointer(statePointer);
}else{
info("There is no previous state to the current one.");
}*/
//state before statement
} else {
dbg.setStatePointer(stepOverReverse);
}
} }
} }
...@@ -282,6 +282,7 @@ public class DebuggerMain implements Initializable { ...@@ -282,6 +282,7 @@ public class DebuggerMain implements Initializable {
* @see {@link #handleStatePointer(PTreeNode)} * @see {@link #handleStatePointer(PTreeNode)}
*/ */
private void handleStatePointerUI(PTreeNode<KeyData> node) { private void handleStatePointerUI(PTreeNode<KeyData> node) {
graph.addPartiallyAndMark(node); graph.addPartiallyAndMark(node);
if (node != null) { if (node != null) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment