Suppose you've got two line sequences.

First sequence:
4198512
4198544
4198547
4198562

Second sequence:
4198528
4198531
4198537
4198552

These two line sequences overlap, and will not be inserted correctly into a
LineTable.  This sounds like a bug to me, because as far as I can tell
there is nothing preventing LineSequences being organized this way,
but LineTable::InsertSequence assumes that this cannot happen.

On Fri, Feb 12, 2016 at 11:01 AM Zachary Turner <ztur...@google.com> wrote:

> On Thu, Feb 11, 2016 at 5:35 PM Greg Clayton <gclay...@apple.com> wrote:
>
>>
>> > 5. ParseCompileUnitLineTable.  On the LineTable class you can add "line
>> sequences" or individual entries.  What's the difference here?  Is there
>> any disadvantage to adding every single line entry in the line table using
>> the InsertLineEntry instead of building a line sequence and inserting the
>> sequence?
>>
>> The rule follows DWARF line tables: line sequences must be an array of
>> line entries whose addresses are always increasing. You can add every line
>> in sequence as long as the line entries are in increasing address order. We
>> are going to sort the line entries into an array that is sorted for quick
>> lookups.
>>
> Just to make sure I understand, semantically here, there is nothing
> special about a line sequence, it's just an optimization to let LineTable
> know you're giving it sorted values?  So any lines you add via a
> LineSequence, could also be added individually with insertLine, but it
> would be slower?  And aside from that everything else would still work as
> expected?
>
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to