This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies
- From: Aleksandar Ristovski <ARistovski at qnx dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: dje at google dot com, gdb-patches at sourceware dot org, Ryan Mansfield <RMansfield at qnx dot com>
- Date: Tue, 8 Jan 2008 16:51:02 -0500
- Subject: RE: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies
> I do not see how the text you quoted has any bearing on this
> situation.
Daniel, let me recap:
My gcc 3.3.5 output:
DW_AT_name :
c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/main.cc
DW_AT_comp_dir :
c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/Debug
...
The Directory Table:
..
The File Name Table:
Entry Dir Time Size Name
1 1 0 0 main.cc
My gcc 4.2.1 output:
DW_AT_name : ..\main.cc
DW_AT_comp_dir :
C:\QNXTau\eclipse\ide-4.5-workspace\testManagedCC\Debug
...
The Directory Table is empty.
The File Name Table:
Entry Dir Time Size Name
1 0 0 0 ..\main.cc
Following the spec, I conclude that
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.
2. case 4.2.1:
DW_AT_name is correct, according to point 2 of quoted document.
DW_AT_comp_dir is also correct and
file table in debug_line seems to be correct too.
You suggested that output from case 3.3.5 was a bug and should not occur (I
thought your statement: "The compiler should never do this. I still say
that this is a bug in the compiler. " was referring to this situation,
apologies if I misinterpreted what you said).
Does it make sense now?
Thanks,
Aleksandar