(dwarf_version): Default to 4.
(dwarf_record_gcc_switches): Default to 1.
(dwarf_strict): Default to 0.
* toplev.c (process_options): Don't handle dwarf_strict
or dwarf_version here.
* config/vxworks.c (vxworks_override_options): Don't
test whether dwarf_strict or dwarf_version are negative,
instead test !global_options_set.x_dwarf_*.
* config/darwin.c (darwin_override_options): Default to
dwarf_version 2.
* doc/invoke.texi: Note that -gdwarf-4, -grecord-gcc-switches
and -fno-debug-types-section are now the default.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186835
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ * common.opt (flag_debug_types_section): Default to 0.
+ (dwarf_version): Default to 4.
+ (dwarf_record_gcc_switches): Default to 1.
+ (dwarf_strict): Default to 0.
+ * toplev.c (process_options): Don't handle dwarf_strict
+ or dwarf_version here.
+ * config/vxworks.c (vxworks_override_options): Don't
+ test whether dwarf_strict or dwarf_version are negative,
+ instead test !global_options_set.x_dwarf_*.
+ * config/darwin.c (darwin_override_options): Default to
+ dwarf_version 2.
+ * doc/invoke.texi: Note that -gdwarf-4, -grecord-gcc-switches
+ and -fno-debug-types-section are now the default.
+
2012-04-25 Jan Hubicka <jh@suse.cz>
* cgraphunit.c: Update toplevel comment.
Map one directory name to another in debug information
fdebug-types-section
-Common Report Var(flag_debug_types_section) Init(1)
+Common Report Var(flag_debug_types_section) Init(0)
Output .debug_types section when using DWARF v4 debuginfo.
; Nonzero for -fdefer-pop: don't pop args after each function call
Generate debug information in COFF format
gdwarf-
-Common Joined UInteger Var(dwarf_version) Init(-1) Negative(gstabs)
+Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format
ggdb
Generate debug information in default extended format
gno-record-gcc-switches
-Common RejectNegative Var(dwarf_record_gcc_switches,0) Init(0)
+Common RejectNegative Var(dwarf_record_gcc_switches,0) Init(1)
Don't record gcc command line switches in DWARF DW_AT_producer.
grecord-gcc-switches
Generate debug information in extended STABS format
gno-strict-dwarf
-Common RejectNegative Var(dwarf_strict,0) Init(-1)
+Common RejectNegative Var(dwarf_strict,0) Init(0)
Emit DWARF additions beyond selected version
gstrict-dwarf
/* Functions for generic Darwin as target machine for GNU C compiler.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Apple Computer Inc.
workaround for tool bugs. */
if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
+ if (!global_options_set.x_dwarf_version)
+ dwarf_version = 2;
/* Do not allow unwind tables to be generated by default for m32.
fnon-call-exceptions will override this, regardless of what we do. */
/* Common VxWorks target definitions for GNU compiler.
- Copyright (C) 2007, 2008, 2010
+ Copyright (C) 2007, 2008, 2010, 2012
Free Software Foundation, Inc.
Contributed by CodeSourcery, Inc.
/* Default to strict dwarf-2 to prevent potential difficulties observed with
non-gdb debuggers on extensions > 2. */
- if (dwarf_strict < 0)
+ if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
- if (dwarf_version < 0)
+ if (!global_options_set.x_dwarf_version)
dwarf_version = 2;
}
option increases the size of debugging information by as much as a
factor of two.
-@item -fno-debug-types-section
-@opindex fno-debug-types-section
+@item -fdebug-types-section
@opindex fdebug-types-section
-By default when using DWARF Version 4 or higher, type DIEs are put into
+@opindex fno-debug-types-section
+When using DWARF Version 4 or higher, type DIEs can be put into
their own @code{.debug_types} section instead of making them part of the
@code{.debug_info} section. It is more efficient to put them in a separate
comdat sections since the linker can then remove duplicates.
-But not all DWARF consumers support @code{.debug_types} sections yet.
+But not all DWARF consumers support @code{.debug_types} sections yet
+and on some objects @code{.debug_types} produces larger instead of smaller
+debugging information.
@item -gstabs+
@opindex gstabs+
@item -gdwarf-@var{version}
@opindex gdwarf-@var{version}
Produce debugging information in DWARF format (if that is supported).
-The value of @var{version} may be either 2, 3 or 4; the default version is 2.
+The value of @var{version} may be either 2, 3 or 4; the default version
+for most targets is 4.
Note that with DWARF Version 2, some ports require and always
use some non-conflicting DWARF 3 extensions in the unwind tables.
DW_AT_producer attribute in DWARF debugging information. The options
are concatenated with spaces separating them from each other and from
the compiler version. See also @option{-frecord-gcc-switches} for another
-way of storing compiler options into the object file.
+way of storing compiler options into the object file. This is the default.
@item -gno-record-gcc-switches
@opindex gno-record-gcc-switches
Disallow appending command-line options to the DW_AT_producer attribute
-in DWARF debugging information. This is the default.
+in DWARF debugging information.
@item -gstrict-dwarf
@opindex gstrict-dwarf
}
}
- /* Unless over-ridden for the target, assume that all DWARF levels
- may be emitted, if DWARF2_DEBUG is selected. */
- if (dwarf_strict < 0)
- dwarf_strict = 0;
-
- /* And select a default dwarf level. */
- if (dwarf_version < 0)
- dwarf_version = 2;
-
/* A lot of code assumes write_symbols == NO_DEBUG if the debugging
level is 0. */
if (debug_info_level == DINFO_LEVEL_NONE)