| 6146 | } |
| 6147 | |
| 6148 | String WinDebugger::GetDictionaryItems(DbgCompileUnit* dbgCompileUnit, DebugVisualizerEntry* debugVis, DbgTypedValue dictValue, int bucketIdx, int nodeIdx, int& count, String* outContinuationData) |
| 6149 | { |
| 6150 | //DbgEvaluationContext bucketsEvaluationContext(this, dbgModule, debugVis->mBuckets); |
| 6151 | DbgEvaluationContext nextEvaluationContext(this, dbgCompileUnit->mDbgModule, debugVis->mNextPointer); |
| 6152 | |
| 6153 | DbgTypedValue bucketsPtr = EvaluateInContext(dbgCompileUnit, dictValue, debugVis->mBuckets); |
| 6154 | DbgTypedValue entriesPtr = EvaluateInContext(dbgCompileUnit, dictValue, debugVis->mEntries); |
| 6155 | if ((!bucketsPtr) || (!entriesPtr)) |
| 6156 | { |
| 6157 | count = -1; |
| 6158 | return ""; |
| 6159 | } |
| 6160 | int entrySize = entriesPtr.mType->mTypeParam->GetStride(); |
| 6161 | int bucketIdxSize = bucketsPtr.mType->mTypeParam->GetStride(); |
| 6162 | |
| 6163 | String addrs; |
| 6164 | |
| 6165 | bool checkLeft = true; |
| 6166 | |
| 6167 | int encodeCount = 0; |
| 6168 | while (encodeCount < count) |
| 6169 | { |
| 6170 | if (nodeIdx != -1) |
| 6171 | { |
| 6172 | DbgTypedValue entryValue; |
| 6173 | entryValue.mSrcAddress = entriesPtr.mPtr + (nodeIdx * entrySize); |
| 6174 | entryValue.mType = entriesPtr.mType->mTypeParam; |
| 6175 | |
| 6176 | addrs += EncodeDataPtr(entryValue.mSrcAddress, false); |
| 6177 | |
| 6178 | DbgTypedValue nextValue = nextEvaluationContext.EvaluateInContext(entryValue); |
| 6179 | if ((!nextValue) || (!nextValue.mType->IsInteger())) |
| 6180 | { |
| 6181 | break; |
| 6182 | } |
| 6183 | |
| 6184 | nodeIdx = (int)nextValue.GetInt64(); |
| 6185 | encodeCount++; |
| 6186 | } |
| 6187 | else |
| 6188 | { |
| 6189 | if (bucketIdxSize == 4) |
| 6190 | nodeIdx = ReadMemory<int>(bucketsPtr.mPtr + bucketIdx * sizeof(int32)); |
| 6191 | else |
| 6192 | nodeIdx = (int)ReadMemory<int64>(bucketsPtr.mPtr + bucketIdx * sizeof(int64)); |
| 6193 | bucketIdx++; |
| 6194 | } |
| 6195 | } |
| 6196 | |
| 6197 | count = encodeCount; |
| 6198 | //count = mapIdx; |
| 6199 | |
| 6200 | if (outContinuationData != NULL) |
| 6201 | { |
| 6202 | *outContinuationData += EncodeDataPtr(debugVis, false) + EncodeDataPtr(dictValue.mType, false) + EncodeDataPtr(dictValue.mSrcAddress, false) + |
| 6203 | EncodeDataPtr((addr_target)bucketIdx, false) + EncodeDataPtr((addr_target)nodeIdx, false); |
| 6204 | } |
| 6205 |
nothing calls this directly
no test coverage detected