[PATCH] D78558: [Support] Make DataExtractor error messages more clear

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 05:54:41 PDT 2020


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

This is a result of the discussion at D78113 <https://reviews.llvm.org/D78113>. Previously we would be
only giving the current offset at which the error was detected. However,
this was phrased somewhat ambiguously (as it could also mean that end of
data was at that offset). The new error message includes the current
offset as well as the extent of the data being read.

I've changed a couple of file-level static functions into private member
functions in order to avoid passing a bunch of new arguments everywhere.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78558

Files:
  llvm/include/llvm/Support/DataExtractor.h
  llvm/lib/Support/DataExtractor.cpp
  llvm/test/DebugInfo/X86/dwarfdump-debug-loc-error-cases2.s
  llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases2.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_extended_length_field.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_addr_too_small_for_length_field.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s
  llvm/unittests/DebugInfo/DWARF/DWARFAcceleratorTableTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFDataExtractorTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
  llvm/unittests/Support/DataExtractorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78558.258973.patch
Type: text/x-patch
Size: 16404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200421/8c8d1389/attachment.bin>


More information about the llvm-commits mailing list