swiftfilt
CLILibraryDebugging
Swift crash logs are full of names like $s4main3fooyyFSi_Tg5. Pipe the log through swiftfilt and they come back as specialized foo(), with everything else left exactly as it was.
It's c++filt for Swift. Run a crash log, a build log or nm output through it and every mangled name turns readable, live under tail -f if you want. When a name refuses to demangle, swiftfilt explain tells you why, usually a frame cut short by a log column. And swiftfilt census reads your link map and tells you what's actually taking up space in your binary: which generics got specialized how many times, and how much of it the compiler wrote for you.
Install
Prebuilt binary (macOS universal, Linux x86_64/aarch64)
curl -fsSL https://raw.githubusercontent.com/mi11ione/swiftfilt/main/install.sh | sh Or through Homebrew
brew install mi11ione/tap/swiftfilt swiftfilt v1.0.2
3CLI
$ swiftfilt < crash.log
0 MyApp AppIntentsXPCError.errorCode.getter + 12
1 MyApp specialized foo() + 4
2 MyApp @objc bar.bas(zim:) + 40
3 MyApp $s4main9foo + 8 explain: cut short at byte 8
| Designation | MI-04 |
|---|---|
| Class | CLI · Library · Debugging |
| Build | Swift · zero dependencies |
| Version | 1.0.2 |
| Source | github.com/mi11ione/swiftfilt |