[PATCH] D74560: [WIP] Introduce DWARFDataExtractor::getInitialLength

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 08:06:22 PST 2020


labath created this revision.
labath added reviewers: dblaikie, jhenderson, ikudrin.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch introduces a function to house the code needed to do the
DWARF64 detection dance. It also updates two instances of DWARF64
parsing code to use this function instead of the hand-rolled
implementation.

This patch does _not_ attempt to handle the problem of detecting lengths
which extend past the size of the section, or cases when reads of a
single contribution accidentally escape beyond its specified length, but
I think it's useful in its own right.

The idea is that this functionality will be built on top of that, though
I don't have an exact idea of how that will be achieved.

This patch is WIP mainly because I haven't written a unit test for the
new API yet, but I wanted to get this out the door before I call it a
day.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74560

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
  llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
  llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp
  llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_reserved_length.s
  llvm/unittests/DebugInfo/DWARF/DWARFAcceleratorTableTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74560.244434.patch
Type: text/x-patch
Size: 12327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/332feb92/attachment.bin>


More information about the llvm-commits mailing list