<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Hi,</div><div><br></div><div>I知 looking for advice on how to debug a problem with my exception handling code.  </div><div>I知 asking a specific question here - but general advice on how to debug something like this would be greatly appreciated.</div><div><br></div>Is there any way to get a list of landing pad clauses that are active at a particular point in a program?<br>I'd like to get something like a backtrace but listing all active landing pad clauses. The typeids of the C++ types <br>I'm trying to debug a problem where an exception that I'm throwing is not being caught.   <div>I'm generating JITed code with LLVM and landing pads and I've got shared libraries - lots of things going on that could potentially be going wrong.</div><div><br></div><div>A list of the pointer values like @_ZTIN4core9DynamicGoE is what I知 looking for.  Then I could compare that to the typeids that I know should be in that list.</div><div><br></div><div><div><font face="Courier">"(TRY-0).landing-pad":                            ; preds = %"(TRY-0).normal-dest14", %"(TRY-0).tagbody-B-1", %"(TRY-0).normal-dest10", %"(TRY-0).normal-dest9", %"(TRY-0).normal-dest8", %"(TRY-0).normal-dest", %"(TRY-0).tagbody-#:G1621-0"</font></div><div><font face="Courier">  %14 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0</font></div><div><font face="Courier">          catch i8* @_ZTIN4core9DynamicGoE</font></div><div><font face="Courier">          catch i8* @_ZTIN4core10ReturnFromE, !dbg !26</font></div><div><font face="Courier">  %15 = extractvalue { i8*, i32 } %14, 0, !dbg !26</font></div><div><font face="Courier">  %16 = extractvalue { i8*, i32 } %14, 1, !dbg !26</font></div><div><font face="Courier">  %17 = call i32 @llvm.eh.typeid.for(i8* @_ZTIN4core9DynamicGoE), !dbg !26</font></div><div><font face="Courier">  %18 = icmp eq i32 %16, %17, !dbg !26</font></div><div><font face="Courier">  br i1 %18, label %"(TRY-0).handler-block14470", label %"(TRY-0).dispatch-header19", !dbg !26</font></div></div><div><font face="Courier"><br></font></div><div><font face="Arial">I知 getting this error when I throw a core::Unwind exception and I知 certain that there is a landing pad with that clause.</font></div><div><font face="Arial"><br></font></div><div><div><font face="Courier">libc++abi.dylib: terminating with uncaught exception of type core::Unwind</font></div><div><font face="Courier">../../src/gctools/<a href="http://memoryManagement.cc">memoryManagement.cc</a>:75 Trapped SIGABRT - starting debugger</font></div><div><font face="Courier">ABORT was called!!!!!!!!!!!!</font></div><div style="font-family: Courier;"><br></div></div><div><br></div><div>I致e written a Common Lisp compiler that uses LLVM as the backend and it interoperates with C++ code and I use C++ exception handling for non-local exits.</div></body></html>