This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gcc options for improving debugging?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]