<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 5:53 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><br><div><div><br></div><blockquote type="cite"><span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">+bool DWARFDebugRangeList::extract(DataExtractor data, uint32_t *offset_ptr) {</span><br style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">+  clear();</span><br style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">+  if (!data.isValidOffset(*offset_ptr))</span><br style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
</blockquote></div><br></div><div>Another nitpick, this (all of the DebugInfo stuff) code largely doesn't conform to the coding standards (variable names especially) but if you could avoid putting more stuff in that doesn't conform when you add new files it'd be nice.</div>
</div></blockquote><div><br></div><div>Yeah, thanks for pointing at this, I'll be more careful in the next patches.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>Also might want to think about starting to add some test cases (I'm guilty of not doing it as well, but a thought).</div></div></blockquote><div><br></div><div>Extensive testing of this is somewhat tricky, as we need chunks of valid DWARF data for testing (or completely separate parsing from logic, but this is a _significant_ refactoring job).</div>
<div>Writing source files, compiling them and making sure that compiler will create the DWARF we need, uploading these binaries as the inputs for test cases is... ugly.</div><div>I haven't taken a close look at tools like yaml2obj to see if they can help with this, though.</div>
<div><br></div></div>-- <br><div>Alexey Samsonov, MSK</div>