[all-commits] [llvm/llvm-project] 5e017c: [DWARF] Allow empty address range tables.

Igor Kudrin via All-commits all-commits at lists.llvm.org
Wed Jan 22 21:43:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e017c12d22ab48aae34dced543bdbeba9b9893c
      https://github.com/llvm/llvm-project/commit/5e017c12d22ab48aae34dced543bdbeba9b9893c
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
    A llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s

  Log Message:
  -----------
  [DWARF] Allow empty address range tables.

Empty address range tables are allowed by the DWARF standard;
Moreover, generating them is recommended as a best practice, see
http://wiki.dwarfstd.org/index.php?title=Best_Practices#Generating_.debug_aranges_data

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


  Commit: dcff3961c2d0872074e405d3fb06b28259bb652f
      https://github.com/llvm/llvm-project/commit/dcff3961c2d0872074e405d3fb06b28259bb652f
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
    M llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s
    M llvm/test/ObjectYAML/MachO/DWARF-debug_abbrev.yaml
    M llvm/test/ObjectYAML/MachO/DWARF-debug_str.yaml
    M llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
    M llvm/test/ObjectYAML/MachO/DWARF2-AddrSize8-FormValues.yaml
    M llvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml
    A llvm/test/tools/llvm-dwarfdump/X86/debug_aranges-error.s
    A llvm/test/tools/obj2yaml/macho-DWARF-debug_aranges-error.yaml
    M llvm/tools/obj2yaml/dwarf2yaml.cpp
    M llvm/tools/obj2yaml/macho2yaml.cpp
    M llvm/tools/obj2yaml/obj2yaml.cpp
    M llvm/tools/obj2yaml/obj2yaml.h
    M llvm/unittests/DebugInfo/DWARF/CMakeLists.txt
    A llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp

  Log Message:
  -----------
  [DWARF] Return Error from DWARFDebugArangeSet::extract().

This helps to detect and report parsing errors better.
The patch follows the ideas of LLDB's patches D59370 and D59381.

It adds tests for valid and some invalid cases. More checks and
tests to come. Note that the patch fixes validation of the Length
field because the value does not include the field itself.

The existing users are updated to show the error messages.

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


  Commit: d6f39cfed06c027d653839adc5b20cee1d79f51d
      https://github.com/llvm/llvm-project/commit/d6f39cfed06c027d653839adc5b20cee1d79f51d
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/Dwarf.h

  Log Message:
  -----------
  [DWARF] Make dwarf::getUnitLengthFieldByteSize() constexpr. NFC.

This will help make some expressions in upcoming patches constexpr.

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


  Commit: a0f367f792aca27c78e9be75bc44f0d346ee157a
      https://github.com/llvm/llvm-project/commit/a0f367f792aca27c78e9be75bc44f0d346ee157a
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/Dwarf.h

  Log Message:
  -----------
  [DWARF] Make dwarf::getDwarfOffsetByteSize() a free function. NFC.

This will help simplify code in upcoming patches and make some
expressions constexpr.

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


  Commit: 6332990721d9b231ead9ea39e96a6ec0dc61c6cb
      https://github.com/llvm/llvm-project/commit/6332990721d9b231ead9ea39e96a6ec0dc61c6cb
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
    M llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
    M llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp

  Log Message:
  -----------
  [DWARF] Support DWARF64 in DWARFDebugArangeSet.

This allows parsing Address Range Tables in the 64-bit DWARF format.

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


  Commit: ed9851a0a682d1ff288ed749287fbc7682ed1514
      https://github.com/llvm/llvm-project/commit/ed9851a0a682d1ff288ed749287fbc7682ed1514
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-01-23 (Thu, 23 Jan 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp

  Log Message:
  -----------
  [DWARF] Better detect errors in Address Range Tables.

The patch tries to cover most remaining cases of wrong data.

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


Compare: https://github.com/llvm/llvm-project/compare/53a28bd8917c...ed9851a0a682


More information about the All-commits mailing list