aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <derodat@adacore.com>2015-06-11 12:40:10 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2015-06-11 12:40:10 +0000
commit881a5e608a945bebcfbefcf8c521a2e481610789 (patch)
treef7c9d03a32db11d1b9f07488e40eac40beba11a8 /gcc/ada
parentf13c4673a54c76a1c92018d630f48126349732b0 (diff)
downloadgcc-881a5e608a945bebcfbefcf8c521a2e481610789.zip
gcc-881a5e608a945bebcfbefcf8c521a2e481610789.tar.gz
gcc-881a5e608a945bebcfbefcf8c521a2e481610789.tar.bz2
Restore DW_AT_abstract_origin for cross-unit call sites
PR debug/66503 gcc/ChangeLog: * debug.h (struct gcc_debug_hooks): Add a register_main_translation_unit hook. * debug.c (do_nothing_debug_hooks): Provide a function for this new hook. * dbxout.c (dbx_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * dwarf2out.c (main_translation_unit): New global variable. (dwarf2out_register_main_translation_unit): New function implementing the new hook. (dwarf2_debug_hooks): Assign dwarf2out_register_main_translation_unit to this new hook. (dwarf2out_init): Associate any main translation unit to comp_unit_die (). * c/c-decl.c (pop_scope): Register the main translation unit through the new debug hook. * cp/decl.c (cxx_init_decl_processing): Likewise. gcc/ada/ChangeLog: * gcc-interface/utils.c (get_global_context): Register the main translation unit through the new debug hook. gcc/fortran/ChangeLog: * f95-lang.c (gfc_create_decls): Register the main translation unit through the new debug hook. From-SVN: r224371
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/utils.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ad509e0..4eeb13e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * gcc-interface/utils.c (get_global_context): Register the main
+ translation unit through the new debug hook.
+
2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c: Remove duplicate include directives.
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 9076529..655bfa1 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -667,7 +667,10 @@ static tree
get_global_context (void)
{
if (!global_context)
- global_context = build_translation_unit_decl (NULL_TREE);
+ {
+ global_context = build_translation_unit_decl (NULL_TREE);
+ debug_hooks->register_main_translation_unit (global_context);
+ }
return global_context;
}