[Lldb-commits] [PATCH] Introduce DWARFDataExtractor for 64-Bit DWARF parsing

Ed Maste emaste at freebsd.org
Wed Oct 23 17:56:46 PDT 2013

On 23 October 2013 20:12, Greg Clayton <gclayton at apple.com> wrote:
> Do we need two functions, one for length and one for DIE offset? Can we consolidate this down to 1 function with a name like "GetDWARFWord" or something better? GetDWARFOffset? We could then switch m_is_dwarf64 to a LazyBool which is set to eLazyBoolCalculate to start with, and set it to eLazyBoolYes or eLazyBoolNo and then do the right thing from there on out.
> With the current code, you would have to call GetDWARFInitialLength() first prior to calling and GetDWARFOffset() functions. This might be ok if every DWARF section that contains these special 64 bit entries always has a length that starts it off, but I am guessing that some sections might not have a length?

The sections that support 64-bit DWARF all have an initial length that
is either 32 or 96 bits (0xffffffff followed by the 64-bit diff for
the latter).  The subsequent offsets and lengths are then 32- or

I suppose using the same logic for all cases would actually work, but
this isn't allowed according to the spec.  It also specifies that a
single CU must be all 32- or all 64-bit.

More information about the lldb-commits mailing list