From: H.J. Lu Date: Tue, 13 Apr 2004 18:36:36 +0000 (+0000) Subject: [multiple changes] X-Git-Tag: releases/gcc-3.3.4~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=644bbb494229517bb15aac97b50aa1bf1df7f00c;p=thirdparty%2Fgcc.git [multiple changes] 2004-04-13 H.J. Lu PR debug/14919 From gcc-3_2-rhl8-branch: 2003-02-04 Jakub Jelinek * dwarf2out.c (dwarf2out_finish): Add AT_comp_dir attribute even if input file name is absolute, but one of the includes is relative. From-SVN: r80648 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f5102f61436..52cc0a27bdf0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-04-13 H.J. Lu + + PR debug/14919 + + From gcc-3_2-rhl8-branch: + 2003-02-04 Jakub Jelinek + + * dwarf2out.c (dwarf2out_finish): Add AT_comp_dir attribute + even if input file name is absolute, but one of the includes + is relative. + 2004-04-06 Devang Patel PR 14467 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index af76e0c348af..afd02e27f842 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12735,6 +12735,22 @@ dwarf2out_finish (input_filename) limbo_die_node *node, *next_node; dw_die_ref die = 0; + if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL) + { + char *wd = getpwd (); + unsigned i; + + if (wd != NULL) + { + for (i = 1; i < file_table.in_use; i++) + if (file_table.table[i][0] != DIR_SEPARATOR) + { + add_AT_string (comp_unit_die, DW_AT_comp_dir, wd); + break; + } + } + } + /* Traverse the limbo die list, and add parent/child links. The only dies without parents that should be here are concrete instances of inline functions, and the comp_unit_die. We can ignore the comp_unit_die.