Images in the shared cache have their segments mapped non-contiguously. We
don't know how to find where the non-__TEXT segments actually are. Also, the
code assumes that the image is mapped contiguously in various places. So, we
just ignore those segments.
Treating the non-contiguous segments as though they were contiguous caused
their apparent memory ranges to overlap, leading to addresses being attributed
to the wrong module, let alone symbol.
Such external debug info files are created by the dsymutil command. Usually, it
creates a <name>.dSYM bundle directory but it can also produce a <name>.dwarf
flat file. The code will find and use either. It first checks if such a bundle
or file is adjacent to the module binary. If it's not, it uses Spotlight to
search for a .dSYM bundle based on the binary's UUID, which is what gdb and lldb
do, too. That way, it can find it anywhere on the system.