[lldb][Darwin] Don't add zero-length segments to SectionLoadList (#195206)
On Darwin systems with a shared cache, all the system binaries are
combined into a single range of virtual address space, placing all the
TEXT segments together, all the DATA segments together, etc. It shrinks
the sizes of the segments from their on-disk file size to the actual
size needed for their contents, instead of observing page alignment
rules for segments.
And in one uncommon case, it is possible for a segment to not be put in
the shared cache virtual range at all.
When DynamicLoaderDarwin adds each file's segments to the Target
SectionLoadList (the table showing what VM ranges they are mapped to),
we're using the original file's segment sizes. But the in-memory segment
sizes may be different for binaries in the shared cache. And for a
segment which is eliminated entirely (zero length), we'll get warnings
as the next segment is added to the same address in the SectionLoadList.
To start with, this PR is handling the special case of these segments
that become zero length -- by not adding them to the SectionLoadList at
all.
rdar://174948380