RE: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies

Aleksandar Ristovski
2008-01-08T21:24:15Z

>
> Aha! Thanks for checking, that looks much more promising.

But it won't go away...

Dwarf3 spec (December 20, 2007), page 38, points 2. and 6.:

2. A DW_AT_name attribute whose value is a null-terminated string
containing the full or relative path name of the primary source file from
which the compilation unit was derived.
....
6. A DW_AT_comp_dir attribute whose value is a null-terminated string
containing the current working directory of the compilation command that
produced this compilation unit in whatever form makes sense for the host
system.
The suggested form for the value of the DW_AT_comp_dir attribute on UNIX
systems is "hostname:pathname". If no hostname is available, the suggested
form is ":pathname".

(I find this 'suggested form' particularly scary).

Dwarf2 spec (Industry Review Draft, Revision: 2.0.0, July 27, 1993)
specifies exactly the same.

I don't know how do you interpret this, but I would say the output from my
example produced by 3.3.5 is also correct.