[LLVMdev] [patch] DwarfDebug problem with line section
pietreka at gmail.com
Wed Jun 30 01:57:21 PDT 2010
Thanks for working on that. Unfortunately after your change it still doesn't
work (I've tried x86 and our backend under Linux).
The problem is that you put difference between two labels
.Lset7 = .Lsection_line_begin-.Lsection_line ## DW_AT_stmt_list
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.
On Tue, Jun 29, 2010 at 10:18 PM, Devang Patel <devang.patel at gmail.com>wrote:
> I updated DwarfDebug to use section offset, instead of hard coding 0,
> to handle LTO properly.
> Thanks for brining this up.
> On Tue, Jun 29, 2010 at 11:27 AM, Devang Patel <devang.patel at gmail.com>
> > DW_AT_stmt_list attribute's value is a section offset to the line no
> > info for current compilation unit. If there is only one compilation
> > unit generated per .o file then it is always zero. What kind of errors
> > are you seeing ?
> > -
> > Devang
> > On Tue, Jun 29, 2010 at 9:02 AM, Artur Pietrek <pietreka at gmail.com>
> >> Hi all,
> >> While implementing debug info for our backend, we've noticed a problem
> >> debug_line section. We believe that the following code is wrong:
> >> // DW_AT_stmt_list is a offset of line number information for this
> >> // compile unit in debug_line section. It is always zero when only one
> >> // compile unit is emitted in one object file.
> >> addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
> >> After compiling several files and linking them together (not only using
> >> backend, but also x86) debug information was incorrect.
> >> I'm not 100% sure if this fix is correct, but patch attached.
> >> Artur
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> > --
> > -
> > Devang
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev