#ifndef MRT_EH_STACKINFO_H
#define MRT_EH_STACKINFO_H
#include "Base/LogFile.h"
#include "StackInfo.h"
namespace MapleRuntime {
class EHStackInfo : public StackInfo {
public:
explicit EHStackInfo(const UnwindContext* context = nullptr) : StackInfo(context)
{
#if defined(MRT_DEBUG) && (MRT_DEBUG == 1)
DLOG(UNWIND, "EH Stack Info");
DLOG(UNWIND, "TopContext : %x", context);
if (context != nullptr) {
DLOG(UNWIND, "Top Context ip : %x Top Context fa : %x", context->frameInfo.mFrame.GetIP(),
context->frameInfo.mFrame.GetFA());
}
#endif
}
~EHStackInfo() override = default;
void FillInStackTrace() override;
};
}
#endif