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

Method GetCollectionContinuation

IDEHelper/Compiler/CeDebugger.cpp:2323–2403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2321}
2322
2323String CeDebugger::GetCollectionContinuation(const StringImpl& continuationData, int callStackIdx, int count)
2324{
2325 if (!mCeMachine->mDbgPaused)
2326 return "";
2327
2328 auto ceModule = mCeMachine->mCeModule;
2329 const char* dataPtr = continuationData.c_str();
2330 DebugVisualizerEntry* debugVis = (DebugVisualizerEntry*)DecodeLocalDataPtr(dataPtr);
2331
2332 if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_TreeItems)
2333 {
2334 //TODO:
2335// DbgType* valueType = (DbgType*)DecodeLocalDataPtr(dataPtr);
2336// BfTypedValue curNode;
2337// curNode.mType = (DbgType*)DecodeLocalDataPtr(dataPtr);
2338// curNode.mPtr = DecodeTargetDataPtr(dataPtr);
2339//
2340// Array<addr_ce> parentList;
2341// String newContinuationData;
2342// while (*dataPtr != 0)
2343// parentList.push_back(DecodeTargetDataPtr(dataPtr));
2344//
2345// String retVal = GetTreeItems(dbgCompileUnit, debugVis, parentList, valueType, curNode, count, &newContinuationData);
2346// retVal += "\n" + newContinuationData;
2347// return retVal;
2348 }
2349 else if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_LinkedList)
2350 {
2351 addr_ce endNodePtr = DecodeTargetDataPtr(dataPtr);
2352 BfType* valueType = (BfType*)DecodeLocalDataPtr(dataPtr);
2353 BfType* nodeType = (BfType*)DecodeLocalDataPtr(dataPtr);
2354
2355 BfTypedValue curNode = BfTypedValue(
2356 ceModule->mBfIRBuilder->CreateIntToPtr(DecodeTargetDataPtr(dataPtr), ceModule->mBfIRBuilder->MapType(nodeType)),
2357 nodeType);
2358
2359 String newContinuationData;
2360
2361 if (count < 0)
2362 count = 3;
2363
2364 String retVal = GetLinkedListItems(debugVis, endNodePtr, valueType, curNode, count, &newContinuationData);
2365 retVal += "\n" + newContinuationData;
2366 return retVal;
2367 }
2368 else if (debugVis->mCollectionType == DebugVisualizerEntry::CollectionType_Array)
2369 {
2370 BfType* valueType = (BfType*)DecodeLocalDataPtr(dataPtr);
2371
2372 auto nodeType = (BfType*)DecodeLocalDataPtr(dataPtr);
2373 BfTypedValue curNode = BfTypedValue(
2374 ceModule->mBfIRBuilder->CreateIntToPtr(DecodeTargetDataPtr(dataPtr), ceModule->mBfIRBuilder->MapType(nodeType)),
2375 nodeType);
2376
2377 String newContinuationData;
2378
2379 if (count < 0)
2380 count = 3;

Callers

nothing calls this directly

Calls 5

DecodeTargetDataPtrFunction · 0.85
BfTypedValueClass · 0.85
CreateIntToPtrMethod · 0.80
MapTypeMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected