[LLVMbugs] [Bug 14571] New: Invalid source file name in debug info for precompiled file.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 11 06:30:12 PST 2012


             Bug #: 14571
           Summary: Invalid source file name in debug info for precompiled
           Product: clang
           Version: 3.1
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: olga.a.chupina at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Consider the example (test.c):
#include <stdio.h>
int main (void)
    printf("Hello, world\n");
    return 0;

If we call clang with the precompiled file then the corresponding file for the
function main() is 'test.i'. Which is not quite correct since test.i starts
with directive "# 1 'test.c'".

$ clang -g -E -o test.i test.c
$ clang -g test.i -o test.exe
$ gdb test.exe

(gdb) info func main
All functions matching regular expression "main":

File test.i:                     <--  test.i instead of test.c
int main(void);

Is it an intended behavior? Or will it be fixed?

Olga Chupina
Software Engineer
Intel Compiler Team
Intel Corp.

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