| 474 | } |
| 475 | |
| 476 | void BlCvParser::AddContribution(int blSectionIdx, int blSectionOfs, int size, int characteristics) |
| 477 | { |
| 478 | if (mCurModule == NULL) |
| 479 | return; |
| 480 | |
| 481 | if ((characteristics & IMAGE_SCN_MEM_EXECUTE) != 0) |
| 482 | { |
| 483 | if (mCurModule->mContrib.mCharacteristics == 0) |
| 484 | { |
| 485 | mCurModule->mContrib.mBlSectionIdx = blSectionIdx; |
| 486 | mCurModule->mContrib.mBlSectionOfs = blSectionOfs; |
| 487 | mCurModule->mContrib.mSize = size; |
| 488 | mCurModule->mContrib.mCharacteristics = characteristics; |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | BlCvContrib contrib; |
| 493 | contrib.mModuleIdx = mCurModule->mIdx; |
| 494 | contrib.mBlSectionOfs = blSectionOfs; |
| 495 | contrib.mSize = size; |
| 496 | contrib.mCharacteristics = characteristics; |
| 497 | |
| 498 | while (blSectionIdx >= (int)mCodeView->mContribMap.mSegments.size()) |
| 499 | mCodeView->mContribMap.mSegments.Alloc(); |
| 500 | auto contribMapSeg = mCodeView->mContribMap.mSegments[blSectionIdx]; |
| 501 | contribMapSeg->mContribs.push_back(contrib); |
| 502 | } |
| 503 | |
| 504 | void BlCvParser::FinishModule(PESectionHeader* sectHeaderArr, const BfSizedVectorRef<BlObjectDataSectInfo>& sectInfos, PE_SymInfo* objSyms, const BfSizedVectorRef<BlObjectDataSymInfo>& syms) |
| 505 | { |