<div dir="ltr">They are not blocking me, as I modified the files generated by obj2yaml by hand to fix these errors. I will let you check in these changes.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 6, 2013 at 5:29 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Fri, Jul 5, 2013 at 3:57 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:rui314@gmail.com" target="_blank">rui314@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
  Sean,<br>
<br>
  It looks like obj2yaml outputs malformed YAML in the following cases:<br>
<br>
   - Section name with special characters: COFF file often contains sections like @<a href="http://comp.id" target="_blank">comp.id</a> or .debug$S. These names should be quoted by "", otherwise yaml2obj cannot read them.<br>


</blockquote><div><br></div></div><div>This seems like an error in YAMLIO's handling of strings. Try adding some quoting logic to ScalarTraits<StringRef>::output in lib/Support/YAMLTraits.cpp. (raw_ostream::write_escaped may be useful).</div>

<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
   - Empty section: If the size of a section is zero, obj2yaml outputs the following line, which cannot be parsed by obj2yaml<br>
<br>
    SectionData:<br>
<br>
  Looks like it needs to be<br>
<br>
    SectionData: ""<br></blockquote><div><br></div></div><div>Oops, this looks like a regression when I switched things over to using BinaryRef. The fix should be to add a special case at the beginning of BinaryRef::writeAsHex in lib/Object/YAML.cpp; something like:</div>


<div><br></div><div><div>  if (binary_size() == 0) {</div><div>    OS << "\"\"";</div><div>    return;</div><div>  }</div></div><div><br></div><div>Feel free to commit these changes if they are blocking you. I'll fix them on Monday if you don't get to them by then.</div>

<span class="HOEnZb"><font color="#888888">
<div><br></div><div>-- Sean Silva</div></font></span></div></div></div>
</blockquote></div><br></div>