23.10 · Demangling, atos and empty dSYMs, and log formatting
Two details that decide whether production evidence is usable: whether symbols resolve to lines, and what the log actually recorded.
Mental model. Evidence is only as good as its symbols and its formatting; check both before you need them.
Symbols
Swift mangled names, load addresses and dSYMs that turn out empty.
- What are Swift mangled names such as $s3sym7AccountV7deposityySiF, how do you read them, and where do they show up?
Swift encodes a symbol’s module, type, name and signature into its linker name. $s marks Swift 5+ mangling, then length-prefixed identifiers (3sym the module… - How do you symbolicate one crash address by hand: load address, ASLR slide, atos, stripped binaries and dSYMs?
Addresses in a crash report are runtime addresses: the image was loaded at a random offset (ASLR). atos -o <dSYM binary> -arch arm64 -l <load address>… - Why can a dSYM exist yet give no file and line numbers, and how do you check it?
A dSYM is built by dsymutil from the debug map in the linked binary, which points at the original object files. If those objects are gone, the dSYM has nothing…
Logs
Formatting and privacy details of Logger.
- How do Logger interpolation formats, privacy options and compile-time checks work, and what does your own process see when it reads its log back?
Logger messages are not ordinary strings: the compiler builds an OSLogMessage from the literal and its interpolations, so the format string is a compile-time…
More in Debugging & Instruments
- 23.1 · LLDB and breakpoints
- 23.2 · The view debugger, network inspection and memory bugs
- 23.3 · Sanitizers, and bugs that only appear in Release
- 23.4 · Unified logging: Logger, levels, privacy and reading logs back
- 23.5 · Crash reports, symbolication and a production diagnostics pipeline
- 23.6 · Console, sysdiagnose and reproducing a bug
- 23.7 · Schemes, test plans, simulators and derived data
- 23.8 · Reading sanitizer output, exit codes and runtime traps
- 23.9 · Diagnosing a hang, malloc debugging and leaks from the command line