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

Method AddSubProgram

IDEHelper/HotScanner.cpp:92–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90using namespace TCFake;
91
92void DbgHotScanner::AddSubProgram(DbgSubprogram* subProgram, bool followInlineParent, const Beefy::StringImpl& prefix)
93{
94 if ((followInlineParent) && (subProgram->mInlineeInfo != NULL) && (subProgram->mInlineeInfo->mInlineParent != NULL))
95 AddSubProgram(subProgram->mInlineeInfo->mInlineParent, true, prefix);
96
97 subProgram->mCompileUnit->mDbgModule->ParseSymbolData();
98
99 String methodName;
100 addr_target offset;
101 if (mDebugger->mDebugTarget->FindSymbolAt(subProgram->mBlock.mLowPC, &methodName, &offset))
102 {
103 if (offset == 0)
104 {
105 if (!prefix.IsEmpty())
106 methodName.Insert(0, prefix);
107
108 if (subProgram->mCompileUnit->mDbgModule->mHotIdx != 0)
109 methodName += StrFormat("\t%d", subProgram->mCompileUnit->mDbgModule->mHotIdx);
110 mDebugger->mHotResolveData->mBeefCallStackEntries.Add(methodName);
111 }
112 }
113}
114
115void DbgHotScanner::PopulateHotCallstacks()
116{

Callers

nothing calls this directly

Calls 5

FindSymbolAtMethod · 0.80
ParseSymbolDataMethod · 0.45
IsEmptyMethod · 0.45
InsertMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected