[all-commits] [llvm/llvm-project] 08748d: Fix a check that was attempting to see if an objec...

Greg Clayton via All-commits all-commits at lists.llvm.org
Tue Aug 18 13:24:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 08748d15b8d696db9f894db38d74a212b8ab43e6
      https://github.com/llvm/llvm-project/commit/08748d15b8d696db9f894db38d74a212b8ab43e6
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2020-08-18 (Tue, 18 Aug 2020)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list