[Backtracing][Linux] Add Linux crash handler to the runtime.

This also adds a function to demangle a symbol, and a way for the
backtracing code to report warning messages to the same place as
the main runtime.

I'd like to rename the _swift_isThunkFunction() SPI also, but we
can't do that until we've made the changes to the _Backtracing
library, so we'll do that there instead.

rdar://110261430
This commit is contained in:
Alastair Houghton
2023-06-05 15:35:20 +01:00
parent 73df9f2dd9
commit 2dcaa6f14f
7 changed files with 959 additions and 9 deletions

View File

@@ -124,6 +124,9 @@ swift_dynamicCastFailure(const void *sourceType, const char *sourceName,
SWIFT_RUNTIME_EXPORT
void swift_reportError(uint32_t flags, const char *message);
SWIFT_RUNTIME_EXPORT
void swift_reportWarning(uint32_t flags, const char *message);
// Halt due to an overflow in swift_retain().
SWIFT_RUNTIME_ATTRIBUTE_NORETURN SWIFT_RUNTIME_ATTRIBUTE_NOINLINE
void swift_abortRetainOverflow();