This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/14919] [3.3 Regression]: DW_AT_comp_dir is missing
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Apr 2004 23:18:00 -0000
- Subject: [Bug debug/14919] [3.3 Regression]: DW_AT_comp_dir is missing
- References: <20040411221509.14919.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-11 23:17 -------
This has not changed since:
1.126 (jason 23-Nov-99): if (wd != NULL && filename[0] != DIR_SEPARATOR)
1.126 (jason 23-Nov-99): add_AT_string (die, DW_AT_comp_dir, wd);
So I do not know how 3.2 worked at all.
3.4 changed it to:
if (filename[0] != DIR_SEPARATOR)
add_comp_dir_attribute (comp_unit_die);
else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
{
size_t i;
for (i = 1; i < VARRAY_ACTIVE_SIZE (file_table); i++)
if (VARRAY_CHAR_PTR (file_table, i)[0] != DIR_SEPARATOR
/* Don't add cwd for <built-in>. */
&& VARRAY_CHAR_PTR (file_table, i)[0] != '<')
{
add_comp_dir_attribute (comp_unit_die);
break;
}
}
This was changed with:
2003-01-16 Richard Henderson <rth@redhat.com>
* dwarf2out.c (struct file_table): Remove.
(FILE_TABLE_INCREMENT): Remove.
(file_table): Make a varray; mark for GC. Update all users.
(file_table_last_lookup_index): Extract from struct file_table.
(output_file_names): Fix unsigned compare warnings.
(add_name_attribute): Remove inline marker.
(add_comp_dir_attribute): Split out from gen_compile_unit_die.
(lookup_filename): Don't manage size of file_table.
(init_file_table): Allocate file_table with GC.
(dwarf2out_init): Don't record main_input_filename here.
(dwarf2out_finish): Do it here instead.
See <http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01195.html> for the patch but this was
needed for PCH only so something else has changed in the compiler, I am starting to think the
preprocessor changed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14919