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

Method GetSectionAddr

IDEHelper/COFF.cpp:500–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500addr_target COFF::GetSectionAddr(uint16 section, uint32 offset)
501{
502 if (section == 0)
503 return offset;
504
505 if ((section & 0x8000) != 0)
506 {
507 auto linkedModule = GetLinkedModule();
508 addr_target hiBase = linkedModule->mSecRelEncodingVec[section & 0x7FFF];
509 return hiBase + offset;
510 }
511
512 int rva = mSectionHeaders[section - 1].mVirtualAddress;
513 if (rva == 0)
514 return ADDR_FLAG_ABS + offset;
515
516 return (addr_target)mImageBase + rva + offset;
517}
518
519DbgType* COFF::CvGetType(int typeId)
520{

Callers 2

GetModuleInfoMethod · 0.80
EvaluateLocationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected