Skip to content

Commit

Permalink
Merge branch 'master' into path-step-into-targets
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh authored Sep 13, 2024
2 parents ce24ae2 + ce3a023 commit b60d6ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/abstractdebugging/AbstractDebuggingServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ private void stepAllThreadsIntoMatchingEdge(int primaryThreadId, EdgeInfo primar
onThreadsStopped("step", primaryThreadId);
}

private EdgeInfo findTargetEdge(EdgeInfo primaryTargetEdge, List<? extends EdgeInfo> candidateEdges, String threadName) throws IllegalStepException {
// This is will throw if there are multiple distinct target edges with the same target CFG node.
private EdgeInfo findTargetEdge(EdgeInfo primaryTargetEdge, List<? extends EdgeInfo> candidateEdges, String threadName) {
// This is will make ambiguous threads unavailable if there are multiple distinct target edges with the same target CFG node.
// TODO: Somehow ensure this can never happen.
// Options:
// * Throw error (current approach) (problem: might make it impossible to step at all in some cases. it is difficult to provide meaningful error messages for all cases)
Expand All @@ -838,7 +838,7 @@ private EdgeInfo findTargetEdge(EdgeInfo primaryTargetEdge, List<? extends EdgeI
.filter(e -> e.cfgNodeId().equals(primaryTargetEdge.cfgNodeId()))
.toList();
if (targetEdgesByCFGNode.size() > 1) {
throw new IllegalStepException("Path is ambiguous for " + threadName + ".");
log.warn("Disabling synchronous stepping in the debugging thread \"" + threadName + "\", as the path there is ambiguous.");
}
return targetEdgesByCFGNode.size() == 1 ? targetEdgesByCFGNode.get(0) : null;
}
Expand Down

0 comments on commit b60d6ba

Please sign in to comment.