<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Nov 3, 2015 at 4:25 PM Dave Bartolomeo <<a href="mailto:Dave.Bartolomeo@microsoft.com">Dave.Bartolomeo@microsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The LLVMCodeView library is definitely independent of the rest of the design questions.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">As far as testing goes, what would be the conventional LLVM way of testing a library for file format manipulation? A test tool that converts some simple text
 form into a .obj containing CodeView sections, and comparing with a baseline .obj? Or would the test convert back from the .obj to some kind of text as well, and compare to a text baseline? Is there some other LLVM component that has similar testing requirements
 that I can use as an example for how to test LLVMCodeView? Note that I’d be adding a CodeView->text dump tool anyway, since that will be pretty much essential for anyone working with CodeView.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Dave</span></p></div></div></blockquote><div>David Majnemer and David Blaikie (this is seriously like the attack of the Daves) probably have some thoughts, but currently there is code in llvm-readobj.exe to parse certain types of codeview from object files (mostly line table information).  </div><div><br></div><div>So one idea is to generate some object files that have CV records you know about up front, then pass the output of llvm-readobj (which would need to be updated to use LLVMCodeView instead of hand-rolled parsing) to FileCheck and verify that it matches some pattern.</div><div><br></div><div>Maybe the Daves have some other ideas as well.</div></div></div>