<br><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 8:31 AM, Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com">viridia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Wed, Sep 1, 2010 at 5:31 AM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be" target="_blank">jonas.maebe@elis.ugent.be</a>></span> wrote:<br></div><div class="gmail_quote">

<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On 01 Sep 2010, at 08:47, Talin wrote:<br>
<br>
> Once again, I have no idea what this means or how to go about<br>
> debugging it.<br>
> This is my biggest frustration with DIFactory - there's absolutely<br>
> no way to<br>
> verify that the DWARF debugging information that I've emitted into<br>
> my module<br>
> is correct or even sensible. The only way to test it is to try and<br>
> debug it<br>
> with gdb, but all that will tell you is that *something* failed - it<br>
> won't<br>
> tell you where or what. It's not so much like looking for a needle<br>
> in a<br>
> haystack - more like looking for a particular needle in a needlestack.<br>
<br>
</div>You can also try running  "dwarfdump --verify" on your dsymutil file<br>
(not on the dSYM bundle, but on the file inside the bundle). It<br>
sometimes gives a bit more information. Also simply using "dwarfdump -<br>
a" can be helpful to see wrong references (e.g., if the type info is<br>
structurally invalid then dwarfdump may simply stop dumping at that<br>
point, so you know where the error is).<br>
<br></blockquote></div><div>Ah OK thanks, that's helpful.</div><div><br></div><div>I tried what you suggested, and it prints out about 4000 lines and then segfaults, The last lines that it prints out are:</div><div><br>

</div>
</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div><font face="'courier new', monospace">.debug_frame contents:</font></div>
</div><div class="gmail_quote"><div><font face="'courier new', monospace"><br></font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">0x00000000: CIE</font></div>
</div><div class="gmail_quote"><div><font face="'courier new', monospace">        length: 0x00000010</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">        CIE_id: 0xffffffff</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">       version: 0x01</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">  augmentation: ""</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">    code_align: 1</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">    data_align: -4</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">   ra_register: 0x08</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">                DW_CFA_def_cfa (4 (esp), 4)</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">                DW_CFA_offset (8 (eip), 0)</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">                DW_CFA_nop</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">                DW_CFA_nop</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">  Instructions: Init State: CFA=esp+4     eip=[CFA]</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace"><br></font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace"><br>
</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">0x00000014: FDE</font></div></div><div class="gmail_quote"><div><font face="'courier new', monospace">        length: 0x00000028</font></div>


</div><div class="gmail_quote"><div><font face="'courier new', monospace">   CIE_pointer: 0x00000000</font></div></div></blockquote><div class="gmail_quote"><div> </div><div>I'm not sure how the contents of this structure relate to the various LLVM API calls used in creating debugging info...</div>

</div></blockquote><div><br></div><div>OK I figured it out, something is wrong with my descriptors for local variables...</div><div><br></div><div>Thanks again! :) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Jonas<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div></div><br><br clear="all"><br>-- <br><font color="#888888">-- Talin<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>