[PATCH] D69672: DWARFDebugLoclists: Move to a incremental parsing model

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 10:01:14 PDT 2019


labath created this revision.
labath added reviewers: dblaikie, probinson, JDevlieghere, aprantl, SouraVX.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch stems from the discussion D68270 <https://reviews.llvm.org/D68270> (including some offline
talks). The idea is to provide an "incremental" api for parsing location
lists, which will avoid caching or materializing parsed data. An
additional goal is to provide a high level location list api, which
abstracts the differences between different encoding schemes, and can be
used by users which don't care about those (such as LLDB).

This patch implements the first part. It implements a call-back based
"visitLocationList" api. This function parses a single location list,
calling a user-specified callback for each entry. This is going to be
the base api, which other location list functions (right now, just the
dumping code) are going to be based on.

Future patches will do something similar for the v4 location lists, and
add a mechanism to translate raw entries into concrete address ranges.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69672

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
  llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases2.s
  llvm/test/DebugInfo/X86/fission-ranges.ll
  llvm/test/DebugInfo/X86/stack-value-piece.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69672.227301.patch
Type: text/x-patch
Size: 19282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/236eaddc/attachment-0001.bin>


More information about the llvm-commits mailing list