]> git.ipfire.org Git - thirdparty/gcc.git/commit
DWARF: materialize subprogram renamings in Ada as imported declarations
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Nov 2015 16:59:43 +0000 (16:59 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Nov 2015 16:59:43 +0000 (16:59 +0000)
commit1ef426cd9d0a281d5e0a33a424554ca5379fff45
tree522018b552faad2113b7bdd5be2a93c93d473835
parentbab23e46a618d7a72006da8997846104288853b1
DWARF: materialize subprogram renamings in Ada as imported declarations

... so that debugger users can reference them instead of the renamed
subprograms.  This is in accordance with the DWARF specification: the
section 3.2.3 (Imported (or Renamed) Declaration Entities) allows
DW_TAG_imported_declaration DIEs to be used "as a general means to
rename or provide an alias for an entity regardless of the context in
which the importing declaration or the imported entity occur." (wording
from the DWARFv3 and DWARFv4 specifications, allowed in DWARFv2).

gcc/ada/ChangeLog:

* gcc-interface/utils.c (gnat_write_global_declarations): Output
debugging information for top-level imported declarations.

gcc/ChangeLog:

* dwarf2out.c (gen_decl_die): Generate DW_TAG_imported_* instead
of DW_TAG_namespace for IMPORTED_DECL declarations.  Call
dwarf2out_imported_module_or_decl_1 for all DWARF versions as
this function already takes care of checking what it can emit.

Bootstrapped, regtested and checked with GDB's testsuite on
x86_64-linux.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230821 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c
gcc/dwarf2out.c