@@ -1254,6 +1255,8 @@
objfile->global_psymbols.next,
objfile->static_psymbols.next);
+ pst->dirname = xstrdup ( comp_unit_die.dirname );
+
pst->read_symtab_private = (char *)
obstack_alloc (&objfile->objfile_obstack, sizeof (struct
dwarf2_pinfo));
DWARF_INFO_BUFFER (pst) = dwarf_info_buffer;
@@ -4326,6 +4329,10 @@
/* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
if (part_die->name == NULL)
part_die->name = DW_STRING (&attr);
+ break;
+ case DW_AT_comp_dir:
+ if (part_die->dirname == NULL)
+ part_die->dirname = DW_STRING (&attr);
The dwarf2 specs say that the name is in the form ":pathname" or
"hostname:pathname". Should we worry about the hostname? Does gcc emit
that? I have looked at a few executables and didn't see the hostname
part.