These weren't working correctly because I made the unwinder call
`_swift_task_getCurrent()`, but of course when out-of-process, it calls
that in `swift-backtrace`, which is wrong. Remove that for now.
While I'm here, I also tweaked the formatting slightly, and I noticed
that we were saying that all thunks were also system functions, which
seemed unnecessary and odd.
Plus there were a couple of extra system functions I added to make the
async crash backtraces nicer in friendly mode.
rdar://106363539
The `withCurrentContext()` methods on the `Context` structs need to be
inlined, even in debug builds, otherwise we would need to skip an extra
frame at the top of the backtrace.
This fixes test failures in debug stdlib builds.
rdar://106276227
On ARM Windows, we need MARMASM to assemble the context capture code,
but CMake doesn't support MARMASM until version 3.26, which isn't yet
released.
(Confusingly it appears to have partial but non-working support in the
present versions.)
rdar://106284325
Added some extra code to AddSwiftStdlib.cmake so executable targets can
specify target SDKs the same way libraries currently can.
Updated the Backtracing targets to specify just OS X for now.
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.
While I was doing this, it turns out Saleem was fixing things to avoid
having to patch the Windows include directories, which is awesome but
necessitates an extra change to the backtracing stuff to make the build
not fail on Windows.
rdar://105409147
Some symbolication frameworks have a symbol cache; we probably don't want
to use that for test cases, to avoid running into problems where the cache
holds stale information.
rdar://105409147
Fixed the colours so that they work with all of the default Terminal
presets. Also changed things so that when colour is off, we only use
ASCII characters in our source code displays.
rdar://105452194
Just use `UInt` for `Address`. This is still the subject of some discussion
on the forums, but I haven't decided precisely what to do about it and `UInt`
makes sense for now. This also necessitated some casts elsewhere.
Improve some comments.
Made `limit` robust against silly negative values.
A couple of formatting fixes.
Don't bother supporting the macOS 10.12.2 SDK as Xcode now supports a minimum
of 10.13.
Removed some unnecessary memory rebinding.
Made `CFString` conversion slightly more efficient.
Provide the `SharedCacheInfo` fields everywhere, but make it optional all
over as well.
rdar://104336548
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