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

Method ParseCompileUnit_Symbols

IDEHelper/COFF.cpp:2193–3452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2191static int gSymCount = 0;
2192
2193void COFF::ParseCompileUnit_Symbols(DbgCompileUnit* compileUnit, uint8* sectionData, uint8* data, uint8* symDataEnd, CvInlineInfoVec& inlineDataVec, bool wantDeferInternals, DbgSubprogram* useSubprogram)
2194{
2195 bool isOptimized = false;
2196
2197 uint8* dataHead = data;
2198
2199 CvCompileUnit* cvCompileUnit = (CvCompileUnit*)compileUnit;
2200
2201 uint8* symDataStart = data;
2202 DbgSubprogram* curSubprogram = NULL;
2203 DbgVariable* curRegRelVariable = NULL;
2204 DbgVariable* curParam = NULL;
2205 DbgVariable* localVar = NULL;
2206 bool inLocalVarRanged = false;
2207 SizedArray<DbgBlock*, 16> blockStack;
2208 blockStack.push_back(compileUnit->mGlobalBlock);
2209 int deferBlockDepth = 0;
2210 int deferInlineDepth = 0;
2211
2212 uint8* newLocationDataStart = NULL;
2213 uint8* locationDataStart = NULL;
2214 uint8* locationDataEnd = NULL;
2215 int locationDataCount = 0;
2216
2217 struct _DeferredVariableLocation
2218 {
2219 DbgVariable* mVariable;
2220 uint8* mRangedStart;
2221 int mRangedLength;
2222
2223 _DeferredVariableLocation()
2224 {
2225 mVariable = NULL;
2226 mRangedStart = NULL;
2227 mRangedLength = 0;
2228 }
2229 };
2230 SizedArray<_DeferredVariableLocation, 16> deferredVariableLocations;
2231 int unrangedIdx = -1;
2232
2233 auto _NextUnrangedLocalVar = [&](const char* name, DbgType* varType)
2234 {
2235 inLocalVarRanged = false;
2236
2237 localVar = NULL;
2238
2239 unrangedIdx++;
2240 while (unrangedIdx < deferredVariableLocations.size())
2241 {
2242 localVar = deferredVariableLocations[unrangedIdx].mVariable;
2243 if (strcmp(localVar->mName, name) == 0)
2244 break;
2245 localVar = NULL;
2246 unrangedIdx++;
2247 }
2248
2249 bool isParam = false;
2250 if (localVar == NULL)

Callers

nothing calls this directly

Calls 15

GetLastDoubleColonFunction · 0.85
StringClass · 0.85
IsSetupMethod · 0.80
GetRootInlineParentMethod · 0.80
atollFunction · 0.50
push_backMethod · 0.45
sizeMethod · 0.45
PushBackMethod · 0.45
backMethod · 0.45
AllocBytesMethod · 0.45
clearMethod · 0.45
PushFrontMethod · 0.45

Tested by

no test coverage detected