[Lldb-commits] [PATCH] D46810: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 14 02:24:02 PDT 2018


labath added a comment.

I **think** I understand what is going on here, but I can't say for certain. Could you elaborate on the implementation details of this somewhere. It would be good to keep a note of this for future maintainers. My understanding of this is:

- if nothing has been parsed, m_die_array is empty  and m_first_die is empty
- if the cu die has been parsed, m_die_array us empty and m_first_die is full
- if everything has been parsed m_first_die and m_die_array are full, **and** the first element of m_die_array contains a copy of m_first_die

Is that an accurate description of what you are doing here? (If that is true, then I think this is workable, but there are still some details which need to be ironed out; e.g., `m_first_die.GetFirstChild()`)


https://reviews.llvm.org/D46810





More information about the lldb-commits mailing list