g++ EH stack
Jason Merrill
jason at cygnus.com
Thu Jul 15 10:58:24 UTC 1999
The languge-specific part of the EH stack in g++ contains these elements:
void *value; // pointer to the thrown object, or the thrown value itself if
// a pointer
void *type; // pointer to the type_info node for the thrown object
void (*cleanup)(void *, int) // pointer to the destructor for the object
bool caught; // has this exception been caught since its last throw?
long handlers; // how many catch handlers are active for this exception
Both 'caught' and 'handlers' are needed to handle rethrowing and catching
within a catch block.
Language interaction is handled by recording the language of both the
exception region and the thrown exception. Each thrown exception also
includes a pointer to a language-specific matching function which is called
to compare the types of the exception and handler.
Jason
More information about the cxx-abi-dev
mailing list