O0 cleanup_cfg vs debuggability
James E Wilson
wilson@specifixinc.com
Fri Aug 13 02:18:00 GMT 2004
On Thu, 2004-08-12 at 17:52, Richard Henderson wrote:
> It's this zero span argument that elides the block in the
> first place. Since its a zero sized span, you can never
> be inside it, so *any* listing of currently active local
> variables will not include these.
If we are compiling without optimization, then the user should be able
to see all variables and types defined in the program, even if there is
no PC where they are live. It is OK if -fno-eliminate-unused-debug-* is
necessary.
There are gdb commands for listing variables, printing their types,
etc. These work even if the variable is out of scope.
Old gcc versions support this. If I compile with gcc-2.95, then the
type and variable info comes out. Current gcc version supports this for
types if you are using stabs, but not dwarf2, which is inconsistent.
Neither debug format gets this right for variables at the moment.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list