MCPcopy Create free account
hub / github.com/beefytech/Beef / GetCollectionContinuation

Method GetCollectionContinuation

IDEHelper/WinDebugger.cpp:6321–6396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6319}
6320
6321String WinDebugger::GetCollectionContinuation(const StringImpl& continuationData, int callStackIdx, int count)
6322{
6323 DbgCompileUnit* dbgCompileUnit = GetCallStackCompileUnit(callStackIdx);;
6324
6325 if (!IsPaused())
6326 return "";
6327
6328 const char* dataPtr = continuationData.c_str();
6329 DebugVisualizerEntry* debugVis = (DebugVisualizerEntry*)DecodeLocalDataPtr(dataPtr);
6330
6331 if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_TreeItems)
6332 {
6333 DbgType* valueType = (DbgType*)DecodeLocalDataPtr(dataPtr);
6334 DbgTypedValue curNode;
6335 curNode.mType = (DbgType*)DecodeLocalDataPtr(dataPtr);
6336 curNode.mPtr = DecodeTargetDataPtr(dataPtr);
6337
6338 Array<addr_target> parentList;
6339 String newContinuationData;
6340 while (*dataPtr != 0)
6341 parentList.push_back(DecodeTargetDataPtr(dataPtr));
6342
6343 String retVal = GetTreeItems(dbgCompileUnit, debugVis, parentList, valueType, curNode, count, &newContinuationData);
6344 retVal += "\n" + newContinuationData;
6345 return retVal;
6346 }
6347 else if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_LinkedList)
6348 {
6349 addr_target endNodePtr = DecodeTargetDataPtr(dataPtr);
6350 DbgType* valueType = (DbgType*) DecodeLocalDataPtr(dataPtr);
6351 DbgTypedValue curNode;
6352 curNode.mType = (DbgType*)DecodeLocalDataPtr(dataPtr);
6353 curNode.mPtr = DecodeTargetDataPtr(dataPtr);
6354
6355 String newContinuationData;
6356
6357 if (count < 0)
6358 count = 3;
6359
6360 String retVal = GetLinkedListItems(dbgCompileUnit, debugVis, endNodePtr, valueType, curNode, count, &newContinuationData);
6361 retVal += "\n" + newContinuationData;
6362 return retVal;
6363 }
6364 else if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_Array)
6365 {
6366 DbgType* valueType = (DbgType*)DecodeLocalDataPtr(dataPtr);
6367 DbgTypedValue curNode;
6368 curNode.mType = (DbgType*)DecodeLocalDataPtr(dataPtr);
6369 curNode.mPtr = DecodeTargetDataPtr(dataPtr);
6370
6371 String newContinuationData;
6372
6373 if (count < 0)
6374 count = 3;
6375
6376 String retVal = GetArrayItems(dbgCompileUnit, debugVis, valueType, curNode, count, &newContinuationData);
6377 retVal += "\n" + newContinuationData;
6378 return retVal;

Calls 3

DecodeTargetDataPtrFunction · 0.85
c_strMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected