- struct DeallocateExceptionTableCall {
- DeallocateExceptionTableCall(const void *ET) : ET(ET) {}
- const void *ET;
- };
- std::vector<DeallocateExceptionTableCall> deallocateExceptionTableCalls;
- virtual void deallocateExceptionTable(void *ET) {
- deallocateExceptionTableCalls.push_back(DeallocateExceptionTableCall(ET));
- Base->deallocateExceptionTable(ET);
- }
- struct StartExceptionTableCall {
- StartExceptionTableCall(uint8_t *Result, const Function *F,
- uintptr_t ActualSize, uintptr_t ActualSizeResult)
- : Result(Result), F(F), F_dump(DumpFunction(F)),
- ActualSize(ActualSize), ActualSizeResult(ActualSizeResult) {}
- uint8_t *Result;
- const Function *F;
- std::string F_dump;
- uintptr_t ActualSize;
- uintptr_t ActualSizeResult;
- };
- std::vector<StartExceptionTableCall> startExceptionTableCalls;
- virtual uint8_t* startExceptionTable(const Function* F,
- uintptr_t &ActualSize) {
- uintptr_t InitialActualSize = ActualSize;
- uint8_t *Result = Base->startExceptionTable(F, ActualSize);
- startExceptionTableCalls.push_back(
- StartExceptionTableCall(Result, F, InitialActualSize, ActualSize));
- return Result;
- }
- struct EndExceptionTableCall {
- EndExceptionTableCall(const Function *F, uint8_t *TableStart,
- uint8_t *TableEnd, uint8_t* FrameRegister)
- : F(F), F_dump(DumpFunction(F)),
- TableStart(TableStart), TableEnd(TableEnd),
- FrameRegister(FrameRegister) {}
- const Function *F;
- std::string F_dump;
- uint8_t *TableStart;
- uint8_t *TableEnd;
- uint8_t *FrameRegister;
- };
- std::vector<EndExceptionTableCall> endExceptionTableCalls;
- virtual void endExceptionTable(const Function *F, uint8_t *TableStart,
- uint8_t *TableEnd, uint8_t* FrameRegister) {
- endExceptionTableCalls.push_back(
- EndExceptionTableCall(F, TableStart, TableEnd, FrameRegister));
- return Base->endExceptionTable(F, TableStart, TableEnd, FrameRegister);
- }