Re: Core dump information when code is optimized

Joel Brobecker
2009-04-16T07:09:09Z

> 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