我在看UnwindMapEntry
。这是它的声明:
//
// 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;
对不起,如果这对您来说很明显,但是 toState 是什么意思?通过阅读上面的描述,我并不清楚。
还有一个 tryblockmaprntry 的结构,它也以某种方式涉及:
//
// 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
//....
什么catchHigh
- 总是这样tryHigh + 1
吗?
好的 似乎catchHigh
是在继续 catch 块内的状态 - 因为你也可以在那里有异常。但我仍然没有看到它的目的 - 就像这个领域有什么不同一样。