This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Core dump information when code is optimized
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Lennyk <lennyk430 at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 16 Apr 2009 00:08:55 -0700
- Subject: Re: Core dump information when code is optimized
- References: <49E6D676.9000108@gmail.com>
> 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