http://llvm.org/bugs/show_bug.cgi?id=6668
Summary: Debug info: Source file paths should be absolute
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
(If there's a way to configure this, I didn't find it with a few google
searches, and the default should anyway be the same as with gcc.)
clang stores source code path using the same name as they were given to clang.
So typically as "./file.c". This makes debugging pretty difficult for projects
that have multiple source code directories, since gdb always just complains
about missing source code file. Also even for simple programs it won't work if
you try to debug it while working dir isn't the same as the source code dir.
Here's a simple example:
~% clang test2.c -o test -g
~% cd m
~/m% gdb ../test
(gdb) b main
Breakpoint 1 at 0x400509: file ./test2.c, line 4.
(gdb) r
Starting program: /home/tss/test
Breakpoint 1, main () at ./test2.c:4
4 ./test2.c: No such file or directory.
in ./test2.c
gcc does what I expected:
(gdb) r
Starting program: /home/tss/test
Breakpoint 1, main () at test2.c:4
4 printf("foo\n");
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs