This is the mail archive of the
mailing list for the GCC project.
Best set of gcc options for debugging
- From: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 08 Jul 2004 15:58:02 -0500
- Subject: Best set of gcc options for debugging
Recently, I've been having a lot of frustration using gdb with gcc 3.4.1
(and even more so on 3.5) with stabs.
I'm having the usual sorts of problems: variables that mysteriously
change value at each evaluation, 'step' stepping through statements in
arbitrary order, function arguments/parameters being different values in
the caller and callee frame, etc.
This has always happened occasionally to some extent, but it seems that
now it is a lot worse than it was, say, two years ago.
I'm using -g with no optimization-related -f or -O flags. Are there any
other options I need to use on today's GCC to tame the debugger?
What is the story with -g3? Does this actually do anything useful?
Aaron W. LaFramboise