[debug] Introduce -fno-debug-types-section flag
Tue Mar 29 10:24:00 GMT 2011
Some dwarf consumers (dwarves, systemtap and dwarflint) grok Dwarf V4,
but not yet the new .debug_types section. To make it easier to use these
tools with -gdwarf-4 this patch introduces a new
-fno-debug-types-section flag and guards all code that is type unit
specific with use_debug_types instead of a generic dwarf_version >= 4
flag. IMHO this makes the code also slightly more readable. And it
re-enables the usage of -feliminate-dwarf2-dups with -gdwarf-4. Although
admittedly the value of that is probably pretty low. I found it helpful
in debugging some issues with dwarf consumers and DW_FORM_ref_addr
2011-03-29 Mark Wielaard <firstname.lastname@example.org>
* common.opt (fdebug-types-section): New flag.
* doc/invoke.texi: Document new -fno-debug-types-section flag.
* dwarf2out.c (use_debug_types): New define.
(struct die_struct): Mark die_id with GTY desc use_debug_types.
(print_die): Guard output of type unit signatures using
(build_abbrev_table): Replace assert of dwarf_version >= 4
with assert on use_debug_types.
(value_format): Decide AT_ref_external form on use_debug_types.
(output_die): Replace dwarf_version version check guard with
use_debug_types where appropriate.
Bootstrapped on x86_64 GNU/Linux, no regressions.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9170 bytes
Desc: not available
More information about the Gcc-patches