]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 13 Apr 2004 18:36:36 +0000 (18:36 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 13 Apr 2004 18:36:36 +0000 (11:36 -0700)
2004-04-13  H.J. Lu  <hongjiu.lu@intel.com>

PR debug/14919

From gcc-3_2-rhl8-branch:
2003-02-04  Jakub Jelinek  <jakub@redhat.com>

* 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

gcc/ChangeLog
gcc/dwarf2out.c

index 2f5102f61436240e75698229d64a5a88d7e39494..52cc0a27bdf014708f005b9204bacbbad31b1e60 100644 (file)
@@ -1,3 +1,14 @@
+2004-04-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR debug/14919
+
+       From gcc-3_2-rhl8-branch:
+       2003-02-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * 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  <dpatel@apple.com>
 
        PR 14467
index af76e0c348afb2ab9f0052cc778218549a91f0ee..afd02e27f842df2355fb80d792e2864829dc5df7 100644 (file)
@@ -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.