[PATCH] D83043: [DebugInfo] Use Cursor to detect errors in debug line prologue parser

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 08:05:53 PDT 2020


jhenderson marked an inline comment as done.
jhenderson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:404-407
     for (uint32_t I = 1; I < OpcodeBase; ++I) {
-      uint8_t OpLen = DebugLineData.getU8(OffsetPtr);
+      uint8_t OpLen = DebugLineData.getU8(Cursor);
       StandardOpcodeLengths.push_back(OpLen);
     }
----------------
labath wrote:
> Maybe `DebugLineData.getU8(Cursor, StandardOpcodeLengths.begin(), OpcodeBase-1)`
That didn't quite work. I think the signature requires either a `SmallVector` or a pre-sized vector and `.data()`. I'll make some changes for this in a separate change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83043/new/

https://reviews.llvm.org/D83043





More information about the llvm-commits mailing list