Hi Trevor,
DWARF exception handling is an amalgam of several different documents and code tables, which all conspire to give us exception handling. :-) The documents you should read are:
* Exception Handling Tables (
http://www.codesourcery.com/public/cxx-abi/exceptions.pdf)
This explains in detail what the table in the "__TEXT,__gcc_except_tab" section is all about.
* DWARF Debugging Information Format: Version 3 (or 4)
This explains the "CIE" and "FDE" tables and what their encodings means.
*
http://www.codesourcery.com/public/cxx-abi/abi-eh.html
As Eugene pointed out, this explains what the personality function and unwind libraries do.
Well, "read" might be a bad way of putting it. You should definitely familiarize yourself with each document. But I would look to understand why the FDE looks like it does or what the format of the exception handling table means (-fverbose-asm gives extra information to help with this).
For specifics on how LLVM generates this information, look at these files:
* lib/CodeGen/AsmPrinter/DwarfException.cpp
This outputs the CIE, FDE, and exception handling tables.
* lib/Target/X86/X86RegisterInfo.cpp
The "X86RegisterInfo::emitPrologue" method shows how it constructs the "machine move" information that's used to create the FDE.
The front-end parses and generates the exception handlers and landing pads. The implementation of the stack unwinder is normally in a separate library (libunwind on Darwin). But the "abi-eh.html" document should give you a good idea of how a typical unwinder and personality function should act.
Lastly, GCC has a different approach (in their IR) to generating the EH data. They have many good people working on it. I tried to find a link to a document that someone on the GCC mailing list wrote up describing the exception handling table in detail, but couldn't find it. You may want to search that posting out. :-)
-bw