[PATCH] D19634: Read the rest of the substreams from DBI, and parse source file information
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 21:44:28 PDT 2016
zturner added inline comments.
================
Comment at: lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp:51
@@ -50,4 +50,3 @@
ulittle32_t Age; // Should match PDBInfoStream.
- ulittle16_t GSSyms;
- ulittle16_t BuildNumber; // See DbiBuildNo structure.
- ulittle16_t PSSyms;
+ ulittle16_t GSSyms; // Number of global symbols
+ ulittle16_t BuildNumber; // See DbiBuildNo structure.
----------------
majnemer wrote:
> Would it be easier to decode this field if it were named something like `NumGlobalSyms` or `NumGlobalSymbols`?
Actually I'm not 100% sure that that's even what it is. I could change it now, or wait till we actually start using it (which I assume by then I'll be more certain about its purpose)
================
Comment at: lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp:191
@@ +190,3 @@
+ Bytes.resize(Size);
+ return Stream.readBytes(&Bytes[0], Size);
+}
----------------
majnemer wrote:
> I'd be nice if the readBytes interface took a `MutableArrayRef<uint8_t>`. Then you'd just pass in the `std::vector`.
I've actually got a patch in progress that completely refactors the stream reading interface to make it so that I can read from mapped block streams and contiguous byte arrays (e.g. substreams) with the same interface. It might make more sense to change it in that patch since it focuses on the stream reading interface anyway.
http://reviews.llvm.org/D19634
More information about the llvm-commits
mailing list