Link, as well as compile, with -g (mostly for dumptrace).