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

Method FixupInlinee

IDEHelper/COFF.cpp:4414–4502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4412}
4413
4414void COFF::FixupInlinee(DbgSubprogram* dbgSubprogram, uint32 ipiTag)
4415{
4416 if (!mCvIPIReader.IsSetup())
4417 CvParseIPI();
4418
4419 //int idx = (ipiTag & 0x7FFFFFFF) - mCvIPIMinTag;
4420 //uint8* dataStart = mCvIPIData + mCvIPITagStartMap[idx];
4421
4422 uint8* dataStart = CvGetTagData(ipiTag & 0x7FFFFFFF, true);
4423 CvAutoReleaseTempData releaseTempData(this, dataStart);
4424
4425 lfEasy& funcLeaf = *(lfEasy*)dataStart;
4426 switch (funcLeaf.leaf)
4427 {
4428 case LF_FUNC_ID:
4429 {
4430 lfFuncId* funcData = (lfFuncId*)dataStart;
4431 CvParseMethod(NULL, NULL, funcData->type, false, dbgSubprogram);
4432 dbgSubprogram->mName = (const char*)funcData->name;
4433
4434 bool doScope = true;
4435
4436 if ((funcData->scopeId != 0) && (doScope))
4437 {
4438 uint8* data = CvGetTagData(funcData->scopeId, true);
4439 CvAutoReleaseTempData releaseTempData(this, data);
4440
4441 lfEasy& leaf = *(lfEasy*)data;
4442 switch (leaf.leaf)
4443 {
4444 case LF_STRING_ID:
4445 {
4446 lfStringId& str = *(lfStringId*)data;
4447 const char* parentStr = (const char*)str.name;
4448
4449 int allocLen = strlen(parentStr) + 2 + strlen(dbgSubprogram->mName) + 1;
4450 BP_ALLOC("String", allocLen);
4451 char* dupStr = (char*)mAlloc.AllocBytes(allocLen, "String");
4452
4453 strcpy(dupStr, parentStr);
4454 strcat(dupStr, "::");
4455 strcat(dupStr, dbgSubprogram->mName);
4456 dbgSubprogram->mName = dupStr;
4457 }
4458 break;
4459 case LF_UDT_MOD_SRC_LINE:
4460 {
4461 /*auto udtModSrcLine = *(lfUdtModSrcLine*)data;
4462 auto parentType = CvGetType(udtModSrcLine.type);
4463 curSubprogram->mParentType = parentType;*/
4464 }
4465 break;
4466 }
4467 }
4468 break;
4469 }
4470 case LF_MFUNC_ID:
4471 {

Callers 1

ToStringMethod · 0.45

Calls 6

IsSetupMethod · 0.80
TryGetValueMethod · 0.80
AllocBytesMethod · 0.45
IsEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected