Page MenuHomePhabricator

Fix a check that was attempting to see if an object file was in memory.
ClosedPublic

Authored by clayborg on Aug 17 2020, 5:34 PM.

Details

Summary

Checking if an object file is in memory should use the ObjectFile::IsInMemory(), not test ObjectFile::BaseAddress(). ObjectFile::BaseAddress() is designed to be overridden by all classes and is for mach-o, ELF and COFF plug-ins. They find the header base adddress and return that as a section offset address. The default implementation of ObjectFile::BaseAddress() does try and make an Address() from the ObjectFile::m_memory_addr, but I switched it to a correct function call.

Diff Detail

Event Timeline

clayborg created this revision.Aug 17 2020, 5:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2020, 5:34 PM
clayborg requested review of this revision.Aug 17 2020, 5:34 PM
JDevlieghere accepted this revision.Aug 17 2020, 7:57 PM
This revision is now accepted and ready to land.Aug 17 2020, 7:57 PM
This revision was landed with ongoing or failed builds.Aug 18 2020, 1:24 PM
This revision was automatically updated to reflect the committed changes.