[lldb] Warn when Mach-O files have overlapping segments
authorAlex Langford <alangford@apple.com>
Wed, 22 Feb 2023 01:20:23 +0000 (17:20 -0800)
committerAlex Langford <alangford@apple.com>
Wed, 22 Feb 2023 21:22:15 +0000 (13:22 -0800)
commitcee05eed2f478630b5435070bdefe06156dc5035
treea5ad1688c6eee0b65662b6c9a5283a14b81fb5d6
parentb77be0bd54685df284d5e66f8c54fb3b5437a0eb
[lldb] Warn when Mach-O files have overlapping segments

I recently came across a binary that for some reason had overlapping
sections. When debugging it, LLDB was able to get information about one
of the sections but not the other because SectionLoadList assumes that
each address maps to exactly one section. We have the capability to warn
about this, but it was not turned on.

rdar://105751700

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