// insert context switch info according to blockExecutionContextMap // Also, it sets raiseException private void checkContextSwitchInfo(ErrorTrace trace) { if (trace.Blocks.Count == 0) { return; } foreach (var blk in trace.Blocks) { if (blockExecutionContextMap.ContainsKey(trace.procName + "::" + blk.blockName)) { var k = blockExecutionContextMap[trace.procName + "::" + blk.blockName]; if (blk.Cmds.Count != 0) { Debug.Assert(blk.Cmds[0].info.executionContext == k); } } foreach (var c in blk.Cmds) { if (c.CalleeTrace != null) { checkContextSwitchInfo(c.CalleeTrace); } } } var exitblk = trace.Blocks.Last(); if (inst.blocksThatRaiseException.Contains(exitblk.blockName)) { trace.setRaiseException(); } }