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

Method ParseCompileUnit

IDEHelper/COFF.cpp:3461–4144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3459}
3460
3461CvCompileUnit* COFF::ParseCompileUnit(CvModuleInfo* moduleInfo, CvCompileUnit* compileUnit, uint8* sectionData, int sectionSize)
3462{
3463 BP_ZONE("COFF::ParseCompileUnit");
3464
3465 CvInlineInfoVec inlineDataVec;
3466 Dictionary<uint32, CvInlineInfo*> inlineDataDict;
3467
3468 if (moduleInfo != NULL)
3469 {
3470 BfLogDbg("ParseCompileUnit %s %s\n", mPDBPath.c_str(), moduleInfo->mModuleName);
3471 }
3472 else
3473 {
3474 BfLogDbg("ParseCompileUnit %s NULL\n", mPDBPath.c_str());
3475 }
3476
3477 int allocSizeStart = mAlloc.GetAllocSize();
3478
3479 if (compileUnit == NULL)
3480 {
3481 compileUnit = new CvCompileUnit(this);
3482 mCompileUnits.push_back(compileUnit);
3483 }
3484 compileUnit->mDbgModule = this;
3485 if (moduleInfo != NULL)
3486 {
3487 compileUnit->mModuleIdx = moduleInfo->mIdx;
3488 compileUnit->mName = moduleInfo->mModuleName;
3489 moduleInfo->mCompileUnit = compileUnit;
3490 }
3491 else
3492 {
3493 compileUnit->mModuleIdx = NULL;
3494 compileUnit->mName = mFilePath.c_str();
3495 }
3496
3497 uint8* data = sectionData;
3498 uint8* dataEnd = NULL;
3499
3500 GET_INTO(uint32, infoType);
3501 BF_ASSERT(infoType == CV_SIGNATURE_C13);
3502
3503 int taggedSize = sectionSize;
3504
3505 uint8* debugSubSectionsStart = data;
3506 if (moduleInfo != NULL)
3507 {
3508 taggedSize = moduleInfo->mLinesBytes;
3509 debugSubSectionsStart = data + moduleInfo->mSymbolBytes - sizeof(uint32);
3510 }
3511 else
3512 {
3513 taggedSize = sectionSize - sizeof(uint32);
3514 }
3515
3516 if (mStringTable.mStrTable == NULL)
3517 {
3518 data = debugSubSectionsStart;

Callers 4

CheckBreakpointMethod · 0.45
PdbTestFileFunction · 0.45
TestPDBFunction · 0.45
FindSubProgramMethod · 0.45

Calls 15

CvCrossScopeImportClass · 0.85
FixEmitFileNameFunction · 0.85
AppendMethod · 0.80
IsBeefMethod · 0.80
TryGetValueMethod · 0.80
GetRootInlineParentMethod · 0.80
c_strMethod · 0.45
GetAllocSizeMethod · 0.45
push_backMethod · 0.45
AddMethod · 0.45
backMethod · 0.45
sizeMethod · 0.45

Tested by 1

TestPDBFunction · 0.36