<br><br><div class="gmail_quote">On Wed, Oct 13, 2010 at 8:43 PM, Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com">viridia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Mon, Oct 11, 2010 at 11:12 AM, Devang Patel <span dir="ltr"><<a href="mailto:dpatel@apple.com" target="_blank">dpatel@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div style="word-wrap:break-word"><div><div></div><div><br><div><div>On Oct 11, 2010, at 11:04 AM, Talin wrote:</div><br><blockquote type="cite">On Mon, Oct 11, 2010 at 10:43 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br>


<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br>
On Oct 11, 2010, at 8:17 AM, Devang Patel wrote:<br>
<br>
>> Interestingly enough, I just upgraded to the latest Ubuntu (10.10 - Maverick Meercat), and the LLVM-generated code no longer builds: I get the following error in the assembler stage (after the bitcode is converted to assembly):<br>





>><br>
>>    SwitchStmtTest.s: Assembler messages:<br>
>>    SwitchStmtTest.s:294899: Fatal error: duplicate .debug_line sections<br>
>><br>
><br>
> This is a known Linux binutils bug. There is a llvm pr in bugzilla database, I don't remember the no. though.<br>
<br>
</div>Direct .o file writing support for ELF is nearing functionality, it will define away this sort of issue.<br></blockquote><div><br></div><div>While that is great news, I'd like to also keep the ability to build via assembly language, as the ability to examine the assembly has been useful in solving many otherwise difficult bugs. (Especially given the difficulties I've had getting source-level debugging to work.)</div>




<div><br></div><div>For now, however, do you know if there is a workaround for this issue?</div></div></blockquote><br></div></div></div><div>Searching "debug_line" in all llvm PR at <a href="http://llvm.org/bugs" target="_blank">llvm.org/bugs</a> would immediately lead you to</div>


<div><span style="white-space:pre-wrap">  </span><a href="http://llvm.org/bugs/show_bug.cgi?id=8210" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=8210</a></div><div>Follow the trails and you'll have all the info for this Fatal error.</div>


<div><br></div><div>-</div><div>Devang</div><div><br></div><div>[BTW, for your original dwarf error, focusing on DIFactory uses will unlikely to lead you towards real underlying issue. Your approach is equivalent to focusing on IRBuilder to find the cause of mis-compilation. ]</div>


<br></div></blockquote></div></div></div>I'm not sure I understand what you are saying. I'm not claiming that DIFactory is incorrect. I'm saying I don't know how to use it properly.<div><br></div><div>At the moment, I'm testing my frontend on both Unbuntu (Maverick Meercat) and OS X (Leopard). They both fail, but in completely different ways.</div>


<div><br></div><div>On OS X, a lot of the debug info seems to be missing entirely, even though I am running dsymutil. That is, when I link the LLVM-generated modules with my runtime library (which is compiled by gcc) I only get debug information for the modules that were compiled by gcc. However, I've inspected the .bc files carefully and it appears as though the debug metadata is in fact there.</div>


<div><br></div><div>I'm guessing at this point that there is something wrong with my linker. (Because I don't want to ship LLVM binaries around with my compiler, I have written a linker program which combines parts of 'opt' and 'llc', the GCStrategy pass, and the Reflection generator pass.<br>

</div></blockquote><div><br></div><div>(Grr, I didn't mean to hit send...I wasn't finished.) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>
<br clear="all"><br>-- <br>-- Talin<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>