[PATCH] D55344: Support skewed Stream Arrays

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 11:38:16 PST 2018


amccarth added a comment.

If there is a magic value, should we be checking it?

Does the skew need to be taken into account in any existing boundary checks?



================
Comment at: lldb/trunk/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp:199
   // We need to subtract 4 here to adjust for the codeview debug magic
   // at the beginning of the debug info stream.
   const CompilandIndexItem *cci = compilands().GetCompiland(cu_sym.modi);
----------------
So is the above comment obsolete now?


================
Comment at: llvm/trunk/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp:60
+  if (auto EC = SymbolReader.readArray(
+          SymbolArray, SymbolReader.bytesRemaining(), sizeof(uint32_t)))
     return EC;
----------------
Perhaps a comment should go here to explain that the `sizeof(uint32_t)` accounts for CodeView's magic value at the beginning of the stream.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55344





More information about the llvm-commits mailing list