This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Gcc options for improving debugging?
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: kernel-hacker at bennee dot com
- Cc: gdb at sources dot redhat dot com
- Date: 20 Jul 2006 11:21:22 -0400
- Subject: Re: Gcc options for improving debugging?
- References: <1153308778.9831.49.camel@okra.transitives.com>
Alex Bennee <kernel-hacker@bennee.com> writes:
> By default we build our software with -O3 which brings in a host of
> optimisations which make following code in GDB a pain. [...]
> An alternate approach is to compile with -O3 but turn off specific
> optimisations which make life tricky for gdb. [...]
There is an increasing appreciation in gcc land for the need to debug
fully optimized programs, which is manifesting itself with gradual
improvements in the quality of debugging information gcc emits. For
those cases where the data is outright missing or incorrect, you will
get more sympathy for such bug reports than perhaps in the past.
None of that may actually unravel inherent phenomena such as "funky
execution order" or "compressed backtraces", but they should improve
accurate visibility of those source-level constructs that survive into
the binary stage.
- FChE