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

Method RemoveTargetData

IDEHelper/DbgModule.cpp:7391–7432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7389}
7390
7391void DbgModule::RemoveTargetData()
7392{
7393 BP_ZONE("DbgModule::RemoveTargetData");
7394
7395 for (auto srcFileRef : mSrcFileDeferredRefs)
7396 srcFileRef->RemoveDeferredRefs(this);
7397
7398 HashSet<DbgSrcFile*> visitedFiles;
7399 for (auto compileUnit : mCompileUnits)
7400 {
7401 for (auto& fileRef : compileUnit->mSrcFileRefs)
7402 {
7403 if (visitedFiles.Add(fileRef.mSrcFile))
7404 {
7405 fileRef.mSrcFile->RemoveLines(this);
7406 }
7407 }
7408 }
7409
7410 RemoveInvalidRange(mDebugTarget->mSymbolMap, (addr_target)mImageBase, (int32)mImageSize);
7411 RemoveInvalidRange(mDebugTarget->mSubprogramMap, (addr_target)mImageBase, (int32)mImageSize);
7412 RemoveInvalidRange(mDebugTarget->mExceptionDirectoryMap, (addr_target)mImageBase, (int32)mImageSize);
7413 RemoveInvalidRange(mDebugTarget->mContribMap, (addr_target)mImageBase, (int32)mImageSize);
7414 RemoveInvalidMapRange(mDebugTarget->mDwFrameDescriptorMap, (addr_target)mImageBase, (int32)mImageSize);
7415 RemoveInvalidMapRange(mDebugTarget->mCOFFFrameDescriptorMap, (addr_target)mImageBase, (int32)mImageSize);
7416
7417 //mDebugTarget->mDwFrameDescriptorMap.erase()
7418
7419 // Remove any of our entries from the mHotReplacedMethodList from 'primary modules' that are not going away
7420 for (auto dbgType : mHotPrimaryTypes)
7421 {
7422 DbgSubprogram** nextSrc = &dbgType->mHotReplacedMethodList.mHead;
7423 while (*nextSrc != NULL)
7424 {
7425 auto* subprogram = *nextSrc;
7426 if (subprogram->mCompileUnit->mDbgModule == this)
7427 *nextSrc = subprogram->mNext;
7428 else
7429 nextSrc = &(*nextSrc)->mNext;;
7430 }
7431 }
7432}
7433
7434void DbgModule::ReportMemory(MemReporter* memReporter)
7435{

Callers

nothing calls this directly

Calls 5

RemoveInvalidRangeFunction · 0.85
RemoveInvalidMapRangeFunction · 0.85
RemoveDeferredRefsMethod · 0.80
RemoveLinesMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected