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
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
The Linux Swift compiler is ICEing when building _Backtracing, while
Windows still needs some tweaks. In order to land this sooner, disable
this code except for macOS.
Adds a new swift_Backtracing library, with a corresponding _Backtracing
module, to the build. Also add some tests.
This is not public API at this point, but will be used by the external
backtracing program, `swift-backtrace`.
rdar://104336548