llvm

What is an exception handling personality function?


I've looked at the documentation for the LLVM EH intrinsics, and also the Itanium ABI, and I'm stumped on a few things.

What is an exception personality function? What jobs does it perform? How would I go about creating one?


Solution

  • I had exactly the same question. I've just found these articles which thoroughly explains how it works, the full exception handling process, including the exact purpose of the personality function and a step-by-step implementation.

    For the sake of having an answer on SO, here is a brief summary of the personality behavior when an exception occurs (but you really should look at the 18 22 articles that this guy wrote about this !):