[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
g++ EH stack
- To: cxx-abi@xxxxxxxxxxxx
- Subject: g++ EH stack
- From: Jason Merrill <jason@xxxxxxxxxx>
- Date: Thu, 15 Jul 1999 03:58:24 -0700
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
|