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

            Bug ID: 16249
           Summary: LLVM generates broken debug info on Windows
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10639
  --> http://llvm.org/bugs/attachment.cgi?id=10639&action=edit
C source file

Compile the attached source and run under gdb:

>clang -g repro.c -o repro.exe
>gdb repro.exe
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\test\repro.exe...DW_FORM_strp pointing outside of
.debug_str section [in module C:\test\repro.exe]

Same source compiled with gcc work fine.

I've compared asm emitted by clang with that created by gcc, and the difference
seems to be that for inter-debug-section references gcc uses .secrel32 <label>
directive, whereas clang uses .long <label>.   After manually replacing .long's
with .secrel32's and building executable, gdb seemed to like the new debug info
a lot more!

I've run into the same trouble with another project that uses LLVM, so this is
not clang-specific.

-- 
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

Reply via email to