<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes. The issue here, as you pointed out, is that your personality function is not called at all.<div>Even if you did nothing in the personality function, associated with the setup caused by</div><div>llvm.eh.selector, but returned _URC_CONTINUE_UNWIND (8), it should still be called.</div><div>Your results are acting like either dwarf exception header info is not emitted (llvm::DwarfExceptionHandling = true; </div><div>not executed could affect this), _Unwind_RaiseException(...) is not being called, or the default  or another personality </div><div>function (_gcc_personality_v0(...)) is called instead by the unwind infrastructure. Although you implied you </div><div>dumped the exception headers and found your personality function, I can if you wish instead given you breaks for </div><div>gbd so you can see if lvm.eh.selector is correctly prepping your personality function for eventual dwarf emission.</div><div><br></div><div>Garrison</div><div> </div><div><div><div>On Jan 22, 2010, at 8:06, James Williams wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">2010/1/22 Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Garrison,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
%7 = invoke i8* (...)* bitcast (i32 (%struct._Unwind_Exception*)* @_Unwind_RaiseException to i8* (...)*)(i64* %6)<br>
          to label %8 unwind label %.finally_pad  ; <i8*> [#uses=0]<br>
<br>
I am not sure this is going to work, at least from the way I've played with the system. In my examples the _Unwind_RaiseException(...) is called from a frame (function) called via<br>
the invoke instruction, not from a frame that contains the invoke instruction.<br>
</blockquote>
<br></div>
I'm pretty sure this doesn't matter.  It seems to me more likely that the<br>
exception object was not initialized properly.<br></blockquote><div>Hmm. I've tried a bunch of different ways of creating the exception including calling a C++ function that then does a throw. If I understand right, the personality function should still be offered the foreign exception so it has a chance to call cleanups?<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Ciao,<br><font color="#888888">
<br>
Duncan.<br>
<br>
</font></blockquote></div><br>
</blockquote></div><br></div></body></html>