This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, Jan 08, 2008 at 04:51:02PM -0500, Aleksandar Ristovski wrote:
> 1. case 3.3.5:
> DW_AT_name is correct, according to point 2 of quoted document.
> DW_AT_comp_dir is correct, according to point 6 of the quoted text.
> File table in debug_line section is correct (according to the spec) as it
> specifies files relative to DW_AT_comp_dir.

You can't use the DWARF specification like this.  It describes a
representation, but not all the semantics of the representation; there
are plenty of things that appear valid according to the specification
and are still broken or meaningless.  In the end you have to judge the
debug info based on its usefulness to consumers.

The compiler specifies the same directory using two completely
different names.  I think this is a bug in the compiler, and that GDB
is not obliged to figure out that the two files are the same.

If you still need GDB to figure this out, I am open to a patch which
handles the case of a single entry in the line table with the correct
basename (i.e. if there is only one "main.c").  For any more
complicated situation, I think that guessing is too likely to break
some other case with more useful debug information.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]