Use dSYM's file addr for Sections when it doesn't match binary
authorJason Molenda <jason@molenda.com>
Tue, 31 Aug 2021 08:32:52 +0000 (01:32 -0700)
committerJason Molenda <jason@molenda.com>
Tue, 31 Aug 2021 08:35:07 +0000 (01:35 -0700)
commitc1184ca6eb97e0ac5f7b6cdcc99e3905d27f9d95
treea294646e1e60651ab5bc0a213a201288bad5cf06
parent0d02aa6e43a2388fe0fdc14062631a4bc50ef033
Use dSYM's file addr for Sections when it doesn't match binary

When adding a dSYM to a Module and it has different file addresses
from the already-present ObjectFile binary, change the Sections to
use the dSYM's file addresses so the symbol table and DWARF are
properly contained in the Sections.  Previously this was only done
for IsInMemory ObjectFiles, but it's more common than that.

Differential Revision: https://reviews.llvm.org/D108889
rdar://81504400
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h