| 6207 | } |
| 6208 | |
| 6209 | String WinDebugger::GetTreeItems(DbgCompileUnit* dbgCompileUnit, DebugVisualizerEntry* debugVis, Array<addr_target>& parentList, DbgType*& valueType, DbgTypedValue& curNode, int count, String* outContinuationData) |
| 6210 | { |
| 6211 | DbgEvaluationContext leftEvaluationContext(this, dbgCompileUnit, debugVis->mLeftPointer); |
| 6212 | DbgEvaluationContext rightEvaluationContext(this, dbgCompileUnit, debugVis->mRightPointer); |
| 6213 | DbgEvaluationContext valueEvaluationContext(this, dbgCompileUnit, debugVis->mValuePointer); |
| 6214 | |
| 6215 | DbgEvaluationContext conditionEvaluationContext(this, dbgCompileUnit, debugVis->mCondition); |
| 6216 | |
| 6217 | String addrs; |
| 6218 | |
| 6219 | bool checkLeft = true; |
| 6220 | |
| 6221 | if ((curNode.mPtr & 2) != 0) // Flag from continuation |
| 6222 | { |
| 6223 | checkLeft = false; |
| 6224 | curNode.mPtr &= (addr_target)~2; |
| 6225 | } |
| 6226 | |
| 6227 | HashSet<intptr> seenAddrs; |
| 6228 | |
| 6229 | for (int mapIdx = 0; mapIdx < count; mapIdx++) |
| 6230 | { |
| 6231 | DbgTypedValue readNode; |
| 6232 | while (true) |
| 6233 | { |
| 6234 | bool checkNode = (curNode.mPtr & 1) == 0; |
| 6235 | |
| 6236 | readNode = curNode; |
| 6237 | readNode.mPtr &= (addr_target)~1; |
| 6238 | |
| 6239 | if (checkLeft) |
| 6240 | { |
| 6241 | DbgTypedValue leftValue = leftEvaluationContext.EvaluateInContext(readNode); |
| 6242 | bool isEmpty = leftValue.mPtr == NULL; |
| 6243 | if ((leftValue) && (conditionEvaluationContext.HasExpression())) |
| 6244 | { |
| 6245 | auto condValue = conditionEvaluationContext.EvaluateInContext(leftValue); |
| 6246 | if (condValue) |
| 6247 | isEmpty = !condValue.mBool; |
| 6248 | } |
| 6249 | if (isEmpty) |
| 6250 | { |
| 6251 | checkLeft = false; |
| 6252 | break; // Handle node |
| 6253 | } |
| 6254 | |
| 6255 | parentList.push_back(curNode.mPtr); |
| 6256 | curNode = leftValue; |
| 6257 | } |
| 6258 | else if (checkNode) |
| 6259 | { |
| 6260 | break; // Handle node |
| 6261 | } |
| 6262 | else |
| 6263 | { |
| 6264 | DbgTypedValue rightValue = rightEvaluationContext.EvaluateInContext(readNode); |
| 6265 | bool isEmpty = rightValue.mPtr == NULL; |
| 6266 | if ((rightValue) && (conditionEvaluationContext.HasExpression())) |
nothing calls this directly
no test coverage detected