I think we should do it, but it's up to you.  Even if we don't add a test for the big pdb, we're still fixing this issue, since with a small pdb using MappedBlockStream or not will be equivalent.<br><br>Btw, it should be very easy to test large pdb.  Write some yaml by hand to manually specify the file size in the MsfHeader section, then use the DirectoryBlocks field to specify a large block number that would result in a modification of page 2 of split fpm.  Then run yaml2pdb on it and dump the fpm of the result.  <br><br>Anyway, I'll leave It's up to you, but it seems like just a few lines of code change for a big gain<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 3, 2016 at 5:41 PM Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well, I could that if you want, but in order to test that we need a large PDB file for round-trip testing, and I'm afraid that that may probably trigger more issues than the existing stream 0 issue. So, I'd like to fix stream 0 bug first.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 3, 2016 at 5:37 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Any particular reason you don't want to support writing split fpms yet?  Just call `WritableMappedBlockStream::createFpmStream` and then writeBytes on the result, and everything should just work <br><div class="m_-5682208081610210095HOEnZb"><div class="m_-5682208081610210095h5"><div class="gmail_quote"><div dir="ltr">On Wed, Aug 3, 2016 at 5:30 PM Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu created this revision.<br>
ruiu added a reviewer: zturner.<br>
ruiu added a subscriber: llvm-commits.<br>
<br>
As I wrote in a comment, llvm-pdbdump seems to not be able to restore<br>
stream 0 correctly. That is why we get different results for empty.pdb<br>
and our pdb file.<br>
<br>
This patch is to write only one FPM. So it still cannot produce large<br>
PDBs which need more than one FPM page.<br>
<br>
<a href="https://reviews.llvm.org/D23145" rel="noreferrer" target="_blank">https://reviews.llvm.org/D23145</a><br>
<br>
Files:<br>
  lib/DebugInfo/MSF/MSFBuilder.cpp<br>
  lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp<br>
  test/DebugInfo/PDB/pdbdump-readwrite.test<br>
<br>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>