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


> Your original example had
> "c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/main.cc" for the
> name, "c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/Debug" for
> the compilation directory, and ".." and "main.c" in .debug_line.
> So .debug_info said
> "c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/main.cc" and
> .debug_line said
> "c:/QNXTau/eclipse/ide-4.5-workspace/testManagedCC/Debug/../main.cc".
> If there had been a symlink involved, those would have been different
> files; they are different paths.
> 
> The compiler should never do this.  I still say that this is a bug in
> the compiler.  Does a more recent version of GCC still do so?  GCC
> 3.3.5 predates an official FSF port to native Windows.

Ok, I finally tried carefully with 4.2.1. It turns out that it outputs
different info. Now it really looks like a gcc (3.3.5 on windows) bug:

     DW_AT_name        : ..\main.cc>~~~~$
     DW_AT_comp_dir    :
C:\QNXTau\eclipse\ide-4.5-workspace\testManagedCC\Debug>

     DW_AT_name        : ..\main.cc>~~~~$
     DW_AT_comp_dir    :
C:\QNXTau\eclipse\ide-4.5-workspace\testManagedCC\Debug>

I was mislead with the fact that if I debug binary compiled with gcc 4.2.1
on linux gdb, it is still failing to set a breakpoint:

+b main.cc:12
No source file named main.cc.

But now it is failing for different reasons, most probably due to
IS_ABSOLUTE_PATH stuff.


Thanks,

Aleksandar Ristovski


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