Hello John,<br><br>I was following your procedures and I isolated the
problem. The problem are represented by the basic blocks with only one
element.<div class="im"><br><br>for (Function::iterator II = F.begin(), EE = F.end(); II != EE; ++II, ++ii) <br>
{ <br></div>BasicBlock* BB=II;<div class="im"><br><br>if (BB->getTerminator())<br> {<br> Instruction* current = BB->getTerminator();<br><br></div> Instruction* previous;<br> <br> errs()<<"AAA\n";<br>
if(<b><span style="color:rgb(153,0,0)">current->getPrevNode()</span></b>)<br> {<br> errs()<<"BBB\n";<br> previous = current->getPrevNode();<br> ok=1;<br>
}<br> <br> if (ok){<br> errs()<<"CCC\n";<br> ........<br><br><br>It does print AAA, but then I have the segfault. So when I am evaluating the <b><span style="color:rgb(153,0,0)">current->getPrevNode() </span></b>condition<span style="color:rgb(153,0,0)"><font color="#000000">, I got the segfault.<br>
Do you know how can I solve this?<br><br>Thank you <br>Alex<br></font></span>