[PATCH] D19570: [PDB] Parse module information from the DBI stream

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 17:44:53 PDT 2016


ruiu added inline comments.

================
Comment at: lib/DebugInfo/PDB/Raw/ModInfo.cpp:50
@@ +49,3 @@
+  long *FileNameOffsets;     // array of [0..NumFiles) DBI name buffer offsets
+  ulittle32_t SrcFileNameNI; // Name Index for src file name
+  ulittle32_t PdbFilePathNI; // Name Index for path to compiler PDB
----------------
zturner wrote:
> I don't think so, but honestly I don't know.  We're reading this value from a file, and it doesn't make sense for a pointer to be in a file, because it would be meaningless in the address space of the process reading the file.  So far in the limited experiments I've run, the value of this pointer (and the other pointer earlier in the class definition) are always 0 when reading them in.  My best guess is that they use these as bookkeeping during the life of the PDB, but the value that goes to disk is unimportant.  I guess it's something we will figure out in time as we study the format more closely.
Since you are not using this field at least at this moment, why don't you use uint32_t or ulittle32_t? I don't think this code will pass tests on LP64 machines because on that machine long* is 64-bit wide.


http://reviews.llvm.org/D19570





More information about the llvm-commits mailing list