I'm looking at UnwindMapEntry
. Here is it's declaration:
//
// UnwindMapEntry - Description of each state transition for unwinding
// the stack (i.e. calling destructors).
//
// The unwind map is an array, indexed by current state. Each entry specifies
// the state to go to during unwind, and the action required to get there.
// Note that states are represented by a signed integer, and that the 'blank'
// state is -1 so that the array remains 0-based (because by definition there
// is never any unwind action to be performed from state -1). It is also
// assumed that state indices will be dense, i.e. that there will be no gaps of
// unused state indices in a function.
//
typedef const struct _s_UnwindMapEntry {
__ehstate_t toState; // State this action takes us to
#if _EH_RELATIVE_FUNCINFO
int action; // Image relative offset of funclet
#else
void (__cdecl * action)(void); // Funclet to call to effect state change
#endif
} UnwindMapEntry;
Sorry if it's obvious for you but what does toState means? It is not clear for me by reading the description above.
Also there is this structure for a tryblockmaprntry which is also involved somehow:
//
// HandlerMapEntry - associates a handler list (sequence of catches) with a
// range of eh-states.
//
typedef const struct _s_TryBlockMapEntry {
__ehstate_t tryLow; // Lowest state index of try
__ehstate_t tryHigh; // Highest state index of try
__ehstate_t catchHigh; // Highest state index of any associated catch
//....
What's catchHigh
- is it always tryHigh + 1
?
OK It seems the catchHigh
is continuing the state inside the catch block - because you can have exception there too. But still I don't see it's purpose - like when this field makes any difference.