[Lldb-commits] [PATCH] [Review request] Handle unsorted DWARF line table

Kaylor, Andrew andrew.kaylor at intel.com
Wed Dec 19 13:52:31 PST 2012

The TestDataFormatterGlobals test case was failing on Linux because the process being debugged contained a line table for one compile unit which was not sorted by address in the internal representation (though its use assumed that it would be).  I tracked this down to a place where the line table was being built in SymbolFileDWARF.cpp.

A comment in the code claimed that the DWARF specification guarantees that addresses for the line table would be in increasing order.  However, I don't believe that this is correct.  The DWARF specification says that addresses for a sequence (i.e. series of contiguous instructions) will be in increasing order.  However, it also states that a compile unit may contain multiple sequences which may not be contiguous.

As such, the attached patch changes the call at this location from AppendLineEntry (which assumes a pre-sorted list) to InsertLineEntry (which does not).  I didn't find any other callers of AppendLineEntry, so I am also removing that.

Can someone review this for me, particularly verifying that there is no reason to keep AppendLineEntry around?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121219/a1b21800/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line-table.patch
Type: application/octet-stream
Size: 3500 bytes
Desc: line-table.patch
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121219/a1b21800/attachment.obj>

More information about the lldb-commits mailing list