[all-commits] [llvm/llvm-project] 7d019d: [LLDB] Set the right address size on output DataEx...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Dec 2 12:43:59 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d019d1a3be252a885e8db1ee7af11c90b450d38
      https://github.com/llvm/llvm-project/commit/7d019d1a3be252a885e8db1ee7af11c90b450d38
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-12-02 (Mon, 02 Dec 2019)

  Changed paths:
    M lldb/source/Symbol/ObjectFile.cpp
    A lldb/test/Shell/SymbolFile/DWARF/win-i386-line-table.s

  Log Message:
  -----------
  [LLDB] Set the right address size on output DataExtractors from ObjectFile

If filling in a DataExtractor from an ObjectFile, e.g. via the
ReadSectionData method, the output DataExtractor gets the address
size from the m_data member.

ObjectFile's m_data member is initialized without knowledge about
the address size (so the address size is set based on the host's
sizeof(void*), and at that point within ObjectFile's constructor,
virtual methods implemented in subclasses (like GetAddressByteSize())
can't be called, therefore fix it up when filling in external
DataExtractors.

This makes sure that line tables from executables with a different
address size are parsed properly; previously this tripped up
DWARFDebugLine::LineTable::parse for 32 bit executables on a 64 bit
host, as the address size in the line table (4) didn't match the
one set in the DWARFDataExtractor.

Differential Revision: https://reviews.llvm.org/D70848




More information about the All-commits mailing list