[Lldb-commits] [PATCH] D66789: Remove DWARFExpression::LocationListSize

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 27 01:35:11 PDT 2019


labath created this revision.
labath added reviewers: JDevlieghere, clayborg.
Herald added subscribers: kristof.beyls, javed.absar, aprantl.

The only reason for this function's existance is so that we could pass
the correct size into the DWARFExpression constructor. However, there is
no harm in passing the entire data extractor into the DWARFExpression,
since the same code is performing the size determination as well as the
subsequent parse. So, if we get malformed input or there's a bug in the
parser, we'd compute the wrong size anyway.

Additionally, reducing the number of entry points into the location list
parsing machinery makes it easier to switch the llvm debug_loc(lists)
parsers.

While inside, I added a couple of tests for invalid location list
handling.


https://reviews.llvm.org/D66789

Files:
  include/lldb/Expression/DWARFExpression.h
  lit/SymbolFile/DWARF/debug_loc.s
  source/Expression/DWARFExpression.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66789.217323.patch
Type: text/x-patch
Size: 8438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190827/564ac3aa/attachment.bin>


More information about the lldb-commits mailing list