[LLVMdev] [patch] DwarfDebug problem with line section

Artur Pietrek pietreka at gmail.com
Tue Jun 29 09:02:27 PDT 2010

Hi all,
While implementing debug info for our backend, we've noticed a problem with
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 our
backend, but also x86) debug information was incorrect.
I'm not 100% sure if this fix is correct, but patch attached.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100629/80c941e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: section_line_debug.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100629/80c941e9/attachment.bin>

More information about the llvm-dev mailing list