This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/53453] darwin linker expects both AT_name and AT_comp_dir debug notes
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 13:58:13 +0000
- Subject: [Bug debug/53453] darwin linker expects both AT_name and AT_comp_dir debug notes
- Auto-submitted: auto-generated
- References: <bug-53453-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53453
--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-05-22 13:58:13 UTC ---
(In reply to comment #1)
> It looks like the lines...
>
> if (!IS_ABSOLUTE_PATH (filename) && filename[0] != '<')
> add_comp_dir_attribute (die);
>
> in gen_compile_unit_die() of dwarf2out.c need adjusted for darwin to
> insure that add_comp_dir_attribute (die) is always called.
I notice later in dwarf2out_finish() of dwarf2out.c that we have...
if (!IS_ABSOLUTE_PATH (filename))
add_comp_dir_attribute (comp_unit_die ());
else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
{
bool p = false;
htab_traverse (file_table, file_table_relative_p, &p);
if (p)
add_comp_dir_attribute (comp_unit_die ());
}
perhaps gen_compile_unit_die() needs a similar else statement?