Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See section 6.2 of the <a href="http://www.x86-64.org/documentation/abi.pdf" rel="nofollow noreferrer">x86_64 ABI</a>. This details the interface but not a lot of the underlying data. This is also independent of C++ and could conceivably be used for other purposes as well.</p> <p>There are primarily two sections of the ELF binary as emitted by gcc which are of interest for exception handling. They are <code>.eh_frame</code> and <code>.gcc_except_table</code>. </p> <p><code>.eh_frame</code> follows the DWARF format (the debugging format that primarily comes into play when you're using gdb). It has exactly the same format as the <code>.debug_frame</code> section emitted when compiling with <code>-g</code>. Essentially, it contains the information necessary to pop back to the state of the machine registers and the stack at any point higher up the call stack. See the Dwarf Standard at dwarfstd.org for more information on this.</p> <p><code>.gcc_except_table</code> contains information about the exception handling "landing pads" the locations of handlers. This is necessary so as to know when to stop unwinding. Unfortunately this section is not well documented. The only snippets of information I have been able to glean come from the gcc mailing list. See particularly <a href="http://gcc.gnu.org/ml/gcc-help/2010-09/msg00116.html" rel="nofollow noreferrer">this post</a></p> <p>The remaining piece of information is then what actual code interprets the information found in these data sections. The relevant code lives in libstdc++ and libgcc. I cannot remember at the moment which pieces live in which. The interpreter for the DWARF call frame information can be found in the gcc source code in the file gcc/unwind-dw.c</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload