Hi Devang,<div><br></div><div>Thanks for working on that. Unfortunately after your change it still doesn't work (I've tried x86 and our backend under Linux).</div><div>The problem is that you put difference between two labels</div>
<div><br></div><div>.Lset7 = .Lsection_line_begin-.Lsection_line ## DW_AT_stmt_list</div><div><br></div><div>and that will be evaluated by assembler to a constant. It has to be a label, not a constant, because it is the linker who knows the correct offset.</div>
<div><br></div><div>Artur</div><div><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 10:18 PM, Devang Patel <span dir="ltr"><<a href="mailto:devang.patel@gmail.com">devang.patel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I updated DwarfDebug to use section offset, instead of hard coding 0,<br>
to handle LTO properly.<br>
r107202.<br>
<br>
Thanks for brining this up.<br>
-<br>
Devang<br>
<div><div></div><div class="h5"><br>
On Tue, Jun 29, 2010 at 11:27 AM, Devang Patel <<a href="mailto:devang.patel@gmail.com">devang.patel@gmail.com</a>> wrote:<br>
> DW_AT_stmt_list attribute's value is a section offset to the line no<br>
> info for current compilation unit. If there is only one compilation<br>
> unit generated per .o file then it is always zero. What kind of errors<br>
> are you seeing ?<br>
><br>
> -<br>
> Devang<br>
><br>
> On Tue, Jun 29, 2010 at 9:02 AM, Artur Pietrek <<a href="mailto:pietreka@gmail.com">pietreka@gmail.com</a>> wrote:<br>
>> Hi all,<br>
>> While implementing debug info for our backend, we've noticed a problem with<br>
>> debug_line section. We believe that the following code is wrong:<br>
>> // DW_AT_stmt_list is a offset of line number information for this<br>
>> // compile unit in debug_line section. It is always zero when only one<br>
>> // compile unit is emitted in one object file.<br>
>> addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);<br>
>> After compiling several files and linking them together (not only using our<br>
>> backend, but also x86) debug information was incorrect.<br>
>> I'm not 100% sure if this fix is correct, but patch attached.<br>
>> Artur<br>
>><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
>><br>
><br>
><br>
><br>
> --<br>
> -<br>
> Devang<br>
><br>
<br>
<br>
<br>
</div></div>--<br>
-<br>
<font color="#888888">Devang<br>
</font></blockquote></div><br></div>