gdb can't find symbols
Amar Takhar
verm at darkbeer.org
Thu Dec 17 13:16:20 UTC 2015
On 2015-12-17 00:44 -0800, Hal Murray wrote:
> > I don't know how you were compiling with -g before.
>
> My best guess is that I was confused about what/when it worked.
Ah. :)
> > No, this command was added at your request months ago. (cfe81982f)
>
> Splitting control for the DEBUG macro and the debug flag for gdb was clearly
> a good idea.
Agreed at the time I didn't realise they were different.
> I don't know how we should handle debugging with gdb. I think the normal
> approach is to build with symbols and strip them off after installing. But
> that's based on a very small sample set.
>
> What do other projects do and/or what do other people expect?
Add -g when you want it. Few users will ever need it and compiling with -g
usually requires disabling optimisations in order to work properly.
Running strip over the binaries after install isn't common anymore I think some
internal debugging such as line printing breaks when you do it -- I forget what
exactly.
Amar.
More information about the devel
mailing list