[swift-dev] tips for debugging the swift executable

Rafkind, Jon jon.rafkind at hpe.com
Thu Dec 17 16:57:24 CST 2015


I use gdb on linux to debug the swift binary. I find that gdb takes about 20 seconds just to read the symbols before I can even interact with gdb. I was wondering if anyone knew of a way to decrease the symbol load time, either by some gdb settings or by compiling swift/llvm/clang in such a way as to get a usefully debuggable binary but without so many symbols.

My swift binary is a massive 1.1gb.

$ ls -lh swift
-rwxr-xr-x 1 jon jon 1.1G Dec  8 18:43 swift*

I built all of llvm/clang/swift in Debug mode.

(Tangentially related, but using gold instead of ld to link swift is about 2-3x faster)
--


More information about the swift-dev mailing list