Core dump information when code is optimized

Joel Brobecker brobecker@adacore.com
Thu Apr 16 09:00:00 GMT 2009


> Is there a way to get this information with core dump - but maintain the  
> optimized sized executable?

The -O flags are completely independent from debugging information.
In order to do symbolic debugging, GDB needs debugging information,
which is why using the -g switch helps. There might be a way to produce
only line number information if that's what you need, but I don't know
offhand. Check the compiler/linker docs. Regardless, the extra info
will cause the size of your executable to grow, as you have discovered.

-- 
Joel



More information about the Gdb mailing list