diff options
author | Tom de Vries <tdevries@suse.de> | 2018-09-12 07:27:26 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-09-12 07:27:26 +0000 |
commit | 03e992aceab3207fa92d26c44dd5b4845f1c23ed (patch) | |
tree | 4d2f898a8a72ae8a0cc662e8064a1f6e04d02d8b /gcc/doc/invoke.texi | |
parent | 28aa63232068fa0adb8911b1987ff9efa0101750 (diff) | |
download | gcc-03e992aceab3207fa92d26c44dd5b4845f1c23ed.zip gcc-03e992aceab3207fa92d26c44dd5b4845f1c23ed.tar.gz gcc-03e992aceab3207fa92d26c44dd5b4845f1c23ed.tar.bz2 |
[debug] Add -gdescribe-dies
This patch adds option -gdescribe-dies. It sets the DW_AT_description
attribute of dies that do not get a DW_AT_name attribute, to make it easier
to figure out what the die is describing.
The option exports the names of artificial variables:
...
DIE 0: DW_TAG_variable (0x7fa934dd54b0)
+ DW_AT_description: "D.1922"
DW_AT_type: die -> 0 (0x7fa934dd0d70)
DW_AT_artificial: 1
...
which can be traced back to gimple dumps:
...
char a[0:D.1922] [value-expr: *a.0];
...
Furthermore, it adds names to external references:
...
DIE 0: DW_TAG_subprogram (0x7fa88b9650f0)
+DW_AT_description: "main"
DW_AT_abstract_origin: die -> label: vla_1.c.6719312a + 29 (0x7fa88b965140)
...
and likewise to DW_TAG_call_site_parameter DIEs.
Bootstrapped and reg-tested on x86_64.
2018-09-12 Tom de Vries <tdevries@suse.de>
* common.opt (gdescribe-dies): Add option.
* dwarf2out.c (add_name_and_src_coords_attributes): Add description
attribute for artifical and nameless decls.
(dwarf2out_register_external_die): Add description attribute to
external reference die.
(add_desc_attribute): New functions.
(gen_subprogram_die): Add description attribute to
DW_TAG_call_site_parameter.
* tree-pretty-print.c (print_generic_expr_to_str): New function.
* tree-pretty-print.h (print_generic_expr_to_str): Declare.
* doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
-gno-describe-dies.
(@item -gdescribe-dies): Add.
From-SVN: r264229
Diffstat (limited to 'gcc/doc/invoke.texi')
-rw-r--r-- | gcc/doc/invoke.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8ac29fd..ec12711 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -373,7 +373,7 @@ Objective-C and Objective-C++ Dialects}. -ginternal-reset-location-views -gno-internal-reset-location-views @gol -ginline-points -gno-inline-points @gol -gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol --gsplit-dwarf @gol +-gsplit-dwarf -gdescribe-dies -gno-describe-dies @gol -fdebug-prefix-map=@var{old}=@var{new} -fdebug-types-section @gol -fno-eliminate-unused-debug-types @gol -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol @@ -7466,6 +7466,12 @@ the build system to avoid linking files with debug information. To be useful, this option requires a debugger capable of reading @file{.dwo} files. +@item -gdescribe-dies +@opindex gdescribe-dies +Add description attributes to some DWARF DIEs that have no name attribute, +such as artificial variables, external references and call site +parameter DIEs. + @item -gpubnames @opindex gpubnames Generate DWARF @code{.debug_pubnames} and @code{.debug_pubtypes} sections. |