[LLVMbugs] [Bug 3901] New: clang: pathnames are not normalized in debug info -> gdb can't find file

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Mar 29 07:51:44 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=3901

           Summary: clang: pathnames are not normalized in debug info -> gdb
                    can't find file
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Example:
../../clamav-devel/configure CC=clang

The program I compile (ClamAV) has sources in clamscan/, libclamav/,
but I build with srcdir != objdir, so all sources are with ../../.

clamscan is built inside the clamscan directory for example,
so it contains 3 ../ to access the source, however when I run gdb from toplevel
it needs only 2 ../ to access it.
gcc seems to use absolute pathnames, so it doesn't suffer from this problem,
and building objdir != srcdir works without any problems.

Results in this:
(gdb) b main
Breakpoint 1 at 0x4081ea: file
../../../clamav-devel/clamscan/../../../clamav-devel/clamscan/clamscan.c, line
71.
(gdb) r
Starting program: /home/edwin/clam/git/builds/clang/clamscan/.libs/lt-clamscan
[Thread debugging using libthread_db enabled]
[New Thread 0x7f79df7186f0 (LWP 11090)]
[Switching to Thread 0x7f79df7186f0 (LWP 11090)]

Breakpoint 1, main (argc=1, argv=0x7fffe7743ae8) at
../../../clamav-devel/clamscan/../../../clamav-devel/clamscan/clamscan.c:71
71     
../../../clamav-devel/clamscan/../../../clamav-devel/clamscan/clamscan.c: No
such file or directory.
        in
../../../clamav-devel/clamscan/../../../clamav-devel/clamscan/clamscan.c
Current language:  auto; currently minimal


With llvm-gcc or gcc I get:
(gdb) b main
Breakpoint 1 at 0x408566: file clamscan.c, line 84.
(gdb) r
Starting program:
/home/edwin/clam/git/builds/llvm-gcc/clamscan/.libs/lt-clamscan
[Thread debugging using libthread_db enabled]
[New Thread 0x7facac5236f0 (LWP 11123)]
[Switching to Thread 0x7facac5236f0 (LWP 11123)]

Breakpoint 1, main (argc=1, argv=0x7fffb454c8e8) at clamscan.c:84
84          sigemptyset(&sigset);
(gdb)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list