Fix a check that was attempting to see if an object file was in memory.
authorGreg Clayton <gclayton@fb.com>
Tue, 18 Aug 2020 00:26:50 +0000 (17:26 -0700)
committerGreg Clayton <gclayton@fb.com>
Tue, 18 Aug 2020 20:24:22 +0000 (13:24 -0700)
commit08748d15b8d696db9f894db38d74a212b8ab43e6
treea44cab219b2cd16c1acfff7ef46280393c75f076
parent0b98a59fedb5e98661ca531d5ed20110bfdd7b2f
Fix a check that was attempting to see if an object file was in memory.

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.

Differential Revision: https://reviews.llvm.org/D86122
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp