The best part of is that you can get all this goodness even without having Swift code in your codebase.
Just link your C++ (or whatever) project with The Swift runtime (swiftrt.o and libswiftCore.so), and there you have it without writing any Swift.
Just link your C++ (or whatever) project with The Swift runtime (swiftrt.o and libswiftCore.so), and there you have it without writing any Swift.
[0] https://www.sandordargo.com/blog/2022/09/21/cpp23-stacktrace...
[1] https://www.gnu.org/software/libc/manual/html_node/Backtrace...
Swift Backtracing is not only about the symbols, it’s also interactive and lets you attach the debugger after the process crashes, which is neat.
-lswift_Backtracing also works, but dunno if that's "public API"
$ codesign --force --sign - --entitlements entitlements.plist foo
https://github.com/apple/swift/blob/main/docs/Backtracing.rs...
$ SWIFT_BACKTRACE="enable=yes" ./foo
Very cool!