Currently we read many small chunks from the process we're backtracing.
If it so happens that it's the local process, that isn't really a big
problem, but if it's a remote process, especially on Linux where we have
to use the memory server, it's probably a little slow.
Fix by adding a caching layer.
rdar://117681625
It was pointed out that there was a more Swift-y way to write the
bounds checks for the `fetch<T>` implementation, so do that instead.
rdar://117590155
We don't really need it after calling `mmap()`, and not keeping it around
means it's easy to make sure it gets closed properly in all cases.
rdar://117590155
On Linux we use FileImageSource to read data from ELF images. We were
doing this in a fairly naive manner, which turns out to be a performance
issue with larger statically linked binaries on Linux.
Change FileImageSource to use mmap() instead.
rdar://117590155
Use the new module structure rather the old SwiftShims header. This
is much cleaner and lets us include operating system headers to get
the relevant definitions where possible.
Add code to support ELF and DWARF, including decompression using
zlib, zstd and liblzma if those turn out to be required and available.
rdar://110261712