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

Method Load

IDEHelper/DebugVisualizers.cpp:348–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348bool DebugVisualizers::Load(const StringImpl& fileNamesStr)
349{
350 bool hasError = !mErrorString.IsEmpty();
351 mErrorString.Clear();
352
353 Array<String> fileNames;
354 int startIdx = 0;
355 while (true)
356 {
357 int crPos = (int)fileNamesStr.IndexOf('\n', startIdx);
358 if (crPos == -1)
359 {
360 fileNames.Add(fileNamesStr.Substring(startIdx));
361 break;
362 }
363
364 fileNames.Add(fileNamesStr.Substring(startIdx, crPos - startIdx));
365 startIdx = crPos + 1;
366 }
367
368 HashContext hashCtx;
369 for (auto fileName : fileNames)
370 {
371 hashCtx.MixinStr(fileName);
372 BfpTimeStamp lastWrite = BfpFile_GetTime_LastWrite(fileName.c_str());
373 if (lastWrite == 0)
374 {
375 Fail(StrFormat("Failed to load debug visualizer file %s", fileName.c_str()));
376 }
377 hashCtx.Mixin(lastWrite);
378 }
379
380 Val128 hash = hashCtx.Finish128();
381 if ((hash == mHash) && (!hasError))
382 return true;
383 mHash = hash;
384
385 mDebugVisualizers.Clear();
386 bool success = true;
387 for (auto fileName : fileNames)
388 {
389 mCurFileName = fileName;
390 if (!ReadFileTOML(fileName))
391 success = false;
392 mCurFileName.Clear();
393 }
394 return success;
395}
396
397DebugVisualizerEntry* DebugVisualizers::FindEntryForType(const StringImpl& typeName, DbgFlavor wantFlavor, Array<String>* wildcardCaptures)
398{

Callers 3

SearchSymSrvMethod · 0.45
SearchForImageMethod · 0.45

Calls 11

FailFunction · 0.85
SubstringMethod · 0.80
MixinStrMethod · 0.80
Finish128Method · 0.80
IsEmptyMethod · 0.45
ClearMethod · 0.45
IndexOfMethod · 0.45
AddMethod · 0.45
c_strMethod · 0.45
MixinMethod · 0.45

Tested by

no test coverage detected