<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - LLVM generates broken debug info on Windows"
href="http://llvm.org/bugs/show_bug.cgi?id=16249">16249</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM generates broken debug info on Windows
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>chega_@yahoo.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10639" name="attach_10639" title="C source file">attachment 10639</a> <a href="attachment.cgi?id=10639&action=edit" title="C source file">[details]</a></span>
C source file
Compile the attached source and run under gdb:
<span class="quote">>clang -g repro.c -o repro.exe
>gdb repro.exe</span >
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>
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:
<<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>...
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>